diff --git a/3rdparty/spirv-cross/CMakeLists.txt b/3rdparty/spirv-cross/CMakeLists.txt index b6b675013..c926f5c00 100644 --- a/3rdparty/spirv-cross/CMakeLists.txt +++ b/3rdparty/spirv-cross/CMakeLists.txt @@ -565,6 +565,16 @@ if (SPIRV_CROSS_CLI) ${spirv-cross-externals} ${CMAKE_CURRENT_SOURCE_DIR}/shaders-reflection WORKING_DIRECTORY $) + add_test(NAME spirv-cross-test-ue4 + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --msl --parallel + ${spirv-cross-externals} + ${CMAKE_CURRENT_SOURCE_DIR}/shaders-ue4 + WORKING_DIRECTORY $) + add_test(NAME spirv-cross-test-ue4-opt + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --msl --opt --parallel + ${spirv-cross-externals} + ${CMAKE_CURRENT_SOURCE_DIR}/shaders-ue4 + WORKING_DIRECTORY $) endif() elseif(NOT ${PYTHONINTERP_FOUND}) message(WARNING "Testing disabled. Could not find python3. If you have python3 installed try running " diff --git a/3rdparty/spirv-cross/main.cpp b/3rdparty/spirv-cross/main.cpp index 985537251..711b0ff19 100644 --- a/3rdparty/spirv-cross/main.cpp +++ b/3rdparty/spirv-cross/main.cpp @@ -514,6 +514,9 @@ struct CLIArguments bool msl_domain_lower_left = false; bool msl_argument_buffers = false; bool msl_texture_buffer_native = false; + bool msl_framebuffer_fetch = false; + bool msl_invariant_float_math = false; + bool msl_emulate_cube_array = false; bool msl_multiview = false; bool msl_view_index_from_device_index = false; bool msl_dispatch_base = false; @@ -598,6 +601,8 @@ static void print_help() "\t[--msl-domain-lower-left]\n" "\t[--msl-argument-buffers]\n" "\t[--msl-texture-buffer-native]\n" + "\t[--msl-framebuffer-fetch]\n" + "\t[--msl-emulate-cube-array]\n" "\t[--msl-discrete-descriptor-set ]\n" "\t[--msl-device-argument-buffer ]\n" "\t[--msl-multiview]\n" @@ -756,8 +761,13 @@ static string compile_iteration(const CLIArguments &args, std::vector msl_opts.msl_version = args.msl_version; msl_opts.capture_output_to_buffer = args.msl_capture_output_to_buffer; msl_opts.swizzle_texture_samples = args.msl_swizzle_texture_samples; + msl_opts.invariant_float_math = args.msl_invariant_float_math; if (args.msl_ios) + { msl_opts.platform = CompilerMSL::Options::iOS; + msl_opts.ios_use_framebuffer_fetch_subpasses = args.msl_framebuffer_fetch; + msl_opts.emulate_cube_array = args.msl_emulate_cube_array; + } msl_opts.pad_fragment_output_components = args.msl_pad_fragment_output; msl_opts.tess_domain_origin_lower_left = args.msl_domain_lower_left; msl_opts.argument_buffers = args.msl_argument_buffers; @@ -1093,6 +1103,9 @@ static int main_inner(int argc, char *argv[]) cbs.add("--msl-device-argument-buffer", [&args](CLIParser &parser) { args.msl_device_argument_buffers.push_back(parser.next_uint()); }); cbs.add("--msl-texture-buffer-native", [&args](CLIParser &) { args.msl_texture_buffer_native = true; }); + cbs.add("--msl-framebuffer-fetch", [&args](CLIParser &) { args.msl_framebuffer_fetch = true; }); + cbs.add("--msl-invariant-float-math", [&args](CLIParser &) { args.msl_invariant_float_math = true; }); + cbs.add("--msl-emulate-cube-array", [&args](CLIParser &) { args.msl_emulate_cube_array = true; }); cbs.add("--msl-multiview", [&args](CLIParser &) { args.msl_multiview = true; }); cbs.add("--msl-view-index-from-device-index", [&args](CLIParser &) { args.msl_view_index_from_device_index = true; }); diff --git a/3rdparty/spirv-cross/reference/opt/shaders-hlsl/comp/atomic-decrement.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders-hlsl/comp/atomic-decrement.asm.comp deleted file mode 100644 index b86b5327e..000000000 --- a/3rdparty/spirv-cross/reference/opt/shaders-hlsl/comp/atomic-decrement.asm.comp +++ /dev/null @@ -1,22 +0,0 @@ -RWByteAddressBuffer u0_counter : register(u1); -RWBuffer u0 : register(u0); - -static uint3 gl_GlobalInvocationID; -struct SPIRV_Cross_Input -{ - uint3 gl_GlobalInvocationID : SV_DispatchThreadID; -}; - -void comp_main() -{ - uint _29; - u0_counter.InterlockedAdd(0, -1, _29); - u0[uint(asint(asfloat(_29))) + 0u] = uint(int(gl_GlobalInvocationID.x)).x; -} - -[numthreads(4, 1, 1)] -void main(SPIRV_Cross_Input stage_input) -{ - gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID; - comp_main(); -} diff --git a/3rdparty/spirv-cross/reference/opt/shaders-hlsl/comp/atomic-increment.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders-hlsl/comp/atomic-increment.asm.comp deleted file mode 100644 index f2338f225..000000000 --- a/3rdparty/spirv-cross/reference/opt/shaders-hlsl/comp/atomic-increment.asm.comp +++ /dev/null @@ -1,22 +0,0 @@ -RWByteAddressBuffer u0_counter : register(u1); -RWBuffer u0 : register(u0); - -static uint3 gl_GlobalInvocationID; -struct SPIRV_Cross_Input -{ - uint3 gl_GlobalInvocationID : SV_DispatchThreadID; -}; - -void comp_main() -{ - uint _29; - u0_counter.InterlockedAdd(0, 1, _29); - u0[uint(asint(asfloat(_29))) + 0u] = uint(int(gl_GlobalInvocationID.x)).x; -} - -[numthreads(4, 1, 1)] -void main(SPIRV_Cross_Input stage_input) -{ - gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID; - comp_main(); -} diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp index bbc9a95a9..3dc6fffcf 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp @@ -13,7 +13,8 @@ struct u0_counters }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp index 5710c9102..6f42bb9d2 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp @@ -13,7 +13,8 @@ struct u0_counters }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp index d8998bd20..bb51fd7b1 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp @@ -11,7 +11,8 @@ struct cb5_struct }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp index c4a0476c3..8c9e23aa0 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp @@ -11,7 +11,8 @@ struct cb }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag index 030fbb04b..726976631 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag @@ -1,13 +1,52 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; -constant float _46[16] = { 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }; -constant float4 _76[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; -constant float4 _90[4] = { float4(20.0), float4(30.0), float4(50.0), float4(60.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _46 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _76 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); +constant spvUnsafeArray _90 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); struct main0_out { @@ -19,64 +58,10 @@ struct main0_in int index [[user(locn0)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - fragment main0_out main0(main0_in in [[stage_in]]) { - float4 foobar[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; - float4 baz[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; + spvUnsafeArray foobar = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); + spvUnsafeArray baz = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); main0_out out = {}; out.FragColor = _46[in.index]; if (in.index < 10) @@ -102,7 +87,7 @@ fragment main0_out main0(main0_in in [[stage_in]]) } int _37 = in.index & 3; out.FragColor += foobar[_37].z; - spvArrayCopyFromConstantToStack1(baz, _90); + baz = _90; out.FragColor += baz[_37].z; return out; } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/single-function-private-lut.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/single-function-private-lut.asm.frag index 7d1ab8658..4c0ea901d 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/single-function-private-lut.asm.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/single-function-private-lut.asm.frag @@ -1,17 +1,54 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct myType { float data; }; -constant myType _21[5] = { myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 } }; - struct main0_out { float4 o_color [[color(0)]]; @@ -26,6 +63,8 @@ inline Tx mod(Tx x, Ty y) fragment main0_out main0(float4 gl_FragCoord [[position]]) { + spvUnsafeArray _21 = spvUnsafeArray({ myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 } }); + main0_out out = {}; if (_21[int(mod(gl_FragCoord.x, 4.0))].data > 0.0) { diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag index 1bafc6953..d59013daa 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag @@ -1,9 +1,50 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; -constant float4 _20[2] = { float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _20 = spvUnsafeArray({ float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }); struct main0_out { @@ -15,7 +56,7 @@ struct main0_out fragment main0_out main0() { main0_out out = {}; - float4 FragColors[2] = { float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }; + spvUnsafeArray FragColors = spvUnsafeArray({ float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }); out.FragColor = float4(5.0); out.FragColors_0 = FragColors[0]; out.FragColors_1 = FragColors[1]; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/texture-atomics.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/texture-atomics.asm.frag new file mode 100644 index 000000000..ab5be6498 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/texture-atomics.asm.frag @@ -0,0 +1,121 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + spvUnsafeArray _m0; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _107 = _103 + 1u; + if (all(CulledObjectBoxBounds._m0[_107].xy > _96.xy) && all(CulledObjectBoxBounds._m0[_103].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[_160] - (float3(0.5) * (CulledObjectBoxBounds._m0[_103].xyz + CulledObjectBoxBounds._m0[_107].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[_103 + 2u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 3u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 4u].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/texture-atomics.asm.graphics-robust-access.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/texture-atomics.asm.graphics-robust-access.frag new file mode 100644 index 000000000..ca5e3eadb --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/frag/texture-atomics.asm.graphics-robust-access.frag @@ -0,0 +1,122 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + spvUnsafeArray _m0; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant uint* spvBufferSizeConstants [[buffer(25)]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + constant uint& CulledObjectBoxBoundsBufferSize = spvBufferSizeConstants[0]; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _186 = clamp(_103 + 1u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u); + if (all(CulledObjectBoxBounds._m0[_186].xy > _96.xy) && all(CulledObjectBoxBounds._m0[clamp(_103, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[int(clamp(uint(_160), uint(0), uint(7)))] - (float3(0.5) * (CulledObjectBoxBounds._m0[clamp(_103, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz + CulledObjectBoxBounds._m0[_186].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[clamp(_103 + 2u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz), dot(_166, CulledObjectBoxBounds._m0[clamp(_103 + 3u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz), dot(_166, CulledObjectBoxBounds._m0[clamp(_103 + 4u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc index a9940940b..f27ba84cf 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct VertexOutput { float4 pos; @@ -33,60 +72,6 @@ struct main0_in float4 gl_Position [[attribute(1)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) { device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; @@ -95,12 +80,12 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - VertexOutput _223[3] = { VertexOutput{ gl_in[0].gl_Position, gl_in[0].VertexOutput_uv }, VertexOutput{ gl_in[1].gl_Position, gl_in[1].VertexOutput_uv }, VertexOutput{ gl_in[2].gl_Position, gl_in[2].VertexOutput_uv } }; - VertexOutput param[3]; - spvArrayCopyFromStackToStack1(param, _223); + spvUnsafeArray _223 = spvUnsafeArray({ VertexOutput{ gl_in[0].gl_Position, gl_in[0].VertexOutput_uv }, VertexOutput{ gl_in[1].gl_Position, gl_in[1].VertexOutput_uv }, VertexOutput{ gl_in[2].gl_Position, gl_in[2].VertexOutput_uv } }); + spvUnsafeArray param; + param = _223; gl_out[gl_InvocationID].gl_Position = param[gl_InvocationID].pos; gl_out[gl_InvocationID]._entryPointOutput.uv = param[gl_InvocationID].uv; - threadgroup_barrier(mem_flags::mem_device); + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); if (int(gl_InvocationID) == 0) { float2 _174 = float2(1.0) + gl_in[0].VertexOutput_uv; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/complex-composite-constant-array.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/complex-composite-constant-array.comp new file mode 100644 index 000000000..bd58c95a0 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/complex-composite-constant-array.comp @@ -0,0 +1,59 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct SSBO +{ + float4x4 a; + uint index; +}; + +kernel void main0(device SSBO& _14 [[buffer(0)]]) +{ + spvUnsafeArray _32 = spvUnsafeArray({ float4x4(float4(1.0, 0.0, 0.0, 0.0), float4(0.0, 1.0, 0.0, 0.0), float4(0.0, 0.0, 1.0, 0.0), float4(0.0, 0.0, 0.0, 1.0)), float4x4(float4(2.0, 0.0, 0.0, 0.0), float4(0.0, 2.0, 0.0, 0.0), float4(0.0, 0.0, 2.0, 0.0), float4(0.0, 0.0, 0.0, 2.0)) }); + + _14.a = _32[_14.index]; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-array-initialization.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-array-initialization.comp index e7a950e57..6181ae69b 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-array-initialization.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-array-initialization.comp @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Data { float a; @@ -27,67 +66,13 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(2u, 1u, 1u); -constant Data _25[2] = { Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } }; - -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - kernel void main0(device SSBO& _53 [[buffer(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - Data _31[2] = { Data{ X, 2.0 }, Data{ 3.0, 5.0 } }; - Data data2[2]; - spvArrayCopyFromStackToStack1(data2, _31); + spvUnsafeArray _25 = spvUnsafeArray({ Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } }); + + spvUnsafeArray _31 = spvUnsafeArray({ Data{ X, 2.0 }, Data{ 3.0, 5.0 } }); + spvUnsafeArray data2; + data2 = _31; _53.outdata[gl_WorkGroupID.x].a = _25[gl_LocalInvocationID.x].a + data2[gl_LocalInvocationID.x].a; _53.outdata[gl_WorkGroupID.x].b = _25[gl_LocalInvocationID.x].b + data2[gl_LocalInvocationID.x].b; } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-construct.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-construct.comp index 17dbb8fd8..09e6fc7d9 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-construct.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/composite-construct.comp @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct SSBO0 { float4 as[1]; @@ -17,65 +56,11 @@ struct SSBO1 constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - kernel void main0(device SSBO0& _16 [[buffer(0)]], device SSBO1& _32 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) { - float4 _37[2] = { _16.as[gl_GlobalInvocationID.x], _32.bs[gl_GlobalInvocationID.x] }; - float4 values[2]; - spvArrayCopyFromStackToStack1(values, _37); + spvUnsafeArray _37 = spvUnsafeArray({ _16.as[gl_GlobalInvocationID.x], _32.bs[gl_GlobalInvocationID.x] }); + spvUnsafeArray values; + values = _37; _16.as[0] = values[gl_LocalInvocationIndex]; _32.bs[1] = float4(40.0); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/inverse.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/inverse.comp index a4ef60c42..33aed468f 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/inverse.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/inverse.comp @@ -22,20 +22,23 @@ struct MatrixIn constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); // Returns the determinant of a 2x2 matrix. -inline float spvDet2x2(float a1, float a2, float b1, float b2) +static inline __attribute__((always_inline)) +float spvDet2x2(float a1, float a2, float b1, float b2) { return a1 * b2 - b1 * a2; } // Returns the determinant of a 3x3 matrix. -inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) +static inline __attribute__((always_inline)) +float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) { return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3); } // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float4x4 spvInverse4x4(float4x4 m) +static inline __attribute__((always_inline)) +float4x4 spvInverse4x4(float4x4 m) { float4x4 adj; // The adjoint matrix (inverse after dividing by determinant) @@ -70,7 +73,8 @@ inline float4x4 spvInverse4x4(float4x4 m) // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float3x3 spvInverse3x3(float3x3 m) +static inline __attribute__((always_inline)) +float3x3 spvInverse3x3(float3x3 m) { float3x3 adj; // The adjoint matrix (inverse after dividing by determinant) @@ -97,7 +101,8 @@ inline float3x3 spvInverse3x3(float3x3 m) // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float2x2 spvInverse2x2(float2x2 m) +static inline __attribute__((always_inline)) +float2x2 spvInverse2x2(float2x2 m) { float2x2 adj; // The adjoint matrix (inverse after dividing by determinant) diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/spec-constant-work-group-size.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/spec-constant-work-group-size.comp index bb796ab95..de30edec1 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/spec-constant-work-group-size.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/spec-constant-work-group-size.comp @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + #ifndef SPIRV_CROSS_CONSTANT_ID_1 #define SPIRV_CROSS_CONSTANT_ID_1 2 #endif @@ -27,7 +68,7 @@ constant int _32 = (1 - a); kernel void main0(device SSBO& _17 [[buffer(0)]]) { - int spec_const_array_size[b]; + spvUnsafeArray spec_const_array_size; spec_const_array_size[a] = a; _17.v[_30] = b + spec_const_array_size[_32]; } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/storage-buffer-std140-vector-array.comp b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/storage-buffer-std140-vector-array.comp index 24ce28074..ac28fc9b3 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/storage-buffer-std140-vector-array.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/comp/storage-buffer-std140-vector-array.comp @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Sub { float4 f[2]; @@ -20,16 +61,16 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); kernel void main0(device SSBO& _27 [[buffer(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - float _155[2]; + spvUnsafeArray _155; _155[0] = _27.sub[gl_WorkGroupID.x].f[0].x; _155[1] = _27.sub[gl_WorkGroupID.x].f[1].x; - float2 _156[2]; + spvUnsafeArray _156; _156[0] = _27.sub[gl_WorkGroupID.x].f2[0].xy; _156[1] = _27.sub[gl_WorkGroupID.x].f2[1].xy; - float3 _157[2]; + spvUnsafeArray _157; _157[0] = _27.sub[gl_WorkGroupID.x].f3[0]; _157[1] = _27.sub[gl_WorkGroupID.x].f3[1]; - float4 _158[2]; + spvUnsafeArray _158; _158[0] = _27.sub[gl_WorkGroupID.x].f4[0]; _158[1] = _27.sub[gl_WorkGroupID.x].f4[1]; _155[gl_GlobalInvocationID.x] += 1.0; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc b/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc index a5e30b6de..01fceeb6c 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float3 vVertex; @@ -10,7 +51,7 @@ struct main0_out struct main0_patchOut { - float3 vPatch[2]; + spvUnsafeArray vPatch; }; struct main0_in @@ -28,7 +69,7 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ if (gl_InvocationID >= 4) return; gl_out[gl_InvocationID].vVertex = gl_in[gl_InvocationID].vInput + gl_in[gl_InvocationID ^ 1].vInput; - threadgroup_barrier(mem_flags::mem_device); + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); if (gl_InvocationID == 0) { patchOut.vPatch[0] = float3(10.0); diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc b/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc index cd4d8d80e..e7e184a98 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc @@ -28,10 +28,8 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 4) return; - Boo vInput_24; - vInput_24.a = gl_in[gl_InvocationID].Boo_a; - vInput_24.b = gl_in[gl_InvocationID].Boo_b; - gl_out[gl_InvocationID].vVertex = vInput_24; + Boo _25 = Boo{ gl_in[gl_InvocationID].Boo_a, gl_in[gl_InvocationID].Boo_b }; + gl_out[gl_InvocationID].vVertex = _25; spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(1.0); spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(2.0); spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2] = half(3.0); diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-lut-no-loop-variable.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-lut-no-loop-variable.frag index 9b757b6a3..79f9025a7 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-lut-no-loop-variable.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-lut-no-loop-variable.frag @@ -1,9 +1,50 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; -constant float _17[5] = { 1.0, 2.0, 3.0, 4.0, 5.0 }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _17 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 5.0 }); struct main0_out { diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-of-array-lut.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-of-array-lut.frag new file mode 100644 index 000000000..ba553824e --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/array-of-array-lut.frag @@ -0,0 +1,68 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _17 = spvUnsafeArray({ 1.0, 2.0, 3.0 }); +constant spvUnsafeArray _21 = spvUnsafeArray({ 4.0, 5.0, 6.0 }); +constant spvUnsafeArray, 2> _22 = spvUnsafeArray, 2>({ spvUnsafeArray({ 1.0, 2.0, 3.0 }), spvUnsafeArray({ 4.0, 5.0, 6.0 }) }); + +struct main0_out +{ + float vOutput [[color(0)]]; +}; + +struct main0_in +{ + int vIndex1 [[user(locn0)]]; + int vIndex2 [[user(locn1)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]]) +{ + main0_out out = {}; + out.vOutput = _22[in.vIndex1][in.vIndex2]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/buffer-read-write.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/buffer-read-write.frag index 36b1a1809..166d4311b 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/buffer-read-write.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/buffer-read-write.frag @@ -11,7 +11,8 @@ struct main0_out }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-array.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-array.frag index a0b830daa..ca7efc534 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-array.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-array.frag @@ -1,19 +1,59 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Foobar { float a; float b; }; -constant float4 _37[3] = { float4(1.0), float4(2.0), float4(3.0) }; -constant float4 _49[2] = { float4(1.0), float4(2.0) }; -constant float4 _54[2] = { float4(8.0), float4(10.0) }; -constant float4 _55[2][2] = { { float4(1.0), float4(2.0) }, { float4(8.0), float4(10.0) } }; -constant Foobar _75[2] = { Foobar{ 10.0, 40.0 }, Foobar{ 90.0, 70.0 } }; +constant spvUnsafeArray _37 = spvUnsafeArray({ float4(1.0), float4(2.0), float4(3.0) }); +constant spvUnsafeArray _49 = spvUnsafeArray({ float4(1.0), float4(2.0) }); +constant spvUnsafeArray _54 = spvUnsafeArray({ float4(8.0), float4(10.0) }); +constant spvUnsafeArray, 2> _55 = spvUnsafeArray, 2>({ spvUnsafeArray({ float4(1.0), float4(2.0) }), spvUnsafeArray({ float4(8.0), float4(10.0) }) }); struct main0_out { @@ -27,6 +67,8 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]]) { + spvUnsafeArray _75 = spvUnsafeArray({ Foobar{ 10.0, 40.0 }, Foobar{ 90.0, 70.0 } }); + main0_out out = {}; out.FragColor = ((_37[in.index] + _55[in.index][in.index + 1]) + float4(30.0)) + float4(_75[in.index].a + _75[in.index].b); return out; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-composites.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-composites.frag index 335cbcd79..e0fa980fb 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-composites.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/constant-composites.frag @@ -1,16 +1,56 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Foo { float a; float b; }; -constant float _16[4] = { 1.0, 4.0, 3.0, 2.0 }; -constant Foo _28[2] = { Foo{ 10.0, 20.0 }, Foo{ 30.0, 40.0 } }; +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 4.0, 3.0, 2.0 }); struct main0_out { @@ -24,6 +64,8 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]]) { + spvUnsafeArray _28 = spvUnsafeArray({ Foo{ 10.0, 20.0 }, Foo{ 30.0, 40.0 } }); + main0_out out = {}; out.FragColor = float4(_16[in.line]); out.FragColor += float4(_28[in.line].a * _28[1 - in.line].a); diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/fragment-component-padding.pad-fragment.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/fragment-component-padding.pad-fragment.frag index 53aafa5f7..90a6b3b9e 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/fragment-component-padding.pad-fragment.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/fragment-component-padding.pad-fragment.frag @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 FragColors_0 [[color(0)]]; @@ -19,7 +60,7 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float FragColors[2] = {}; + spvUnsafeArray FragColors = {}; float2 FragColor2 = {}; float3 FragColor3 = {}; FragColors[0] = in.vColor.x; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/lut-promotion.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/lut-promotion.frag index 0e4c73f2e..e24bcd6d1 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/lut-promotion.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/lut-promotion.frag @@ -1,13 +1,52 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; -constant float _16[16] = { 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }; -constant float4 _60[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; -constant float4 _104[4] = { float4(20.0), float4(30.0), float4(50.0), float4(60.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _60 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); +constant spvUnsafeArray _104 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); struct main0_out { @@ -19,60 +58,6 @@ struct main0_in int index [[user(locn0)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; @@ -94,7 +79,7 @@ fragment main0_out main0(main0_in in [[stage_in]]) { out.FragColor += _60[in.index & 1].x; } - float4 foobar[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; + spvUnsafeArray foobar = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); if (_63) { foobar[1].z = 20.0; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/mrt-array.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/mrt-array.frag index c8237e941..79fc0391b 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/mrt-array.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/mrt-array.frag @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 FragColor_0 [[color(0)]]; @@ -29,7 +68,7 @@ inline Tx mod(Tx x, Ty y) fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float4 FragColor[4] = {}; + spvUnsafeArray FragColor = {}; FragColor[0] = mod(in.vA, in.vB); FragColor[1] = in.vA + in.vB; FragColor[2] = in.vA - in.vB; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag new file mode 100644 index 000000000..4f7e9b53b --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag @@ -0,0 +1,23 @@ +#include +#include + +using namespace metal; + +struct main0_out +{ + float FragColor [[color(0)]]; +}; + +struct main0_in +{ + float3 vUV [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], depth2d uTexture [[texture(0)]], sampler uSampler [[sampler(0)]], sampler uSamplerShadow [[sampler(1)]]) +{ + main0_out out = {}; + out.FragColor = float4(uTexture.sample(uSampler, in.vUV.xy)).x; + out.FragColor += uTexture.sample_compare(uSamplerShadow, in.vUV.xy, in.vUV.z); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/texture-cube-array.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/texture-cube-array.frag new file mode 100644 index 000000000..0af8a047b --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/texture-cube-array.frag @@ -0,0 +1,22 @@ +#include +#include + +using namespace metal; + +struct main0_out +{ + float4 FragColor [[color(0)]]; +}; + +struct main0_in +{ + float4 vUV [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], texturecube cubeSampler [[texture(0)]], texturecube_array cubeArraySampler [[texture(1)]], texture2d_array texArraySampler [[texture(2)]], sampler cubeSamplerSmplr [[sampler(0)]], sampler cubeArraySamplerSmplr [[sampler(1)]], sampler texArraySamplerSmplr [[sampler(2)]]) +{ + main0_out out = {}; + out.FragColor = (cubeSampler.sample(cubeSamplerSmplr, in.vUV.xyz) + cubeArraySampler.sample(cubeArraySamplerSmplr, in.vUV.xyz, uint(round(in.vUV.w)))) + texArraySampler.sample(texArraySamplerSmplr, in.vUV.xyz.xy, uint(round(in.vUV.xyz.z))); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag new file mode 100644 index 000000000..217a7a9e2 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag @@ -0,0 +1,58 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" + +#include +#include + +using namespace metal; + +struct main0_out +{ + float4 FragColor [[color(0)]]; +}; + +struct main0_in +{ + float4 vUV [[user(locn0)]]; +}; + +static inline __attribute__((always_inline)) +float3 spvCubemapTo2DArrayFace(float3 P) +{ + float3 Coords = abs(P.xyz); + float CubeFace = 0; + float ProjectionAxis = 0; + float u = 0; + float v = 0; + if (Coords.x >= Coords.y && Coords.x >= Coords.z) + { + CubeFace = P.x >= 0 ? 0 : 1; + ProjectionAxis = Coords.x; + u = P.x >= 0 ? -P.z : P.z; + v = -P.y; + } + else if (Coords.y >= Coords.x && Coords.y >= Coords.z) + { + CubeFace = P.y >= 0 ? 2 : 3; + ProjectionAxis = Coords.y; + u = P.x; + v = P.y >= 0 ? P.z : -P.z; + } + else + { + CubeFace = P.z >= 0 ? 4 : 5; + ProjectionAxis = Coords.z; + u = P.z >= 0 ? P.x : -P.x; + v = -P.y; + } + u = 0.5 * (u/ProjectionAxis + 1); + v = 0.5 * (v/ProjectionAxis + 1); + return float3(u, v, CubeFace); +} + +fragment main0_out main0(main0_in in [[stage_in]], texturecube cubeSampler [[texture(0)]], texture2d_array cubeArraySampler [[texture(1)]], texture2d_array texArraySampler [[texture(2)]], sampler cubeSamplerSmplr [[sampler(0)]], sampler cubeArraySamplerSmplr [[sampler(1)]], sampler texArraySamplerSmplr [[sampler(2)]]) +{ + main0_out out = {}; + out.FragColor = (cubeSampler.sample(cubeSamplerSmplr, in.vUV.xyz) + cubeArraySampler.sample(cubeArraySamplerSmplr, spvCubemapTo2DArrayFace(in.vUV.xyz).xy, uint(spvCubemapTo2DArrayFace(in.vUV.xyz).z) + (uint(round(in.vUV.w)) * 6u))) + texArraySampler.sample(texArraySamplerSmplr, in.vUV.xyz.xy, uint(round(in.vUV.xyz.z))); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array-of-matrix.tesc b/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array-of-matrix.tesc new file mode 100644 index 000000000..46d4b4ad5 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array-of-matrix.tesc @@ -0,0 +1,73 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4x4 vOutputs; +}; + +struct main0_in +{ + float4 vInputs_0 [[attribute(0)]]; + float4 vInputs_1 [[attribute(1)]]; + float4 vInputs_2 [[attribute(2)]]; + float4 vInputs_3 [[attribute(3)]]; +}; + +kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 4) + return; + spvUnsafeArray _16 = spvUnsafeArray({ float4x4(gl_in[0].vInputs_0, gl_in[0].vInputs_1, gl_in[0].vInputs_2, gl_in[0].vInputs_3), float4x4(gl_in[1].vInputs_0, gl_in[1].vInputs_1, gl_in[1].vInputs_2, gl_in[1].vInputs_3), float4x4(gl_in[2].vInputs_0, gl_in[2].vInputs_1, gl_in[2].vInputs_2, gl_in[2].vInputs_3), float4x4(gl_in[3].vInputs_0, gl_in[3].vInputs_1, gl_in[3].vInputs_2, gl_in[3].vInputs_3), float4x4(gl_in[4].vInputs_0, gl_in[4].vInputs_1, gl_in[4].vInputs_2, gl_in[4].vInputs_3), float4x4(gl_in[5].vInputs_0, gl_in[5].vInputs_1, gl_in[5].vInputs_2, gl_in[5].vInputs_3), float4x4(gl_in[6].vInputs_0, gl_in[6].vInputs_1, gl_in[6].vInputs_2, gl_in[6].vInputs_3), float4x4(gl_in[7].vInputs_0, gl_in[7].vInputs_1, gl_in[7].vInputs_2, gl_in[7].vInputs_3), float4x4(gl_in[8].vInputs_0, gl_in[8].vInputs_1, gl_in[8].vInputs_2, gl_in[8].vInputs_3), float4x4(gl_in[9].vInputs_0, gl_in[9].vInputs_1, gl_in[9].vInputs_2, gl_in[9].vInputs_3), float4x4(gl_in[10].vInputs_0, gl_in[10].vInputs_1, gl_in[10].vInputs_2, gl_in[10].vInputs_3), float4x4(gl_in[11].vInputs_0, gl_in[11].vInputs_1, gl_in[11].vInputs_2, gl_in[11].vInputs_3), float4x4(gl_in[12].vInputs_0, gl_in[12].vInputs_1, gl_in[12].vInputs_2, gl_in[12].vInputs_3), float4x4(gl_in[13].vInputs_0, gl_in[13].vInputs_1, gl_in[13].vInputs_2, gl_in[13].vInputs_3), float4x4(gl_in[14].vInputs_0, gl_in[14].vInputs_1, gl_in[14].vInputs_2, gl_in[14].vInputs_3), float4x4(gl_in[15].vInputs_0, gl_in[15].vInputs_1, gl_in[15].vInputs_2, gl_in[15].vInputs_3), float4x4(gl_in[16].vInputs_0, gl_in[16].vInputs_1, gl_in[16].vInputs_2, gl_in[16].vInputs_3), float4x4(gl_in[17].vInputs_0, gl_in[17].vInputs_1, gl_in[17].vInputs_2, gl_in[17].vInputs_3), float4x4(gl_in[18].vInputs_0, gl_in[18].vInputs_1, gl_in[18].vInputs_2, gl_in[18].vInputs_3), float4x4(gl_in[19].vInputs_0, gl_in[19].vInputs_1, gl_in[19].vInputs_2, gl_in[19].vInputs_3), float4x4(gl_in[20].vInputs_0, gl_in[20].vInputs_1, gl_in[20].vInputs_2, gl_in[20].vInputs_3), float4x4(gl_in[21].vInputs_0, gl_in[21].vInputs_1, gl_in[21].vInputs_2, gl_in[21].vInputs_3), float4x4(gl_in[22].vInputs_0, gl_in[22].vInputs_1, gl_in[22].vInputs_2, gl_in[22].vInputs_3), float4x4(gl_in[23].vInputs_0, gl_in[23].vInputs_1, gl_in[23].vInputs_2, gl_in[23].vInputs_3), float4x4(gl_in[24].vInputs_0, gl_in[24].vInputs_1, gl_in[24].vInputs_2, gl_in[24].vInputs_3), float4x4(gl_in[25].vInputs_0, gl_in[25].vInputs_1, gl_in[25].vInputs_2, gl_in[25].vInputs_3), float4x4(gl_in[26].vInputs_0, gl_in[26].vInputs_1, gl_in[26].vInputs_2, gl_in[26].vInputs_3), float4x4(gl_in[27].vInputs_0, gl_in[27].vInputs_1, gl_in[27].vInputs_2, gl_in[27].vInputs_3), float4x4(gl_in[28].vInputs_0, gl_in[28].vInputs_1, gl_in[28].vInputs_2, gl_in[28].vInputs_3), float4x4(gl_in[29].vInputs_0, gl_in[29].vInputs_1, gl_in[29].vInputs_2, gl_in[29].vInputs_3), float4x4(gl_in[30].vInputs_0, gl_in[30].vInputs_1, gl_in[30].vInputs_2, gl_in[30].vInputs_3), float4x4(gl_in[31].vInputs_0, gl_in[31].vInputs_1, gl_in[31].vInputs_2, gl_in[31].vInputs_3) }); + spvUnsafeArray tmp; + tmp = _16; + gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID]; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array-of-struct.tesc b/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array-of-struct.tesc new file mode 100644 index 000000000..fc2cec1c3 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array-of-struct.tesc @@ -0,0 +1,84 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct VertexData +{ + float4x4 a; + spvUnsafeArray b; + float4 c; +}; + +struct main0_out +{ + float4 vOutputs; +}; + +struct main0_in +{ + float4 VertexData_a_0 [[attribute(0)]]; + float4 VertexData_a_1 [[attribute(1)]]; + float4 VertexData_a_2 [[attribute(2)]]; + float4 VertexData_a_3 [[attribute(3)]]; + float4 VertexData_b_0 [[attribute(4)]]; + float4 VertexData_b_1 [[attribute(5)]]; + float4 VertexData_c [[attribute(6)]]; +}; + +kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 4) + return; + spvUnsafeArray _19 = spvUnsafeArray({ VertexData{ float4x4(gl_in[0].VertexData_a_0, gl_in[0].VertexData_a_1, gl_in[0].VertexData_a_2, gl_in[0].VertexData_a_3), spvUnsafeArray({ gl_in[0].VertexData_b_0, gl_in[0].VertexData_b_1 }), gl_in[0].VertexData_c }, VertexData{ float4x4(gl_in[1].VertexData_a_0, gl_in[1].VertexData_a_1, gl_in[1].VertexData_a_2, gl_in[1].VertexData_a_3), spvUnsafeArray({ gl_in[1].VertexData_b_0, gl_in[1].VertexData_b_1 }), gl_in[1].VertexData_c }, VertexData{ float4x4(gl_in[2].VertexData_a_0, gl_in[2].VertexData_a_1, gl_in[2].VertexData_a_2, gl_in[2].VertexData_a_3), spvUnsafeArray({ gl_in[2].VertexData_b_0, gl_in[2].VertexData_b_1 }), gl_in[2].VertexData_c }, VertexData{ float4x4(gl_in[3].VertexData_a_0, gl_in[3].VertexData_a_1, gl_in[3].VertexData_a_2, gl_in[3].VertexData_a_3), spvUnsafeArray({ gl_in[3].VertexData_b_0, gl_in[3].VertexData_b_1 }), gl_in[3].VertexData_c }, VertexData{ float4x4(gl_in[4].VertexData_a_0, gl_in[4].VertexData_a_1, gl_in[4].VertexData_a_2, gl_in[4].VertexData_a_3), spvUnsafeArray({ gl_in[4].VertexData_b_0, gl_in[4].VertexData_b_1 }), gl_in[4].VertexData_c }, VertexData{ float4x4(gl_in[5].VertexData_a_0, gl_in[5].VertexData_a_1, gl_in[5].VertexData_a_2, gl_in[5].VertexData_a_3), spvUnsafeArray({ gl_in[5].VertexData_b_0, gl_in[5].VertexData_b_1 }), gl_in[5].VertexData_c }, VertexData{ float4x4(gl_in[6].VertexData_a_0, gl_in[6].VertexData_a_1, gl_in[6].VertexData_a_2, gl_in[6].VertexData_a_3), spvUnsafeArray({ gl_in[6].VertexData_b_0, gl_in[6].VertexData_b_1 }), gl_in[6].VertexData_c }, VertexData{ float4x4(gl_in[7].VertexData_a_0, gl_in[7].VertexData_a_1, gl_in[7].VertexData_a_2, gl_in[7].VertexData_a_3), spvUnsafeArray({ gl_in[7].VertexData_b_0, gl_in[7].VertexData_b_1 }), gl_in[7].VertexData_c }, VertexData{ float4x4(gl_in[8].VertexData_a_0, gl_in[8].VertexData_a_1, gl_in[8].VertexData_a_2, gl_in[8].VertexData_a_3), spvUnsafeArray({ gl_in[8].VertexData_b_0, gl_in[8].VertexData_b_1 }), gl_in[8].VertexData_c }, VertexData{ float4x4(gl_in[9].VertexData_a_0, gl_in[9].VertexData_a_1, gl_in[9].VertexData_a_2, gl_in[9].VertexData_a_3), spvUnsafeArray({ gl_in[9].VertexData_b_0, gl_in[9].VertexData_b_1 }), gl_in[9].VertexData_c }, VertexData{ float4x4(gl_in[10].VertexData_a_0, gl_in[10].VertexData_a_1, gl_in[10].VertexData_a_2, gl_in[10].VertexData_a_3), spvUnsafeArray({ gl_in[10].VertexData_b_0, gl_in[10].VertexData_b_1 }), gl_in[10].VertexData_c }, VertexData{ float4x4(gl_in[11].VertexData_a_0, gl_in[11].VertexData_a_1, gl_in[11].VertexData_a_2, gl_in[11].VertexData_a_3), spvUnsafeArray({ gl_in[11].VertexData_b_0, gl_in[11].VertexData_b_1 }), gl_in[11].VertexData_c }, VertexData{ float4x4(gl_in[12].VertexData_a_0, gl_in[12].VertexData_a_1, gl_in[12].VertexData_a_2, gl_in[12].VertexData_a_3), spvUnsafeArray({ gl_in[12].VertexData_b_0, gl_in[12].VertexData_b_1 }), gl_in[12].VertexData_c }, VertexData{ float4x4(gl_in[13].VertexData_a_0, gl_in[13].VertexData_a_1, gl_in[13].VertexData_a_2, gl_in[13].VertexData_a_3), spvUnsafeArray({ gl_in[13].VertexData_b_0, gl_in[13].VertexData_b_1 }), gl_in[13].VertexData_c }, VertexData{ float4x4(gl_in[14].VertexData_a_0, gl_in[14].VertexData_a_1, gl_in[14].VertexData_a_2, gl_in[14].VertexData_a_3), spvUnsafeArray({ gl_in[14].VertexData_b_0, gl_in[14].VertexData_b_1 }), gl_in[14].VertexData_c }, VertexData{ float4x4(gl_in[15].VertexData_a_0, gl_in[15].VertexData_a_1, gl_in[15].VertexData_a_2, gl_in[15].VertexData_a_3), spvUnsafeArray({ gl_in[15].VertexData_b_0, gl_in[15].VertexData_b_1 }), gl_in[15].VertexData_c }, VertexData{ float4x4(gl_in[16].VertexData_a_0, gl_in[16].VertexData_a_1, gl_in[16].VertexData_a_2, gl_in[16].VertexData_a_3), spvUnsafeArray({ gl_in[16].VertexData_b_0, gl_in[16].VertexData_b_1 }), gl_in[16].VertexData_c }, VertexData{ float4x4(gl_in[17].VertexData_a_0, gl_in[17].VertexData_a_1, gl_in[17].VertexData_a_2, gl_in[17].VertexData_a_3), spvUnsafeArray({ gl_in[17].VertexData_b_0, gl_in[17].VertexData_b_1 }), gl_in[17].VertexData_c }, VertexData{ float4x4(gl_in[18].VertexData_a_0, gl_in[18].VertexData_a_1, gl_in[18].VertexData_a_2, gl_in[18].VertexData_a_3), spvUnsafeArray({ gl_in[18].VertexData_b_0, gl_in[18].VertexData_b_1 }), gl_in[18].VertexData_c }, VertexData{ float4x4(gl_in[19].VertexData_a_0, gl_in[19].VertexData_a_1, gl_in[19].VertexData_a_2, gl_in[19].VertexData_a_3), spvUnsafeArray({ gl_in[19].VertexData_b_0, gl_in[19].VertexData_b_1 }), gl_in[19].VertexData_c }, VertexData{ float4x4(gl_in[20].VertexData_a_0, gl_in[20].VertexData_a_1, gl_in[20].VertexData_a_2, gl_in[20].VertexData_a_3), spvUnsafeArray({ gl_in[20].VertexData_b_0, gl_in[20].VertexData_b_1 }), gl_in[20].VertexData_c }, VertexData{ float4x4(gl_in[21].VertexData_a_0, gl_in[21].VertexData_a_1, gl_in[21].VertexData_a_2, gl_in[21].VertexData_a_3), spvUnsafeArray({ gl_in[21].VertexData_b_0, gl_in[21].VertexData_b_1 }), gl_in[21].VertexData_c }, VertexData{ float4x4(gl_in[22].VertexData_a_0, gl_in[22].VertexData_a_1, gl_in[22].VertexData_a_2, gl_in[22].VertexData_a_3), spvUnsafeArray({ gl_in[22].VertexData_b_0, gl_in[22].VertexData_b_1 }), gl_in[22].VertexData_c }, VertexData{ float4x4(gl_in[23].VertexData_a_0, gl_in[23].VertexData_a_1, gl_in[23].VertexData_a_2, gl_in[23].VertexData_a_3), spvUnsafeArray({ gl_in[23].VertexData_b_0, gl_in[23].VertexData_b_1 }), gl_in[23].VertexData_c }, VertexData{ float4x4(gl_in[24].VertexData_a_0, gl_in[24].VertexData_a_1, gl_in[24].VertexData_a_2, gl_in[24].VertexData_a_3), spvUnsafeArray({ gl_in[24].VertexData_b_0, gl_in[24].VertexData_b_1 }), gl_in[24].VertexData_c }, VertexData{ float4x4(gl_in[25].VertexData_a_0, gl_in[25].VertexData_a_1, gl_in[25].VertexData_a_2, gl_in[25].VertexData_a_3), spvUnsafeArray({ gl_in[25].VertexData_b_0, gl_in[25].VertexData_b_1 }), gl_in[25].VertexData_c }, VertexData{ float4x4(gl_in[26].VertexData_a_0, gl_in[26].VertexData_a_1, gl_in[26].VertexData_a_2, gl_in[26].VertexData_a_3), spvUnsafeArray({ gl_in[26].VertexData_b_0, gl_in[26].VertexData_b_1 }), gl_in[26].VertexData_c }, VertexData{ float4x4(gl_in[27].VertexData_a_0, gl_in[27].VertexData_a_1, gl_in[27].VertexData_a_2, gl_in[27].VertexData_a_3), spvUnsafeArray({ gl_in[27].VertexData_b_0, gl_in[27].VertexData_b_1 }), gl_in[27].VertexData_c }, VertexData{ float4x4(gl_in[28].VertexData_a_0, gl_in[28].VertexData_a_1, gl_in[28].VertexData_a_2, gl_in[28].VertexData_a_3), spvUnsafeArray({ gl_in[28].VertexData_b_0, gl_in[28].VertexData_b_1 }), gl_in[28].VertexData_c }, VertexData{ float4x4(gl_in[29].VertexData_a_0, gl_in[29].VertexData_a_1, gl_in[29].VertexData_a_2, gl_in[29].VertexData_a_3), spvUnsafeArray({ gl_in[29].VertexData_b_0, gl_in[29].VertexData_b_1 }), gl_in[29].VertexData_c }, VertexData{ float4x4(gl_in[30].VertexData_a_0, gl_in[30].VertexData_a_1, gl_in[30].VertexData_a_2, gl_in[30].VertexData_a_3), spvUnsafeArray({ gl_in[30].VertexData_b_0, gl_in[30].VertexData_b_1 }), gl_in[30].VertexData_c }, VertexData{ float4x4(gl_in[31].VertexData_a_0, gl_in[31].VertexData_a_1, gl_in[31].VertexData_a_2, gl_in[31].VertexData_a_3), spvUnsafeArray({ gl_in[31].VertexData_b_0, gl_in[31].VertexData_b_1 }), gl_in[31].VertexData_c } }); + spvUnsafeArray tmp; + tmp = _19; + int _27 = gl_InvocationID ^ 1; + gl_out[gl_InvocationID].vOutputs = ((tmp[gl_InvocationID].a[1] + tmp[gl_InvocationID].b[1]) + tmp[gl_InvocationID].c) + gl_in[_27].VertexData_c; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array.tesc b/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array.tesc new file mode 100644 index 000000000..d04571ae3 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tesc/load-control-point-array.tesc @@ -0,0 +1,70 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4 vOutputs; +}; + +struct main0_in +{ + float4 vInputs [[attribute(0)]]; +}; + +kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 4) + return; + spvUnsafeArray _15 = spvUnsafeArray({ gl_in[0].vInputs, gl_in[1].vInputs, gl_in[2].vInputs, gl_in[3].vInputs, gl_in[4].vInputs, gl_in[5].vInputs, gl_in[6].vInputs, gl_in[7].vInputs, gl_in[8].vInputs, gl_in[9].vInputs, gl_in[10].vInputs, gl_in[11].vInputs, gl_in[12].vInputs, gl_in[13].vInputs, gl_in[14].vInputs, gl_in[15].vInputs, gl_in[16].vInputs, gl_in[17].vInputs, gl_in[18].vInputs, gl_in[19].vInputs, gl_in[20].vInputs, gl_in[21].vInputs, gl_in[22].vInputs, gl_in[23].vInputs, gl_in[24].vInputs, gl_in[25].vInputs, gl_in[26].vInputs, gl_in[27].vInputs, gl_in[28].vInputs, gl_in[29].vInputs, gl_in[30].vInputs, gl_in[31].vInputs }); + spvUnsafeArray tmp; + tmp = _15; + gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID]; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/input-types.tese b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/input-types.tese index 2a936fce3..75f917e26 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/input-types.tese +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/input-types.tese @@ -65,16 +65,12 @@ struct main0_patchIn out.gl_Position += patchIn.vColors; out.gl_Position += vFoo.a; out.gl_Position += vFoo.b; - Foo vFoos_202; - vFoos_202.a = patchIn.gl_in[0].Foo_a; - vFoos_202.b = patchIn.gl_in[0].Foo_b; - out.gl_Position += vFoos_202.a; - out.gl_Position += vFoos_202.b; - Foo vFoos_216; - vFoos_216.a = patchIn.gl_in[1].Foo_a; - vFoos_216.b = patchIn.gl_in[1].Foo_b; - out.gl_Position += vFoos_216.a; - out.gl_Position += vFoos_216.b; + Foo _203 = Foo{ patchIn.gl_in[0].Foo_a, patchIn.gl_in[0].Foo_b }; + out.gl_Position += _203.a; + out.gl_Position += _203.b; + Foo _217 = Foo{ patchIn.gl_in[1].Foo_a, patchIn.gl_in[1].Foo_b }; + out.gl_Position += _217.a; + out.gl_Position += _217.b; return out; } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/load-control-point-array-of-matrix.tese b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/load-control-point-array-of-matrix.tese new file mode 100644 index 000000000..e4bbeb7ed --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/load-control-point-array-of-matrix.tese @@ -0,0 +1,85 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 vInputs_0 [[attribute(0)]]; + float4 vInputs_1 [[attribute(1)]]; + float4 vInputs_2 [[attribute(2)]]; + float4 vInputs_3 [[attribute(3)]]; +}; + +struct main0_patchIn +{ + float4 vBoo_0 [[attribute(4)]]; + float4 vBoo_1 [[attribute(5)]]; + float4 vBoo_2 [[attribute(6)]]; + float4 vBoo_3 [[attribute(7)]]; + int vIndex [[attribute(8)]]; + patch_control_point gl_in; +}; + +[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]]) +{ + main0_out out = {}; + spvUnsafeArray vBoo = {}; + vBoo[0] = patchIn.vBoo_0; + vBoo[1] = patchIn.vBoo_1; + vBoo[2] = patchIn.vBoo_2; + vBoo[3] = patchIn.vBoo_3; + float4x4 _57 = float4x4(patchIn.gl_in[0u].vInputs_0, patchIn.gl_in[0u].vInputs_1, patchIn.gl_in[0u].vInputs_2, patchIn.gl_in[0u].vInputs_3); + float4x4 _59 = float4x4(patchIn.gl_in[1u].vInputs_0, patchIn.gl_in[1u].vInputs_1, patchIn.gl_in[1u].vInputs_2, patchIn.gl_in[1u].vInputs_3); + float4x4 _47 = _57; + float4x4 _48 = _59; + out.gl_Position = (_47[patchIn.vIndex] + _48[patchIn.vIndex]) + vBoo[patchIn.vIndex]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/load-control-point-array.tese b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/load-control-point-array.tese new file mode 100644 index 000000000..54d7419f5 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/load-control-point-array.tese @@ -0,0 +1,78 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 vInputs [[attribute(0)]]; +}; + +struct main0_patchIn +{ + float4 vBoo_0 [[attribute(1)]]; + float4 vBoo_1 [[attribute(2)]]; + float4 vBoo_2 [[attribute(3)]]; + float4 vBoo_3 [[attribute(4)]]; + int vIndex [[attribute(5)]]; + patch_control_point gl_in; +}; + +[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]]) +{ + main0_out out = {}; + spvUnsafeArray vBoo = {}; + vBoo[0] = patchIn.vBoo_0; + vBoo[1] = patchIn.vBoo_1; + vBoo[2] = patchIn.vBoo_2; + vBoo[3] = patchIn.vBoo_3; + out.gl_Position = (patchIn.gl_in[0u].vInputs + patchIn.gl_in[1u].vInputs) + vBoo[patchIn.vIndex]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/triangle-tess-level.tese b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/triangle-tess-level.tese index 975e62985..6930e1479 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/triangle-tess-level.tese +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/tese/triangle-tess-level.tese @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 gl_Position [[position]]; @@ -16,8 +57,8 @@ struct main0_patchIn [[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], float3 gl_TessCoord [[position_in_patch]]) { main0_out out = {}; - float gl_TessLevelInner[2] = {}; - float gl_TessLevelOuter[4] = {}; + spvUnsafeArray gl_TessLevelInner = {}; + spvUnsafeArray gl_TessLevelOuter = {}; gl_TessLevelInner[0] = patchIn.gl_TessLevel.w; gl_TessLevelOuter[0] = patchIn.gl_TessLevel.x; gl_TessLevelOuter[1] = patchIn.gl_TessLevel.y; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/float-math.invariant-float-math.vert b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/float-math.invariant-float-math.vert new file mode 100644 index 000000000..05e09e2d1 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/float-math.invariant-float-math.vert @@ -0,0 +1,137 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct Matrices +{ + float4x4 vpMatrix; + float4x4 wMatrix; + float4x3 wMatrix4x3; + float3x4 wMatrix3x4; +}; + +struct main0_out +{ + float3 OutNormal [[user(locn0)]]; + float4 OutWorldPos_0 [[user(locn1)]]; + float4 OutWorldPos_1 [[user(locn2)]]; + float4 OutWorldPos_2 [[user(locn3)]]; + float4 OutWorldPos_3 [[user(locn4)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float3 InPos [[attribute(0)]]; + float3 InNormal [[attribute(1)]]; +}; + +template +T spvFMul(T l, T r) +{ + return fma(l, r, T(0)); +} + +template +vec spvFMulVectorMatrix(vec v, matrix m) +{ + vec res = vec(0); + for (uint i = Rows; i > 0; --i) + { + vec tmp(0); + for (uint j = 0; j < Cols; ++j) + { + tmp[j] = m[j][i - 1]; + } + res = fma(tmp, vec(v[i - 1]), res); + } + return res; +} + +template +vec spvFMulMatrixVector(matrix m, vec v) +{ + vec res = vec(0); + for (uint i = Cols; i > 0; --i) + { + res = fma(m[i - 1], vec(v[i - 1]), res); + } + return res; +} + +template +matrix spvFMulMatrixMatrix(matrix l, matrix r) +{ + matrix res; + for (uint i = 0; i < RCols; i++) + { + vec tmp(0); + for (uint j = 0; j < LCols; j++) + { + tmp = fma(vec(r[i][j]), l[j], tmp); + } + res[i] = tmp; + } + return res; +} + +vertex main0_out main0(main0_in in [[stage_in]], constant Matrices& _22 [[buffer(0)]]) +{ + main0_out out = {}; + spvUnsafeArray OutWorldPos = {}; + float4 _37 = float4(in.InPos, 1.0); + out.gl_Position = spvFMulMatrixVector(spvFMulMatrixMatrix(_22.vpMatrix, _22.wMatrix), _37); + OutWorldPos[0] = spvFMulMatrixVector(_22.wMatrix, _37); + OutWorldPos[1] = spvFMulVectorMatrix(_37, _22.wMatrix); + OutWorldPos[2] = spvFMulMatrixVector(_22.wMatrix3x4, in.InPos); + OutWorldPos[3] = spvFMulVectorMatrix(in.InPos, _22.wMatrix4x3); + out.OutNormal = spvFMulMatrixVector(_22.wMatrix, float4(in.InNormal, 0.0)).xyz; + out.OutWorldPos_0 = OutWorldPos[0]; + out.OutWorldPos_1 = OutWorldPos[1]; + out.OutWorldPos_2 = OutWorldPos[2]; + out.OutWorldPos_3 = OutWorldPos[3]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/float-math.vert b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/float-math.vert new file mode 100644 index 000000000..da468c24c --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/float-math.vert @@ -0,0 +1,88 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct Matrices +{ + float4x4 vpMatrix; + float4x4 wMatrix; + float4x3 wMatrix4x3; + float3x4 wMatrix3x4; +}; + +struct main0_out +{ + float3 OutNormal [[user(locn0)]]; + float4 OutWorldPos_0 [[user(locn1)]]; + float4 OutWorldPos_1 [[user(locn2)]]; + float4 OutWorldPos_2 [[user(locn3)]]; + float4 OutWorldPos_3 [[user(locn4)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float3 InPos [[attribute(0)]]; + float3 InNormal [[attribute(1)]]; +}; + +vertex main0_out main0(main0_in in [[stage_in]], constant Matrices& _22 [[buffer(0)]]) +{ + main0_out out = {}; + spvUnsafeArray OutWorldPos = {}; + float4 _37 = float4(in.InPos, 1.0); + out.gl_Position = (_22.vpMatrix * _22.wMatrix) * _37; + OutWorldPos[0] = _22.wMatrix * _37; + OutWorldPos[1] = _37 * _22.wMatrix; + OutWorldPos[2] = _22.wMatrix3x4 * in.InPos; + OutWorldPos[3] = in.InPos * _22.wMatrix4x3; + out.OutNormal = (_22.wMatrix * float4(in.InNormal, 0.0)).xyz; + out.OutWorldPos_0 = OutWorldPos[0]; + out.OutWorldPos_1 = OutWorldPos[1]; + out.OutWorldPos_2 = OutWorldPos[2]; + out.OutWorldPos_3 = OutWorldPos[3]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/functions.vert b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/functions.vert index 7a598d48a..73eaa8b75 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/functions.vert +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/functions.vert @@ -59,20 +59,23 @@ inline T spvFindSMSB(T x) } // Returns the determinant of a 2x2 matrix. -inline float spvDet2x2(float a1, float a2, float b1, float b2) +static inline __attribute__((always_inline)) +float spvDet2x2(float a1, float a2, float b1, float b2) { return a1 * b2 - b1 * a2; } // Returns the determinant of a 3x3 matrix. -inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) +static inline __attribute__((always_inline)) +float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) { return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3); } // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float4x4 spvInverse4x4(float4x4 m) +static inline __attribute__((always_inline)) +float4x4 spvInverse4x4(float4x4 m) { float4x4 adj; // The adjoint matrix (inverse after dividing by determinant) diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/in_out_array_mat.vert b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/in_out_array_mat.vert index 0d6976e26..7a74f49a4 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/in_out_array_mat.vert +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/in_out_array_mat.vert @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct UBO { float4x4 projection; @@ -40,7 +81,7 @@ vertex main0_out main0(main0_in in [[stage_in]], constant UBO& ubo [[buffer(0)]] { main0_out out = {}; float4x4 outTransModel = {}; - float4 colors[3] = {}; + spvUnsafeArray colors = {}; float4x4 inViewMat = {}; colors[0] = in.colors_0; colors[1] = in.colors_1; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.frag index 90d732cc5..4b27f4a3d 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.frag @@ -1,13 +1,54 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Vert { float3x3 wMatrix; float4 wTmp; - float arr[4]; + spvUnsafeArray arr; }; struct main0_out diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.vert b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.vert index 3d97ae6dc..69f271a83 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.vert +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/interface-block-block-composites.vert @@ -1,11 +1,52 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Vert { - float arr[3]; + spvUnsafeArray arr; float3x3 wMatrix; float4 wTmp; }; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/texture_buffer.vert b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/texture_buffer.vert index 677a2f8fd..3b3d92b56 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/texture_buffer.vert +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vert/texture_buffer.vert @@ -11,7 +11,8 @@ struct main0_out }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/opt/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag b/3rdparty/spirv-cross/reference/opt/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag index 23c554940..67895e3e9 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag +++ b/3rdparty/spirv-cross/reference/opt/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 FragColor [[color(0)]]; @@ -20,7 +61,7 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]], constant uint* spvViewMask [[buffer(24)]], texture2d uTex [[texture(0)]], sampler uTexSmplr [[sampler(0)]], uint gl_ViewIndex [[render_target_array_index]]) { main0_out out = {}; - float2 vTex[4] = {}; + spvUnsafeArray vTex = {}; vTex[0] = in.vTex_0; vTex[1] = in.vTex_1; vTex[2] = in.vTex_2; diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag new file mode 100644 index 000000000..e43b7bd37 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag @@ -0,0 +1,356 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_PrimitiveDither +{ + float PrimitiveDither_LODFactor; +}; + +struct type_PrimitiveFade +{ + float2 PrimitiveFade_FadeTimeScaleBias; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[9]; + float4 Material_ScalarExpressions[3]; +}; + +constant float _98 = {}; +constant float _103 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; + float gl_FragDepth [[depth(less)]]; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD6 [[user(locn0)]]; + float4 in_var_TEXCOORD7 [[user(locn1)]]; + float4 in_var_TEXCOORD10_centroid [[user(locn2)]]; + float4 in_var_TEXCOORD11_centroid [[user(locn3)]]; + float4 in_var_TEXCOORD0_0 [[user(locn4)]]; +}; + +static inline __attribute__((always_inline)) +void _353() +{ + discard_fragment(); +} + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_PrimitiveDither& PrimitiveDither [[buffer(1)]], constant type_PrimitiveFade& PrimitiveFade [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture2d Material_Texture2D_0 [[texture(0)]], texture2d Material_Texture2D_3 [[texture(1)]], sampler Material_Texture2D_0Sampler [[sampler(0)]], sampler Material_Texture2D_3Sampler [[sampler(1)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + spvUnsafeArray in_var_TEXCOORD0 = {}; + in_var_TEXCOORD0[0] = in.in_var_TEXCOORD0_0; + float2 _135 = gl_FragCoord.xy - View.View_ViewRectMin.xy; + float4 _140 = float4(_103, _103, gl_FragCoord.z, 1.0) * float4(gl_FragCoord.w); + float4 _144 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0); + float3 _148 = _144.xyz / float3(_144.w); + float3 _149 = _148 - float3(View.View_PreViewTranslation); + float3 _151 = normalize(-_148); + float3 _152 = _151 * float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz); + float _170 = mix(Material.Material_ScalarExpressions[0].y, Material.Material_ScalarExpressions[0].z, fast::min(fast::max(abs(dot(_151, in.in_var_TEXCOORD11_centroid.xyz)), 0.0), 1.0)); + float _172 = 1.0 / _170; + float2 _174 = (float2(Material.Material_ScalarExpressions[0].x) * ((_152.xy * float2(-1.0)) / float2(_152.z))) * float2(_172); + float _180_copy; + float2 _183; + _183 = float2(0.0); + float _188; + float _211; + float2 _212; + float _180 = 1.0; + int _185 = 0; + float _187 = 1.0; + float _189 = 1.0; + for (;;) + { + if (float(_185) < (floor(_170) + 2.0)) + { + _188 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _183), gradient2d(dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)), dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)))).y; + if (_180 < _188) + { + float _201 = _188 - _180; + float _203 = _201 / ((_189 - _187) + _201); + _211 = (_189 * _203) + (_180 * (1.0 - _203)); + _212 = _183 - (float2(_203) * _174); + break; + } + _180_copy = _180; + _180 -= _172; + _183 += _174; + _185++; + _187 = _188; + _189 = _180_copy; + continue; + } + else + { + _211 = _98; + _212 = _183; + break; + } + } + float4 _218 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _212.xy), bias(View.View_MaterialTextureMipBias)); + float2 _229 = _135 + float2(View.View_TemporalAAParams.x); + float _237 = float((uint(_229.x) + (2u * uint(_229.y))) % 5u); + float2 _238 = _135 * float2(0.015625); + float4 _242 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float4 _254 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float3 _272 = float3(_212, (1.0 - _211) * Material.Material_ScalarExpressions[0].x); + float2 _275 = dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _276 = abs(_275); + float3 _279 = dfdx(_149); + float2 _283 = dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _284 = abs(_283); + float3 _287 = dfdy(_149); + if (PrimitiveDither.PrimitiveDither_LODFactor != 0.0) + { + if (abs(PrimitiveDither.PrimitiveDither_LODFactor) > 0.001000000047497451305389404296875) + { + float _317 = fract(cos(dot(floor(gl_FragCoord.xy), float2(347.834503173828125, 3343.28369140625))) * 1000.0); + if ((float((PrimitiveDither.PrimitiveDither_LODFactor < 0.0) ? ((PrimitiveDither.PrimitiveDither_LODFactor + 1.0) > _317) : (PrimitiveDither.PrimitiveDither_LODFactor < _317)) - 0.001000000047497451305389404296875) < 0.0) + { + _353(); + } + } + } + if ((((_218.z + ((fast::min(fast::max(1.0 - (_218.x * Material.Material_ScalarExpressions[2].y), 0.0), 1.0) + ((_237 + (_242.x * Material.Material_ScalarExpressions[2].z)) * 0.16666667163372039794921875)) + (-0.5))) * ((fast::clamp((View.View_RealTime * PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.x) + PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.y, 0.0, 1.0) + ((_237 + _254.x) * 0.16666667163372039794921875)) + (-0.5))) - 0.33329999446868896484375) < 0.0) + { + _353(); + } + float2 _351 = ((((in.in_var_TEXCOORD6.xy / float2(in.in_var_TEXCOORD6.w)) - View.View_TemporalAAJitter.xy) - ((in.in_var_TEXCOORD7.xy / float2(in.in_var_TEXCOORD7.w)) - View.View_TemporalAAJitter.zw)) * float2(0.2495000064373016357421875)) + float2(0.49999237060546875); + out.gl_FragDepth = fast::min(_140.z / (_140.w + (sqrt(dot(_272, _272)) / (fast::max(sqrt(dot(_276, _276)) / sqrt(dot(_279, _279)), sqrt(dot(_284, _284)) / sqrt(dot(_287, _287))) / abs(dot(float3x3(View.View_ViewToTranslatedWorld[0].xyz, View.View_ViewToTranslatedWorld[1].xyz, View.View_ViewToTranslatedWorld[2].xyz) * float3(0.0, 0.0, 1.0), _151))))), gl_FragCoord.z); + out.out_var_SV_Target0 = float4(_351.x, _351.y, float2(0.0).x, float2(0.0).y); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag new file mode 100644 index 000000000..7f593efee --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag @@ -0,0 +1,314 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Globals +{ + float3 SoftTransitionScale; + float4x4 ShadowViewProjectionMatrices[6]; + float InvShadowmapResolution; + float ShadowFadeFraction; + float ShadowSharpen; + float4 LightPositionAndInvRadius; + float2 ProjectionDepthBiasParameters; + float4 PointLightDepthBiasAndProjParameters; +}; + +constant float4 _453 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +fragment main0_out main0(constant type_View& View [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d SceneTexturesStruct_SceneDepthTexture [[texture(0)]], texture2d SceneTexturesStruct_GBufferATexture [[texture(1)]], texture2d SceneTexturesStruct_GBufferBTexture [[texture(2)]], texture2d SceneTexturesStruct_GBufferDTexture [[texture(3)]], depthcube ShadowDepthCubeTexture [[texture(4)]], texture2d SSProfilesTexture [[texture(5)]], sampler SceneTexturesStruct_SceneDepthTextureSampler [[sampler(0)]], sampler SceneTexturesStruct_GBufferATextureSampler [[sampler(1)]], sampler SceneTexturesStruct_GBufferBTextureSampler [[sampler(2)]], sampler SceneTexturesStruct_GBufferDTextureSampler [[sampler(3)]], sampler ShadowDepthTextureSampler [[sampler(4)]], sampler ShadowDepthCubeTextureSampler [[sampler(5)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + float2 _114 = gl_FragCoord.xy * View.View_BufferSizeAndInvSize.zw; + float4 _118 = SceneTexturesStruct_SceneDepthTexture.sample(SceneTexturesStruct_SceneDepthTextureSampler, _114, level(0.0)); + float _119 = _118.x; + float _133 = ((_119 * View.View_InvDeviceZToWorldZTransform.x) + View.View_InvDeviceZToWorldZTransform.y) + (1.0 / ((_119 * View.View_InvDeviceZToWorldZTransform.z) - View.View_InvDeviceZToWorldZTransform.w)); + float4 _147 = View.View_ScreenToWorld * float4(((_114 - View.View_ScreenPositionScaleBias.wz) / View.View_ScreenPositionScaleBias.xy) * float2(_133), _133, 1.0); + float3 _148 = _147.xyz; + float3 _152 = _Globals.LightPositionAndInvRadius.xyz - _148; + float _158 = length(_152); + bool _160 = (_158 * _Globals.LightPositionAndInvRadius.w) < 1.0; + float _207; + if (_160) + { + float3 _165 = abs(_152); + float _166 = _165.x; + float _167 = _165.y; + float _168 = _165.z; + float _170 = fast::max(_166, fast::max(_167, _168)); + int _189; + if (_170 == _166) + { + _189 = (_166 == _152.x) ? 0 : 1; + } + else + { + int _185; + if (_170 == _167) + { + _185 = (_167 == _152.y) ? 2 : 3; + } + else + { + _185 = (_168 == _152.z) ? 4 : 5; + } + _189 = _185; + } + float4 _196 = _Globals.ShadowViewProjectionMatrices[_189] * float4(_147.xyz, 1.0); + float _198 = _196.w; + _207 = ShadowDepthCubeTexture.sample_compare(ShadowDepthCubeTextureSampler, (_152 / float3(_158)), (_196.z / _198) + ((-_Globals.PointLightDepthBiasAndProjParameters.x) / _198), level(0.0)); + } + else + { + _207 = 1.0; + } + float _213 = fast::clamp(((_207 - 0.5) * _Globals.ShadowSharpen) + 0.5, 0.0, 1.0); + float _218 = sqrt(mix(1.0, _213 * _213, _Globals.ShadowFadeFraction)); + float4 _219 = _453; + _219.z = _218; + float3 _236 = normalize((SceneTexturesStruct_GBufferATexture.sample(SceneTexturesStruct_GBufferATextureSampler, _114, level(0.0)).xyz * float3(2.0)) - float3(1.0)); + uint _240 = uint(round(SceneTexturesStruct_GBufferBTexture.sample(SceneTexturesStruct_GBufferBTextureSampler, _114, level(0.0)).w * 255.0)); + bool _248 = (_240 & 15u) == 5u; + float _448; + if (_248) + { + float4 _260 = SSProfilesTexture.read(uint2(int3(1, int(uint((select(float4(0.0), SceneTexturesStruct_GBufferDTexture.sample(SceneTexturesStruct_GBufferDTextureSampler, _114, level(0.0)), bool4(!(((_240 & 4294967280u) & 16u) != 0u))).x * 255.0) + 0.5)), 0).xy), 0); + float _263 = _260.y * 0.5; + float _274 = pow(fast::clamp(dot(-(_152 * float3(rsqrt(dot(_152, _152)))), _236), 0.0, 1.0), 1.0); + float _445; + if (_160) + { + float3 _278 = _152 / float3(_158); + float3 _280 = normalize(cross(_278, float3(0.0, 0.0, 1.0))); + float3 _284 = float3(_Globals.InvShadowmapResolution); + float3 _285 = _280 * _284; + float3 _286 = cross(_280, _278) * _284; + float3 _287 = abs(_278); + float _288 = _287.x; + float _289 = _287.y; + float _290 = _287.z; + float _292 = fast::max(_288, fast::max(_289, _290)); + int _311; + if (_292 == _288) + { + _311 = (_288 == _278.x) ? 0 : 1; + } + else + { + int _307; + if (_292 == _289) + { + _307 = (_289 == _278.y) ? 2 : 3; + } + else + { + _307 = (_290 == _278.z) ? 4 : 5; + } + _311 = _307; + } + float4 _318 = _Globals.ShadowViewProjectionMatrices[_311] * float4(_148 - (_236 * float3(_263)), 1.0); + float _323 = _260.x * (10.0 / _Globals.LightPositionAndInvRadius.w); + float _329 = (1.0 / (((_318.z / _318.w) * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w; + float _342 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, (_278 + (_286 * float3(2.5))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _364 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(2.3776409626007080078125))) + (_286 * float3(0.77254199981689453125))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _387 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(1.46946299076080322265625))) + (_286 * float3(-2.0225429534912109375))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _410 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(-1.46946299076080322265625))) + (_286 * float3(-2.02254199981689453125))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _433 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(-2.3776409626007080078125))) + (_286 * float3(0.772543013095855712890625))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + _445 = (((((fast::clamp(abs((_342 > 0.0) ? (_342 + _263) : fast::max(0.0, (_342 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25) + (fast::clamp(abs((_364 > 0.0) ? (_364 + _263) : fast::max(0.0, (_364 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) + (fast::clamp(abs((_387 > 0.0) ? (_387 + _263) : fast::max(0.0, (_387 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) + (fast::clamp(abs((_410 > 0.0) ? (_410 + _263) : fast::max(0.0, (_410 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) + (fast::clamp(abs((_433 > 0.0) ? (_433 + _263) : fast::max(0.0, (_433 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) * 0.20000000298023223876953125; + } + else + { + _445 = 1.0; + } + _448 = 1.0 - (_445 * 0.20000000298023223876953125); + } + else + { + _448 = 1.0; + } + float4 _451 = float4(float3(1.0).x, float3(1.0).y, _219.z, float3(1.0).z); + _451.w = _248 ? sqrt(_448) : _218; + out.out_var_SV_Target0 = _451; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag new file mode 100644 index 000000000..165b511b3 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag @@ -0,0 +1,1364 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_Globals +{ + float4 MappingPolynomial; + float3 InverseGamma; + float4 ColorMatrixR_ColorCurveCd1; + float4 ColorMatrixG_ColorCurveCd3Cm3; + float4 ColorMatrixB_ColorCurveCm2; + float4 ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3; + float4 ColorCurve_Ch1_Ch2; + float4 ColorShadow_Luma; + float4 ColorShadow_Tint1; + float4 ColorShadow_Tint2; + float FilmSlope; + float FilmToe; + float FilmShoulder; + float FilmBlackClip; + float FilmWhiteClip; + packed_float3 ColorScale; + float4 OverlayColor; + float WhiteTemp; + float WhiteTint; + float4 ColorSaturation; + float4 ColorContrast; + float4 ColorGamma; + float4 ColorGain; + float4 ColorOffset; + float4 ColorSaturationShadows; + float4 ColorContrastShadows; + float4 ColorGammaShadows; + float4 ColorGainShadows; + float4 ColorOffsetShadows; + float4 ColorSaturationMidtones; + float4 ColorContrastMidtones; + float4 ColorGammaMidtones; + float4 ColorGainMidtones; + float4 ColorOffsetMidtones; + float4 ColorSaturationHighlights; + float4 ColorContrastHighlights; + float4 ColorGammaHighlights; + float4 ColorGainHighlights; + float4 ColorOffsetHighlights; + float ColorCorrectionShadowsMax; + float ColorCorrectionHighlightsMin; + uint OutputDevice; + uint OutputGamut; + float BlueCorrection; + float ExpandGamut; +}; + +constant spvUnsafeArray _475 = spvUnsafeArray({ -4.0, -4.0, -3.1573765277862548828125, -0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875 }); +constant spvUnsafeArray _476 = spvUnsafeArray({ -0.718548238277435302734375, 2.0810306072235107421875, 3.66812419891357421875, 4.0, 4.0, 4.0 }); +constant spvUnsafeArray _479 = spvUnsafeArray({ -4.97062206268310546875, -3.0293781757354736328125, -2.1261999607086181640625, -1.5104999542236328125, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _480 = spvUnsafeArray({ 0.80891323089599609375, 1.19108676910400390625, 1.5683000087738037109375, 1.94830000400543212890625, 2.308300018310546875, 2.63840007781982421875, 2.85949993133544921875, 2.9872608184814453125, 3.0127391815185546875, 3.0127391815185546875 }); +constant spvUnsafeArray _482 = spvUnsafeArray({ -2.3010299205780029296875, -2.3010299205780029296875, -1.9312000274658203125, -1.5204999446868896484375, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _483 = spvUnsafeArray({ 0.801995217800140380859375, 1.19800484180450439453125, 1.5943000316619873046875, 1.99730002880096435546875, 2.3782999515533447265625, 2.7683999538421630859375, 3.0515000820159912109375, 3.2746293544769287109375, 3.32743072509765625, 3.32743072509765625 }); + +constant float3 _391 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + float2 in_var_TEXCOORD0 [[user(locn0), center_no_perspective]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globals [[buffer(0)]], uint gl_Layer [[render_target_array_index]]) +{ + main0_out out = {}; + float3x3 _546 = float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * float3x3(float3(1.01303005218505859375, 0.0061053098179399967193603515625, -0.014971000142395496368408203125), float3(0.0076982299797236919403076171875, 0.99816501140594482421875, -0.005032029934227466583251953125), float3(-0.0028413101099431514739990234375, 0.0046851597726345062255859375, 0.92450702190399169921875)); + float3x3 _547 = _546 * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _548 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(0.98722398281097412109375, -0.0061132698319852352142333984375, 0.01595330052077770233154296875), float3(-0.007598360069096088409423828125, 1.00186002254486083984375, 0.0053300200961530208587646484375), float3(0.003072570078074932098388671875, -0.0050959498621523380279541015625, 1.0816800594329833984375)); + float3x3 _549 = _548 * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)); + float3x3 _550 = float3x3(float3(0.952552378177642822265625, 0.0, 9.25), float3(0.3439664542675018310546875, 0.728166103363037109375, -0.07213254272937774658203125), float3(0.0, 0.0, 1.00882518291473388671875)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _551 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625)); + float3x3 _576; + for (;;) + { + if (_Globals.OutputGamut == 1u) + { + _576 = _548 * float3x3(float3(2.493396282196044921875, -0.931345880031585693359375, -0.4026944935321807861328125), float3(-0.829486787319183349609375, 1.76265966892242431640625, 0.02362460084259510040283203125), float3(0.0358506999909877777099609375, -0.076182700693607330322265625, 0.957014024257659912109375)); + break; + } + else + { + if (_Globals.OutputGamut == 2u) + { + _576 = _548 * float3x3(float3(1.71660840511322021484375, -0.3556621074676513671875, -0.253360092639923095703125), float3(-0.666682898998260498046875, 1.61647760868072509765625, 0.01576850004494190216064453125), float3(0.017642199993133544921875, -0.04277630150318145751953125, 0.94222867488861083984375)); + break; + } + else + { + if (_Globals.OutputGamut == 3u) + { + _576 = float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625)); + break; + } + else + { + if (_Globals.OutputGamut == 4u) + { + _576 = float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 1.0)); + break; + } + else + { + _576 = _549; + break; + } + } + } + } + } + float3 _577 = float4((in.in_var_TEXCOORD0 - float2(0.015625)) * float2(1.03225803375244140625), float(gl_Layer) * 0.0322580635547637939453125, 0.0).xyz; + float3 _599; + if (_Globals.OutputDevice >= 3u) + { + float3 _591 = pow(_577, float3(0.0126833133399486541748046875)); + _599 = pow(fast::max(float3(0.0), _591 - float3(0.8359375)) / (float3(18.8515625) - (float3(18.6875) * _591)), float3(6.277394771575927734375)) * float3(10000.0); + } + else + { + _599 = (exp2((_577 - float3(0.434017598628997802734375)) * float3(14.0)) * float3(0.180000007152557373046875)) - (exp2(float3(-6.0762462615966796875)) * float3(0.180000007152557373046875)); + } + float _602 = _Globals.WhiteTemp * 1.00055634975433349609375; + float _616 = (_602 <= 7000.0) ? (0.24406300485134124755859375 + ((99.1100006103515625 + ((2967800.0 - (4604438528.0 / _Globals.WhiteTemp)) / _602)) / _602)) : (0.23703999817371368408203125 + ((247.4799957275390625 + ((1901800.0 - (2005284352.0 / _Globals.WhiteTemp)) / _602)) / _602)); + float _633 = ((0.860117733478546142578125 + (0.00015411825734190642833709716796875 * _Globals.WhiteTemp)) + ((1.2864121856637211749330163002014e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 + (0.0008424202096648514270782470703125 * _Globals.WhiteTemp)) + ((7.0814513719597016461193561553955e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _644 = ((0.317398726940155029296875 + (4.25 * _Globals.WhiteTemp)) + ((4.2048167614439080352894961833954e-08 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 - (2.8974181986995972692966461181641e-05 * _Globals.WhiteTemp)) + ((1.6145605741257895715534687042236e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _649 = ((2.0 * _633) - (8.0 * _644)) + 4.0; + float2 _653 = float2((3.0 * _633) / _649, (2.0 * _644) / _649); + float2 _660 = normalize(float2(_633, _644)); + float _665 = _633 + (((-_660.y) * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _669 = _644 + ((_660.x * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _674 = ((2.0 * _665) - (8.0 * _669)) + 4.0; + float2 _680 = select(float2(_616, ((((-3.0) * _616) * _616) + (2.86999988555908203125 * _616)) - 0.2750000059604644775390625), _653, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _665) / _674, (2.0 * _669) / _674) - _653); + float _681 = _680.x; + float _682 = _680.y; + float _683 = fast::max(_682, 1.0000000133514319600180897396058e-10); + float3 _685 = _391; + _685.x = _681 / _683; + float3 _686 = _685; + _686.y = 1.0; + float3 _690 = _686; + _690.z = ((1.0 - _681) - _682) / _683; + float3 _693 = _391; + _693.x = 0.950455963611602783203125; + float3 _694 = _693; + _694.y = 1.0; + float3 _696 = _694; + _696.z = 1.0890576839447021484375; + float3 _697 = _690 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _698 = _696 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _717 = (_599 * ((float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * ((float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)) * float3x3(float3(_698.x / _697.x, 0.0, 0.0), float3(0.0, _698.y / _697.y, 0.0), float3(0.0, 0.0, _698.z / _697.z))) * float3x3(float3(0.986992895603179931640625, -0.14705429971218109130859375, 0.15996269881725311279296875), float3(0.4323053061962127685546875, 0.518360316753387451171875, 0.049291200935840606689453125), float3(-0.00852870009839534759521484375, 0.0400427989661693572998046875, 0.968486726284027099609375)))) * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)))) * _547; + float3 _745; + if (_Globals.ColorShadow_Tint2.w != 0.0) + { + float _724 = dot(_717, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float3 _727 = (_717 / float3(_724)) - float3(1.0); + _745 = mix(_717, _717 * (_549 * (float3x3(float3(0.544169127941131591796875, 0.23959259688854217529296875, 0.16669429838657379150390625), float3(0.23946559429168701171875, 0.702153027057647705078125, 0.058381401002407073974609375), float3(-0.0023439000360667705535888671875, 0.0361833982169628143310546875, 1.05521833896636962890625)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)))), float3((1.0 - exp2((-4.0) * dot(_727, _727))) * (1.0 - exp2((((-4.0) * _Globals.ExpandGamut) * _724) * _724)))); + } + else + { + _745 = _717; + } + float _746 = dot(_745, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float4 _751 = _Globals.ColorSaturationShadows * _Globals.ColorSaturation; + float4 _756 = _Globals.ColorContrastShadows * _Globals.ColorContrast; + float4 _761 = _Globals.ColorGammaShadows * _Globals.ColorGamma; + float4 _766 = _Globals.ColorGainShadows * _Globals.ColorGain; + float4 _771 = _Globals.ColorOffsetShadows + _Globals.ColorOffset; + float3 _772 = float3(_746); + float _804 = smoothstep(0.0, _Globals.ColorCorrectionShadowsMax, _746); + float4 _808 = _Globals.ColorSaturationHighlights * _Globals.ColorSaturation; + float4 _811 = _Globals.ColorContrastHighlights * _Globals.ColorContrast; + float4 _814 = _Globals.ColorGammaHighlights * _Globals.ColorGamma; + float4 _817 = _Globals.ColorGainHighlights * _Globals.ColorGain; + float4 _820 = _Globals.ColorOffsetHighlights + _Globals.ColorOffset; + float _852 = smoothstep(_Globals.ColorCorrectionHighlightsMin, 1.0, _746); + float4 _855 = _Globals.ColorSaturationMidtones * _Globals.ColorSaturation; + float4 _858 = _Globals.ColorContrastMidtones * _Globals.ColorContrast; + float4 _861 = _Globals.ColorGammaMidtones * _Globals.ColorGamma; + float4 _864 = _Globals.ColorGainMidtones * _Globals.ColorGain; + float4 _867 = _Globals.ColorOffsetMidtones + _Globals.ColorOffset; + float3 _905 = ((((pow(pow(fast::max(float3(0.0), mix(_772, _745, _751.xyz * float3(_751.w))) * float3(5.5555553436279296875), _756.xyz * float3(_756.w)) * float3(0.180000007152557373046875), float3(1.0) / (_761.xyz * float3(_761.w))) * (_766.xyz * float3(_766.w))) + (_771.xyz + float3(_771.w))) * float3(1.0 - _804)) + (((pow(pow(fast::max(float3(0.0), mix(_772, _745, _855.xyz * float3(_855.w))) * float3(5.5555553436279296875), _858.xyz * float3(_858.w)) * float3(0.180000007152557373046875), float3(1.0) / (_861.xyz * float3(_861.w))) * (_864.xyz * float3(_864.w))) + (_867.xyz + float3(_867.w))) * float3(_804 - _852))) + (((pow(pow(fast::max(float3(0.0), mix(_772, _745, _808.xyz * float3(_808.w))) * float3(5.5555553436279296875), _811.xyz * float3(_811.w)) * float3(0.180000007152557373046875), float3(1.0) / (_814.xyz * float3(_814.w))) * (_817.xyz * float3(_817.w))) + (_820.xyz + float3(_820.w))) * float3(_852)); + float3 _906 = _905 * _549; + float3 _914 = float3(_Globals.BlueCorrection); + float3 _916 = mix(_905, _905 * ((_551 * float3x3(float3(0.940437257289886474609375, -0.01830687932670116424560546875, 0.07786960899829864501953125), float3(0.008378696627914905548095703125, 0.82866001129150390625, 0.162961304187774658203125), float3(0.0005471261101774871349334716796875, -0.00088337459601461887359619140625, 1.00033628940582275390625))) * _550), _914) * _551; + float _917 = _916.x; + float _918 = _916.y; + float _920 = _916.z; + float _923 = fast::max(fast::max(_917, _918), _920); + float _928 = (fast::max(_923, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_917, _918), _920), 1.0000000133514319600180897396058e-10)) / fast::max(_923, 0.00999999977648258209228515625); + float _941 = ((_920 + _918) + _917) + (1.75 * sqrt(((_920 * (_920 - _918)) + (_918 * (_918 - _917))) + (_917 * (_917 - _920)))); + float _942 = _941 * 0.3333333432674407958984375; + float _943 = _928 - 0.4000000059604644775390625; + float _948 = fast::max(1.0 - abs(_943 * 2.5), 0.0); + float _956 = (1.0 + (float(int(sign(_943 * 5.0))) * (1.0 - (_948 * _948)))) * 0.02500000037252902984619140625; + float _969; + if (_942 <= 0.053333334624767303466796875) + { + _969 = _956; + } + else + { + float _968; + if (_942 >= 0.1599999964237213134765625) + { + _968 = 0.0; + } + else + { + _968 = _956 * ((0.23999999463558197021484375 / _941) - 0.5); + } + _969 = _968; + } + float3 _972 = _916 * float3(1.0 + _969); + float _973 = _972.x; + float _974 = _972.y; + float _976 = _972.z; + float _990; + if ((_973 == _974) && (_974 == _976)) + { + _990 = 0.0; + } + else + { + _990 = 57.2957763671875 * atan2(sqrt(3.0) * (_974 - _976), ((2.0 * _973) - _974) - _976); + } + float _995; + if (_990 < 0.0) + { + _995 = _990 + 360.0; + } + else + { + _995 = _990; + } + float _996 = fast::clamp(_995, 0.0, 360.0); + float _1001; + if (_996 > 180.0) + { + _1001 = _996 - 360.0; + } + else + { + _1001 = _996; + } + float _1005 = smoothstep(0.0, 1.0, 1.0 - abs(_1001 * 0.01481481455266475677490234375)); + float3 _1012 = _972; + _1012.x = _973 + ((((_1005 * _1005) * _928) * (0.02999999932944774627685546875 - _973)) * 0.180000007152557373046875); + float3 _1014 = fast::max(float3(0.0), _1012 * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375))); + float _1023 = (1.0 + _Globals.FilmBlackClip) - _Globals.FilmToe; + float _1026 = 1.0 + _Globals.FilmWhiteClip; + float _1029 = _1026 - _Globals.FilmShoulder; + float _1056; + if (_Globals.FilmToe > 0.800000011920928955078125) + { + _1056 = ((0.819999992847442626953125 - _Globals.FilmToe) / _Globals.FilmSlope) + (log(0.180000007152557373046875) / log(10.0)); + } + else + { + float _1035 = (0.180000007152557373046875 + _Globals.FilmBlackClip) / _1023; + _1056 = (log(0.180000007152557373046875) / log(10.0)) - ((0.5 * log(_1035 / (2.0 - _1035))) * (_1023 / _Globals.FilmSlope)); + } + float _1061 = ((1.0 - _Globals.FilmToe) / _Globals.FilmSlope) - _1056; + float _1063 = (_Globals.FilmShoulder / _Globals.FilmSlope) - _1061; + float _1065 = log(10.0); + float3 _1067 = log(mix(float3(dot(_1014, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1014, float3(0.959999978542327880859375))) / float3(_1065); + float3 _1071 = float3(_Globals.FilmSlope) * (_1067 + float3(_1061)); + float3 _1079 = float3(_1056); + float3 _1080 = _1067 - _1079; + float3 _1092 = float3(_1063); + float3 _1106 = fast::clamp(_1080 / float3(_1063 - _1056), float3(0.0), float3(1.0)); + float3 _1110 = select(_1106, float3(1.0) - _1106, bool3(_1063 < _1056)); + float3 _1115 = mix(select(_1071, float3(-_Globals.FilmBlackClip) + (float3(2.0 * _1023) / (float3(1.0) + exp(float3(((-2.0) * _Globals.FilmSlope) / _1023) * _1080))), _1067 < _1079), select(_1071, float3(_1026) - (float3(2.0 * _1029) / (float3(1.0) + exp(float3((2.0 * _Globals.FilmSlope) / _1029) * (_1067 - _1092)))), _1067 > _1092), ((float3(3.0) - (float3(2.0) * _1110)) * _1110) * _1110); + float3 _1119 = fast::max(float3(0.0), mix(float3(dot(_1115, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1115, float3(0.930000007152557373046875))); + float3 _1189; + if (_Globals.ColorShadow_Tint2.w == 0.0) + { + float3 _1131 = _391; + _1131.x = dot(_906, _Globals.ColorMatrixR_ColorCurveCd1.xyz); + float3 _1136 = _1131; + _1136.y = dot(_906, _Globals.ColorMatrixG_ColorCurveCd3Cm3.xyz); + float3 _1141 = _1136; + _1141.z = dot(_906, _Globals.ColorMatrixB_ColorCurveCm2.xyz); + float3 _1157 = fast::max(float3(0.0), _1141 * (_Globals.ColorShadow_Tint1.xyz + (_Globals.ColorShadow_Tint2.xyz * float3(1.0 / (dot(_906, _Globals.ColorShadow_Luma.xyz) + 1.0))))); + float3 _1162 = fast::max(float3(0.0), _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx - _1157); + float3 _1164 = fast::max(_1157, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz); + _1189 = ((((_1164 * _Globals.ColorCurve_Ch1_Ch2.xxx) + _Globals.ColorCurve_Ch1_Ch2.yyy) * (float3(1.0) / (_1164 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.www))) + ((fast::clamp(_1157, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz) * _Globals.ColorMatrixB_ColorCurveCm2.www) + (((_1162 * _Globals.ColorMatrixR_ColorCurveCd1.www) * (float3(1.0) / (_1162 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.yyy))) + _Globals.ColorMatrixG_ColorCurveCd3Cm3.www))) - float3(0.00200000009499490261077880859375); + } + else + { + _1189 = fast::max(float3(0.0), mix(_1119, _1119 * ((_551 * float3x3(float3(1.06317996978759765625, 0.02339559979736804962158203125, -0.08657260239124298095703125), float3(-0.010633699595928192138671875, 1.2063200473785400390625, -0.1956900060176849365234375), float3(-0.0005908869788981974124908447265625, 0.00105247995816171169281005859375, 0.999538004398345947265625))) * _550), _914) * _549); + } + float3 _1218 = pow(fast::max(float3(0.0), mix((((float3(_Globals.MappingPolynomial.x) * (_1189 * _1189)) + (float3(_Globals.MappingPolynomial.y) * _1189)) + float3(_Globals.MappingPolynomial.z)) * float3(_Globals.ColorScale), _Globals.OverlayColor.xyz, float3(_Globals.OverlayColor.w))), float3(_Globals.InverseGamma.y)); + float3 _3001; + if (_Globals.OutputDevice == 0u) + { + float _2961 = _1218.x; + float _2973; + for (;;) + { + if (_2961 < 0.00313066993840038776397705078125) + { + _2973 = _2961 * 12.9200000762939453125; + break; + } + _2973 = (pow(_2961, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _2974 = _1218.y; + float _2986; + for (;;) + { + if (_2974 < 0.00313066993840038776397705078125) + { + _2986 = _2974 * 12.9200000762939453125; + break; + } + _2986 = (pow(_2974, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _2987 = _1218.z; + float _2999; + for (;;) + { + if (_2987 < 0.00313066993840038776397705078125) + { + _2999 = _2987 * 12.9200000762939453125; + break; + } + _2999 = (pow(_2987, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + _3001 = float3(_2973, _2986, _2999); + } + else + { + float3 _2960; + if (_Globals.OutputDevice == 1u) + { + float3 _2953 = fast::max(float3(6.1035199905745685100555419921875e-05), (_1218 * _547) * _576); + _2960 = fast::min(_2953 * float3(4.5), (pow(fast::max(_2953, float3(0.017999999225139617919921875)), float3(0.449999988079071044921875)) * float3(1.09899997711181640625)) - float3(0.098999999463558197021484375)); + } + else + { + float3 _2950; + if ((_Globals.OutputDevice == 3u) || (_Globals.OutputDevice == 5u)) + { + float3 _2100 = (_906 * float3(1.5)) * (_546 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _2101 = _2100.x; + float _2102 = _2100.y; + float _2104 = _2100.z; + float _2107 = fast::max(fast::max(_2101, _2102), _2104); + float _2112 = (fast::max(_2107, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_2101, _2102), _2104), 1.0000000133514319600180897396058e-10)) / fast::max(_2107, 0.00999999977648258209228515625); + float _2125 = ((_2104 + _2102) + _2101) + (1.75 * sqrt(((_2104 * (_2104 - _2102)) + (_2102 * (_2102 - _2101))) + (_2101 * (_2101 - _2104)))); + float _2126 = _2125 * 0.3333333432674407958984375; + float _2127 = _2112 - 0.4000000059604644775390625; + float _2132 = fast::max(1.0 - abs(_2127 * 2.5), 0.0); + float _2140 = (1.0 + (float(int(sign(_2127 * 5.0))) * (1.0 - (_2132 * _2132)))) * 0.02500000037252902984619140625; + float _2153; + if (_2126 <= 0.053333334624767303466796875) + { + _2153 = _2140; + } + else + { + float _2152; + if (_2126 >= 0.1599999964237213134765625) + { + _2152 = 0.0; + } + else + { + _2152 = _2140 * ((0.23999999463558197021484375 / _2125) - 0.5); + } + _2153 = _2152; + } + float3 _2156 = _2100 * float3(1.0 + _2153); + float _2157 = _2156.x; + float _2158 = _2156.y; + float _2160 = _2156.z; + float _2174; + if ((_2157 == _2158) && (_2158 == _2160)) + { + _2174 = 0.0; + } + else + { + _2174 = 57.2957763671875 * atan2(sqrt(3.0) * (_2158 - _2160), ((2.0 * _2157) - _2158) - _2160); + } + float _2179; + if (_2174 < 0.0) + { + _2179 = _2174 + 360.0; + } + else + { + _2179 = _2174; + } + float _2180 = fast::clamp(_2179, 0.0, 360.0); + float _2185; + if (_2180 > 180.0) + { + _2185 = _2180 - 360.0; + } + else + { + _2185 = _2180; + } + float _2235; + if ((_2185 > (-67.5)) && (_2185 < 67.5)) + { + float _2192 = (_2185 - (-67.5)) * 0.0296296291053295135498046875; + int _2193 = int(_2192); + float _2195 = _2192 - float(_2193); + float _2196 = _2195 * _2195; + float _2197 = _2196 * _2195; + float _2234; + if (_2193 == 3) + { + _2234 = (((_2197 * (-0.16666667163372039794921875)) + (_2196 * 0.5)) + (_2195 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _2227; + if (_2193 == 2) + { + _2227 = ((_2197 * 0.5) + (_2196 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _2222; + if (_2193 == 1) + { + _2222 = (((_2197 * (-0.5)) + (_2196 * 0.5)) + (_2195 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _2215; + if (_2193 == 0) + { + _2215 = _2197 * 0.16666667163372039794921875; + } + else + { + _2215 = 0.0; + } + _2222 = _2215; + } + _2227 = _2222; + } + _2234 = _2227; + } + _2235 = _2234; + } + else + { + _2235 = 0.0; + } + float3 _2242 = _2156; + _2242.x = _2157 + ((((_2235 * 1.5) * _2112) * (0.02999999932944774627685546875 - _2157)) * 0.180000007152557373046875); + float3 _2245 = fast::clamp(fast::clamp(_2242, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _2248 = mix(float3(dot(_2245, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _2245, float3(0.959999978542327880859375)); + float _2249 = _2248.x; + float _2253 = 0.17999999225139617919921875 * exp2(18.0); + float _2255 = exp2(-14.0); + float _2258 = log((_2249 <= 0.0) ? _2255 : _2249) / _1065; + float _2260 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1065; + float _2327; + if (_2258 <= _2260) + { + _2327 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2267 = log(0.180000007152557373046875) / _1065; + float _2324; + if ((_2258 > _2260) && (_2258 < _2267)) + { + float _2307 = (3.0 * (_2258 - _2260)) / (_2267 - _2260); + int _2308 = int(_2307); + float _2310 = _2307 - float(_2308); + _2324 = dot(float3(_2310 * _2310, _2310, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2308], _475[_2308 + 1], _475[_2308 + 2])); + } + else + { + float _2275 = log(_2253) / _1065; + float _2303; + if ((_2258 >= _2267) && (_2258 < _2275)) + { + float _2286 = (3.0 * (_2258 - _2267)) / (_2275 - _2267); + int _2287 = int(_2286); + float _2289 = _2286 - float(_2287); + _2303 = dot(float3(_2289 * _2289, _2289, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2287], _476[_2287 + 1], _476[_2287 + 2])); + } + else + { + _2303 = log(10000.0) / _1065; + } + _2324 = _2303; + } + _2327 = _2324; + } + float3 _2329 = _391; + _2329.x = pow(10.0, _2327); + float _2330 = _2248.y; + float _2334 = log((_2330 <= 0.0) ? _2255 : _2330) / _1065; + float _2401; + if (_2334 <= _2260) + { + _2401 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2341 = log(0.180000007152557373046875) / _1065; + float _2398; + if ((_2334 > _2260) && (_2334 < _2341)) + { + float _2381 = (3.0 * (_2334 - _2260)) / (_2341 - _2260); + int _2382 = int(_2381); + float _2384 = _2381 - float(_2382); + _2398 = dot(float3(_2384 * _2384, _2384, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2382], _475[_2382 + 1], _475[_2382 + 2])); + } + else + { + float _2349 = log(_2253) / _1065; + float _2377; + if ((_2334 >= _2341) && (_2334 < _2349)) + { + float _2360 = (3.0 * (_2334 - _2341)) / (_2349 - _2341); + int _2361 = int(_2360); + float _2363 = _2360 - float(_2361); + _2377 = dot(float3(_2363 * _2363, _2363, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2361], _476[_2361 + 1], _476[_2361 + 2])); + } + else + { + _2377 = log(10000.0) / _1065; + } + _2398 = _2377; + } + _2401 = _2398; + } + float3 _2403 = _2329; + _2403.y = pow(10.0, _2401); + float _2404 = _2248.z; + float _2408 = log((_2404 <= 0.0) ? _2255 : _2404) / _1065; + float _2475; + if (_2408 <= _2260) + { + _2475 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2415 = log(0.180000007152557373046875) / _1065; + float _2472; + if ((_2408 > _2260) && (_2408 < _2415)) + { + float _2455 = (3.0 * (_2408 - _2260)) / (_2415 - _2260); + int _2456 = int(_2455); + float _2458 = _2455 - float(_2456); + _2472 = dot(float3(_2458 * _2458, _2458, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2456], _475[_2456 + 1], _475[_2456 + 2])); + } + else + { + float _2423 = log(_2253) / _1065; + float _2451; + if ((_2408 >= _2415) && (_2408 < _2423)) + { + float _2434 = (3.0 * (_2408 - _2415)) / (_2423 - _2415); + int _2435 = int(_2434); + float _2437 = _2434 - float(_2435); + _2451 = dot(float3(_2437 * _2437, _2437, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2435], _476[_2435 + 1], _476[_2435 + 2])); + } + else + { + _2451 = log(10000.0) / _1065; + } + _2472 = _2451; + } + _2475 = _2472; + } + float3 _2477 = _2403; + _2477.z = pow(10.0, _2475); + float3 _2479 = (_2477 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _2481 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _2485 = log((_2481 <= 0.0) ? _2255 : _2481) / _1065; + float _2552; + if (_2485 <= _2260) + { + _2552 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2492 = log(0.180000007152557373046875) / _1065; + float _2549; + if ((_2485 > _2260) && (_2485 < _2492)) + { + float _2532 = (3.0 * (_2485 - _2260)) / (_2492 - _2260); + int _2533 = int(_2532); + float _2535 = _2532 - float(_2533); + _2549 = dot(float3(_2535 * _2535, _2535, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2533], _475[_2533 + 1], _475[_2533 + 2])); + } + else + { + float _2500 = log(_2253) / _1065; + float _2528; + if ((_2485 >= _2492) && (_2485 < _2500)) + { + float _2511 = (3.0 * (_2485 - _2492)) / (_2500 - _2492); + int _2512 = int(_2511); + float _2514 = _2511 - float(_2512); + _2528 = dot(float3(_2514 * _2514, _2514, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2512], _476[_2512 + 1], _476[_2512 + 2])); + } + else + { + _2528 = log(10000.0) / _1065; + } + _2549 = _2528; + } + _2552 = _2549; + } + float _2555 = log(0.180000007152557373046875) / _1065; + float _2611; + if (_2555 <= _2260) + { + _2611 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2608; + if ((_2555 > _2260) && (_2555 < _2555)) + { + _2608 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(-0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875)).z; + } + else + { + float _2568 = log(_2253) / _1065; + float _2596; + if ((_2555 >= _2555) && (_2555 < _2568)) + { + float _2579 = (3.0 * (_2555 - _2555)) / (_2568 - _2555); + int _2580 = int(_2579); + float _2582 = _2579 - float(_2580); + _2596 = dot(float3(_2582 * _2582, _2582, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2580], _476[_2580 + 1], _476[_2580 + 2])); + } + else + { + _2596 = log(10000.0) / _1065; + } + _2608 = _2596; + } + _2611 = _2608; + } + float _2612 = pow(10.0, _2611); + float _2614 = 0.17999999225139617919921875 * pow(2.0, 10.0); + float _2618 = log((_2614 <= 0.0) ? _2255 : _2614) / _1065; + float _2683; + if (_2618 <= _2260) + { + _2683 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2680; + if ((_2618 > _2260) && (_2618 < _2555)) + { + float _2663 = (3.0 * (_2618 - _2260)) / (_2555 - _2260); + int _2664 = int(_2663); + float _2666 = _2663 - float(_2664); + _2680 = dot(float3(_2666 * _2666, _2666, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2664], _475[_2664 + 1], _475[_2664 + 2])); + } + else + { + float _2631 = log(_2253) / _1065; + float _2659; + if ((_2618 >= _2555) && (_2618 < _2631)) + { + float _2642 = (3.0 * (_2618 - _2555)) / (_2631 - _2555); + int _2643 = int(_2642); + float _2645 = _2642 - float(_2643); + _2659 = dot(float3(_2645 * _2645, _2645, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2643], _476[_2643 + 1], _476[_2643 + 2])); + } + else + { + _2659 = log(10000.0) / _1065; + } + _2680 = _2659; + } + _2683 = _2680; + } + float _2684 = pow(10.0, _2683); + float _2685 = _2479.x; + float _2689 = log((_2685 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2685) / _1065; + float _2690 = log(pow(10.0, _2552)); + float _2691 = _2690 / _1065; + float _2768; + if (_2689 <= _2691) + { + _2768 = (_2689 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1065) - ((3.0 * _2690) / _1065)); + } + else + { + float _2698 = log(_2612) / _1065; + float _2760; + if ((_2689 > _2691) && (_2689 < _2698)) + { + float _2743 = (7.0 * (_2689 - _2691)) / (_2698 - _2691); + int _2744 = int(_2743); + float _2746 = _2743 - float(_2744); + _2760 = dot(float3(_2746 * _2746, _2746, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_479[_2744], _479[_2744 + 1], _479[_2744 + 2])); + } + else + { + float _2705 = log(_2684); + float _2706 = _2705 / _1065; + float _2739; + if ((_2689 >= _2698) && (_2689 < _2706)) + { + float _2722 = (7.0 * (_2689 - _2698)) / (_2706 - _2698); + int _2723 = int(_2722); + float _2725 = _2722 - float(_2723); + _2739 = dot(float3(_2725 * _2725, _2725, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_480[_2723], _480[_2723 + 1], _480[_2723 + 2])); + } + else + { + _2739 = (_2689 * 0.0599999986588954925537109375) + ((log(1000.0) / _1065) - ((0.0599999986588954925537109375 * _2705) / _1065)); + } + _2760 = _2739; + } + _2768 = _2760; + } + float3 _2770 = _391; + _2770.x = pow(10.0, _2768); + float _2771 = _2479.y; + float _2775 = log((_2771 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2771) / _1065; + float _2852; + if (_2775 <= _2691) + { + _2852 = (_2775 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1065) - ((3.0 * _2690) / _1065)); + } + else + { + float _2782 = log(_2612) / _1065; + float _2844; + if ((_2775 > _2691) && (_2775 < _2782)) + { + float _2827 = (7.0 * (_2775 - _2691)) / (_2782 - _2691); + int _2828 = int(_2827); + float _2830 = _2827 - float(_2828); + _2844 = dot(float3(_2830 * _2830, _2830, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_479[_2828], _479[_2828 + 1], _479[_2828 + 2])); + } + else + { + float _2789 = log(_2684); + float _2790 = _2789 / _1065; + float _2823; + if ((_2775 >= _2782) && (_2775 < _2790)) + { + float _2806 = (7.0 * (_2775 - _2782)) / (_2790 - _2782); + int _2807 = int(_2806); + float _2809 = _2806 - float(_2807); + _2823 = dot(float3(_2809 * _2809, _2809, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_480[_2807], _480[_2807 + 1], _480[_2807 + 2])); + } + else + { + _2823 = (_2775 * 0.0599999986588954925537109375) + ((log(1000.0) / _1065) - ((0.0599999986588954925537109375 * _2789) / _1065)); + } + _2844 = _2823; + } + _2852 = _2844; + } + float3 _2854 = _2770; + _2854.y = pow(10.0, _2852); + float _2855 = _2479.z; + float _2859 = log((_2855 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2855) / _1065; + float _2936; + if (_2859 <= _2691) + { + _2936 = (_2859 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1065) - ((3.0 * _2690) / _1065)); + } + else + { + float _2866 = log(_2612) / _1065; + float _2928; + if ((_2859 > _2691) && (_2859 < _2866)) + { + float _2911 = (7.0 * (_2859 - _2691)) / (_2866 - _2691); + int _2912 = int(_2911); + float _2914 = _2911 - float(_2912); + _2928 = dot(float3(_2914 * _2914, _2914, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_479[_2912], _479[_2912 + 1], _479[_2912 + 2])); + } + else + { + float _2873 = log(_2684); + float _2874 = _2873 / _1065; + float _2907; + if ((_2859 >= _2866) && (_2859 < _2874)) + { + float _2890 = (7.0 * (_2859 - _2866)) / (_2874 - _2866); + int _2891 = int(_2890); + float _2893 = _2890 - float(_2891); + _2907 = dot(float3(_2893 * _2893, _2893, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_480[_2891], _480[_2891 + 1], _480[_2891 + 2])); + } + else + { + _2907 = (_2859 * 0.0599999986588954925537109375) + ((log(1000.0) / _1065) - ((0.0599999986588954925537109375 * _2873) / _1065)); + } + _2928 = _2907; + } + _2936 = _2928; + } + float3 _2938 = _2854; + _2938.z = pow(10.0, _2936); + float3 _2942 = pow(((_2938 - float3(3.5073844628641381859779357910156e-05)) * _576) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _2950 = pow((float3(0.8359375) + (float3(18.8515625) * _2942)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _2942))), float3(78.84375)); + } + else + { + float3 _2097; + if ((_Globals.OutputDevice == 4u) || (_Globals.OutputDevice == 6u)) + { + float3 _1263 = (_906 * float3(1.5)) * (_546 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _1264 = _1263.x; + float _1265 = _1263.y; + float _1267 = _1263.z; + float _1270 = fast::max(fast::max(_1264, _1265), _1267); + float _1275 = (fast::max(_1270, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_1264, _1265), _1267), 1.0000000133514319600180897396058e-10)) / fast::max(_1270, 0.00999999977648258209228515625); + float _1288 = ((_1267 + _1265) + _1264) + (1.75 * sqrt(((_1267 * (_1267 - _1265)) + (_1265 * (_1265 - _1264))) + (_1264 * (_1264 - _1267)))); + float _1289 = _1288 * 0.3333333432674407958984375; + float _1290 = _1275 - 0.4000000059604644775390625; + float _1295 = fast::max(1.0 - abs(_1290 * 2.5), 0.0); + float _1303 = (1.0 + (float(int(sign(_1290 * 5.0))) * (1.0 - (_1295 * _1295)))) * 0.02500000037252902984619140625; + float _1316; + if (_1289 <= 0.053333334624767303466796875) + { + _1316 = _1303; + } + else + { + float _1315; + if (_1289 >= 0.1599999964237213134765625) + { + _1315 = 0.0; + } + else + { + _1315 = _1303 * ((0.23999999463558197021484375 / _1288) - 0.5); + } + _1316 = _1315; + } + float3 _1319 = _1263 * float3(1.0 + _1316); + float _1320 = _1319.x; + float _1321 = _1319.y; + float _1323 = _1319.z; + float _1337; + if ((_1320 == _1321) && (_1321 == _1323)) + { + _1337 = 0.0; + } + else + { + _1337 = 57.2957763671875 * atan2(sqrt(3.0) * (_1321 - _1323), ((2.0 * _1320) - _1321) - _1323); + } + float _1342; + if (_1337 < 0.0) + { + _1342 = _1337 + 360.0; + } + else + { + _1342 = _1337; + } + float _1343 = fast::clamp(_1342, 0.0, 360.0); + float _1348; + if (_1343 > 180.0) + { + _1348 = _1343 - 360.0; + } + else + { + _1348 = _1343; + } + float _1398; + if ((_1348 > (-67.5)) && (_1348 < 67.5)) + { + float _1355 = (_1348 - (-67.5)) * 0.0296296291053295135498046875; + int _1356 = int(_1355); + float _1358 = _1355 - float(_1356); + float _1359 = _1358 * _1358; + float _1360 = _1359 * _1358; + float _1397; + if (_1356 == 3) + { + _1397 = (((_1360 * (-0.16666667163372039794921875)) + (_1359 * 0.5)) + (_1358 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _1390; + if (_1356 == 2) + { + _1390 = ((_1360 * 0.5) + (_1359 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _1385; + if (_1356 == 1) + { + _1385 = (((_1360 * (-0.5)) + (_1359 * 0.5)) + (_1358 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _1378; + if (_1356 == 0) + { + _1378 = _1360 * 0.16666667163372039794921875; + } + else + { + _1378 = 0.0; + } + _1385 = _1378; + } + _1390 = _1385; + } + _1397 = _1390; + } + _1398 = _1397; + } + else + { + _1398 = 0.0; + } + float3 _1405 = _1319; + _1405.x = _1320 + ((((_1398 * 1.5) * _1275) * (0.02999999932944774627685546875 - _1320)) * 0.180000007152557373046875); + float3 _1408 = fast::clamp(fast::clamp(_1405, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _1411 = mix(float3(dot(_1408, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1408, float3(0.959999978542327880859375)); + float _1412 = _1411.x; + float _1416 = 0.17999999225139617919921875 * exp2(18.0); + float _1418 = exp2(-14.0); + float _1421 = log((_1412 <= 0.0) ? _1418 : _1412) / _1065; + float _1423 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1065; + float _1490; + if (_1421 <= _1423) + { + _1490 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1430 = log(0.180000007152557373046875) / _1065; + float _1487; + if ((_1421 > _1423) && (_1421 < _1430)) + { + float _1470 = (3.0 * (_1421 - _1423)) / (_1430 - _1423); + int _1471 = int(_1470); + float _1473 = _1470 - float(_1471); + _1487 = dot(float3(_1473 * _1473, _1473, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1471], _475[_1471 + 1], _475[_1471 + 2])); + } + else + { + float _1438 = log(_1416) / _1065; + float _1466; + if ((_1421 >= _1430) && (_1421 < _1438)) + { + float _1449 = (3.0 * (_1421 - _1430)) / (_1438 - _1430); + int _1450 = int(_1449); + float _1452 = _1449 - float(_1450); + _1466 = dot(float3(_1452 * _1452, _1452, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1450], _476[_1450 + 1], _476[_1450 + 2])); + } + else + { + _1466 = log(10000.0) / _1065; + } + _1487 = _1466; + } + _1490 = _1487; + } + float3 _1492 = _391; + _1492.x = pow(10.0, _1490); + float _1493 = _1411.y; + float _1497 = log((_1493 <= 0.0) ? _1418 : _1493) / _1065; + float _1564; + if (_1497 <= _1423) + { + _1564 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1504 = log(0.180000007152557373046875) / _1065; + float _1561; + if ((_1497 > _1423) && (_1497 < _1504)) + { + float _1544 = (3.0 * (_1497 - _1423)) / (_1504 - _1423); + int _1545 = int(_1544); + float _1547 = _1544 - float(_1545); + _1561 = dot(float3(_1547 * _1547, _1547, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1545], _475[_1545 + 1], _475[_1545 + 2])); + } + else + { + float _1512 = log(_1416) / _1065; + float _1540; + if ((_1497 >= _1504) && (_1497 < _1512)) + { + float _1523 = (3.0 * (_1497 - _1504)) / (_1512 - _1504); + int _1524 = int(_1523); + float _1526 = _1523 - float(_1524); + _1540 = dot(float3(_1526 * _1526, _1526, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1524], _476[_1524 + 1], _476[_1524 + 2])); + } + else + { + _1540 = log(10000.0) / _1065; + } + _1561 = _1540; + } + _1564 = _1561; + } + float3 _1566 = _1492; + _1566.y = pow(10.0, _1564); + float _1567 = _1411.z; + float _1571 = log((_1567 <= 0.0) ? _1418 : _1567) / _1065; + float _1638; + if (_1571 <= _1423) + { + _1638 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1578 = log(0.180000007152557373046875) / _1065; + float _1635; + if ((_1571 > _1423) && (_1571 < _1578)) + { + float _1618 = (3.0 * (_1571 - _1423)) / (_1578 - _1423); + int _1619 = int(_1618); + float _1621 = _1618 - float(_1619); + _1635 = dot(float3(_1621 * _1621, _1621, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1619], _475[_1619 + 1], _475[_1619 + 2])); + } + else + { + float _1586 = log(_1416) / _1065; + float _1614; + if ((_1571 >= _1578) && (_1571 < _1586)) + { + float _1597 = (3.0 * (_1571 - _1578)) / (_1586 - _1578); + int _1598 = int(_1597); + float _1600 = _1597 - float(_1598); + _1614 = dot(float3(_1600 * _1600, _1600, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1598], _476[_1598 + 1], _476[_1598 + 2])); + } + else + { + _1614 = log(10000.0) / _1065; + } + _1635 = _1614; + } + _1638 = _1635; + } + float3 _1640 = _1566; + _1640.z = pow(10.0, _1638); + float3 _1642 = (_1640 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _1644 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _1648 = log((_1644 <= 0.0) ? _1418 : _1644) / _1065; + float _1715; + if (_1648 <= _1423) + { + _1715 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1655 = log(0.180000007152557373046875) / _1065; + float _1712; + if ((_1648 > _1423) && (_1648 < _1655)) + { + float _1695 = (3.0 * (_1648 - _1423)) / (_1655 - _1423); + int _1696 = int(_1695); + float _1698 = _1695 - float(_1696); + _1712 = dot(float3(_1698 * _1698, _1698, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1696], _475[_1696 + 1], _475[_1696 + 2])); + } + else + { + float _1663 = log(_1416) / _1065; + float _1691; + if ((_1648 >= _1655) && (_1648 < _1663)) + { + float _1674 = (3.0 * (_1648 - _1655)) / (_1663 - _1655); + int _1675 = int(_1674); + float _1677 = _1674 - float(_1675); + _1691 = dot(float3(_1677 * _1677, _1677, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1675], _476[_1675 + 1], _476[_1675 + 2])); + } + else + { + _1691 = log(10000.0) / _1065; + } + _1712 = _1691; + } + _1715 = _1712; + } + float _1718 = log(0.180000007152557373046875) / _1065; + float _1774; + if (_1718 <= _1423) + { + _1774 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1771; + if ((_1718 > _1423) && (_1718 < _1718)) + { + _1771 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(-0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875)).z; + } + else + { + float _1731 = log(_1416) / _1065; + float _1759; + if ((_1718 >= _1718) && (_1718 < _1731)) + { + float _1742 = (3.0 * (_1718 - _1718)) / (_1731 - _1718); + int _1743 = int(_1742); + float _1745 = _1742 - float(_1743); + _1759 = dot(float3(_1745 * _1745, _1745, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1743], _476[_1743 + 1], _476[_1743 + 2])); + } + else + { + _1759 = log(10000.0) / _1065; + } + _1771 = _1759; + } + _1774 = _1771; + } + float _1775 = pow(10.0, _1774); + float _1777 = 0.17999999225139617919921875 * pow(2.0, 11.0); + float _1781 = log((_1777 <= 0.0) ? _1418 : _1777) / _1065; + float _1846; + if (_1781 <= _1423) + { + _1846 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1843; + if ((_1781 > _1423) && (_1781 < _1718)) + { + float _1826 = (3.0 * (_1781 - _1423)) / (_1718 - _1423); + int _1827 = int(_1826); + float _1829 = _1826 - float(_1827); + _1843 = dot(float3(_1829 * _1829, _1829, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1827], _475[_1827 + 1], _475[_1827 + 2])); + } + else + { + float _1794 = log(_1416) / _1065; + float _1822; + if ((_1781 >= _1718) && (_1781 < _1794)) + { + float _1805 = (3.0 * (_1781 - _1718)) / (_1794 - _1718); + int _1806 = int(_1805); + float _1808 = _1805 - float(_1806); + _1822 = dot(float3(_1808 * _1808, _1808, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1806], _476[_1806 + 1], _476[_1806 + 2])); + } + else + { + _1822 = log(10000.0) / _1065; + } + _1843 = _1822; + } + _1846 = _1843; + } + float _1847 = pow(10.0, _1846); + float _1848 = _1642.x; + float _1852 = log((_1848 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _1848) / _1065; + float _1854 = log(pow(10.0, _1715)) / _1065; + float _1926; + if (_1852 <= _1854) + { + _1926 = log(0.004999999888241291046142578125) / _1065; + } + else + { + float _1861 = log(_1775) / _1065; + float _1923; + if ((_1852 > _1854) && (_1852 < _1861)) + { + float _1906 = (7.0 * (_1852 - _1854)) / (_1861 - _1854); + int _1907 = int(_1906); + float _1909 = _1906 - float(_1907); + _1923 = dot(float3(_1909 * _1909, _1909, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_482[_1907], _482[_1907 + 1], _482[_1907 + 2])); + } + else + { + float _1868 = log(_1847); + float _1869 = _1868 / _1065; + float _1902; + if ((_1852 >= _1861) && (_1852 < _1869)) + { + float _1885 = (7.0 * (_1852 - _1861)) / (_1869 - _1861); + int _1886 = int(_1885); + float _1888 = _1885 - float(_1886); + _1902 = dot(float3(_1888 * _1888, _1888, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_483[_1886], _483[_1886 + 1], _483[_1886 + 2])); + } + else + { + _1902 = (_1852 * 0.119999997317790985107421875) + ((log(2000.0) / _1065) - ((0.119999997317790985107421875 * _1868) / _1065)); + } + _1923 = _1902; + } + _1926 = _1923; + } + float3 _1928 = _391; + _1928.x = pow(10.0, _1926); + float _1929 = _1642.y; + float _1933 = log((_1929 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _1929) / _1065; + float _2005; + if (_1933 <= _1854) + { + _2005 = log(0.004999999888241291046142578125) / _1065; + } + else + { + float _1940 = log(_1775) / _1065; + float _2002; + if ((_1933 > _1854) && (_1933 < _1940)) + { + float _1985 = (7.0 * (_1933 - _1854)) / (_1940 - _1854); + int _1986 = int(_1985); + float _1988 = _1985 - float(_1986); + _2002 = dot(float3(_1988 * _1988, _1988, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_482[_1986], _482[_1986 + 1], _482[_1986 + 2])); + } + else + { + float _1947 = log(_1847); + float _1948 = _1947 / _1065; + float _1981; + if ((_1933 >= _1940) && (_1933 < _1948)) + { + float _1964 = (7.0 * (_1933 - _1940)) / (_1948 - _1940); + int _1965 = int(_1964); + float _1967 = _1964 - float(_1965); + _1981 = dot(float3(_1967 * _1967, _1967, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_483[_1965], _483[_1965 + 1], _483[_1965 + 2])); + } + else + { + _1981 = (_1933 * 0.119999997317790985107421875) + ((log(2000.0) / _1065) - ((0.119999997317790985107421875 * _1947) / _1065)); + } + _2002 = _1981; + } + _2005 = _2002; + } + float3 _2007 = _1928; + _2007.y = pow(10.0, _2005); + float _2008 = _1642.z; + float _2012 = log((_2008 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2008) / _1065; + float _2084; + if (_2012 <= _1854) + { + _2084 = log(0.004999999888241291046142578125) / _1065; + } + else + { + float _2019 = log(_1775) / _1065; + float _2081; + if ((_2012 > _1854) && (_2012 < _2019)) + { + float _2064 = (7.0 * (_2012 - _1854)) / (_2019 - _1854); + int _2065 = int(_2064); + float _2067 = _2064 - float(_2065); + _2081 = dot(float3(_2067 * _2067, _2067, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_482[_2065], _482[_2065 + 1], _482[_2065 + 2])); + } + else + { + float _2026 = log(_1847); + float _2027 = _2026 / _1065; + float _2060; + if ((_2012 >= _2019) && (_2012 < _2027)) + { + float _2043 = (7.0 * (_2012 - _2019)) / (_2027 - _2019); + int _2044 = int(_2043); + float _2046 = _2043 - float(_2044); + _2060 = dot(float3(_2046 * _2046, _2046, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_483[_2044], _483[_2044 + 1], _483[_2044 + 2])); + } + else + { + _2060 = (_2012 * 0.119999997317790985107421875) + ((log(2000.0) / _1065) - ((0.119999997317790985107421875 * _2026) / _1065)); + } + _2081 = _2060; + } + _2084 = _2081; + } + float3 _2086 = _2007; + _2086.z = pow(10.0, _2084); + float3 _2089 = pow((_2086 * _576) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _2097 = pow((float3(0.8359375) + (float3(18.8515625) * _2089)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _2089))), float3(78.84375)); + } + else + { + float3 _1260; + if (_Globals.OutputDevice == 7u) + { + float3 _1252 = pow(((_906 * _547) * _576) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _1260 = pow((float3(0.8359375) + (float3(18.8515625) * _1252)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _1252))), float3(78.84375)); + } + else + { + _1260 = pow((_1218 * _547) * _576, float3(_Globals.InverseGamma.z)); + } + _2097 = _1260; + } + _2950 = _2097; + } + _2960 = _2950; + } + _3001 = _2960; + } + float3 _3002 = _3001 * float3(0.95238101482391357421875); + float4 _3004 = float4(_3002.x, _3002.y, _3002.z, float4(0.0).w); + _3004.w = 0.0; + out.out_var_SV_Target0 = _3004; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag new file mode 100644 index 000000000..feb976b81 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag @@ -0,0 +1,1413 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_Globals +{ + float4 MappingPolynomial; + float3 InverseGamma; + float4 ColorMatrixR_ColorCurveCd1; + float4 ColorMatrixG_ColorCurveCd3Cm3; + float4 ColorMatrixB_ColorCurveCm2; + float4 ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3; + float4 ColorCurve_Ch1_Ch2; + float4 ColorShadow_Luma; + float4 ColorShadow_Tint1; + float4 ColorShadow_Tint2; + float FilmSlope; + float FilmToe; + float FilmShoulder; + float FilmBlackClip; + float FilmWhiteClip; + float4 LUTWeights[5]; + float3 ColorScale; + float4 OverlayColor; + float WhiteTemp; + float WhiteTint; + float4 ColorSaturation; + float4 ColorContrast; + float4 ColorGamma; + float4 ColorGain; + float4 ColorOffset; + float4 ColorSaturationShadows; + float4 ColorContrastShadows; + float4 ColorGammaShadows; + float4 ColorGainShadows; + float4 ColorOffsetShadows; + float4 ColorSaturationMidtones; + float4 ColorContrastMidtones; + float4 ColorGammaMidtones; + float4 ColorGainMidtones; + float4 ColorOffsetMidtones; + float4 ColorSaturationHighlights; + float4 ColorContrastHighlights; + float4 ColorGammaHighlights; + float4 ColorGainHighlights; + float4 ColorOffsetHighlights; + float ColorCorrectionShadowsMax; + float ColorCorrectionHighlightsMin; + uint OutputDevice; + uint OutputGamut; + float BlueCorrection; + float ExpandGamut; +}; + +constant spvUnsafeArray _499 = spvUnsafeArray({ -4.0, -4.0, -3.1573765277862548828125, -0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875 }); +constant spvUnsafeArray _500 = spvUnsafeArray({ -0.718548238277435302734375, 2.0810306072235107421875, 3.66812419891357421875, 4.0, 4.0, 4.0 }); +constant spvUnsafeArray _503 = spvUnsafeArray({ -4.97062206268310546875, -3.0293781757354736328125, -2.1261999607086181640625, -1.5104999542236328125, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _504 = spvUnsafeArray({ 0.80891323089599609375, 1.19108676910400390625, 1.5683000087738037109375, 1.94830000400543212890625, 2.308300018310546875, 2.63840007781982421875, 2.85949993133544921875, 2.9872608184814453125, 3.0127391815185546875, 3.0127391815185546875 }); +constant spvUnsafeArray _506 = spvUnsafeArray({ -2.3010299205780029296875, -2.3010299205780029296875, -1.9312000274658203125, -1.5204999446868896484375, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _507 = spvUnsafeArray({ 0.801995217800140380859375, 1.19800484180450439453125, 1.5943000316619873046875, 1.99730002880096435546875, 2.3782999515533447265625, 2.7683999538421630859375, 3.0515000820159912109375, 3.2746293544769287109375, 3.32743072509765625, 3.32743072509765625 }); + +constant float3 _523 = {}; +constant float3 _3123 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + float2 in_var_TEXCOORD0 [[user(locn0), center_no_perspective]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globals [[buffer(0)]], texture2d Texture1 [[texture(0)]], sampler Texture1Sampler [[sampler(0)]], uint gl_Layer [[render_target_array_index]]) +{ + main0_out out = {}; + float3x3 _572 = float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * float3x3(float3(1.01303005218505859375, 0.0061053098179399967193603515625, -0.014971000142395496368408203125), float3(0.0076982299797236919403076171875, 0.99816501140594482421875, -0.005032029934227466583251953125), float3(-0.0028413101099431514739990234375, 0.0046851597726345062255859375, 0.92450702190399169921875)); + float3x3 _573 = _572 * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _574 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(0.98722398281097412109375, -0.0061132698319852352142333984375, 0.01595330052077770233154296875), float3(-0.007598360069096088409423828125, 1.00186002254486083984375, 0.0053300200961530208587646484375), float3(0.003072570078074932098388671875, -0.0050959498621523380279541015625, 1.0816800594329833984375)); + float3x3 _575 = _574 * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)); + float3x3 _576 = float3x3(float3(0.952552378177642822265625, 0.0, 9.25), float3(0.3439664542675018310546875, 0.728166103363037109375, -0.07213254272937774658203125), float3(0.0, 0.0, 1.00882518291473388671875)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _577 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625)); + float3x3 _602; + for (;;) + { + if (_Globals.OutputGamut == 1u) + { + _602 = _574 * float3x3(float3(2.493396282196044921875, -0.931345880031585693359375, -0.4026944935321807861328125), float3(-0.829486787319183349609375, 1.76265966892242431640625, 0.02362460084259510040283203125), float3(0.0358506999909877777099609375, -0.076182700693607330322265625, 0.957014024257659912109375)); + break; + } + else + { + if (_Globals.OutputGamut == 2u) + { + _602 = _574 * float3x3(float3(1.71660840511322021484375, -0.3556621074676513671875, -0.253360092639923095703125), float3(-0.666682898998260498046875, 1.61647760868072509765625, 0.01576850004494190216064453125), float3(0.017642199993133544921875, -0.04277630150318145751953125, 0.94222867488861083984375)); + break; + } + else + { + if (_Globals.OutputGamut == 3u) + { + _602 = float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625)); + break; + } + else + { + if (_Globals.OutputGamut == 4u) + { + _602 = float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 1.0)); + break; + } + else + { + _602 = _575; + break; + } + } + } + } + } + float3 _603 = float4((in.in_var_TEXCOORD0 - float2(0.015625)) * float2(1.03225803375244140625), float(gl_Layer) * 0.0322580635547637939453125, 0.0).xyz; + float3 _625; + if (_Globals.OutputDevice >= 3u) + { + float3 _617 = pow(_603, float3(0.0126833133399486541748046875)); + _625 = pow(fast::max(float3(0.0), _617 - float3(0.8359375)) / (float3(18.8515625) - (float3(18.6875) * _617)), float3(6.277394771575927734375)) * float3(10000.0); + } + else + { + _625 = (exp2((_603 - float3(0.434017598628997802734375)) * float3(14.0)) * float3(0.180000007152557373046875)) - (exp2(float3(-6.0762462615966796875)) * float3(0.180000007152557373046875)); + } + float _628 = _Globals.WhiteTemp * 1.00055634975433349609375; + float _642 = (_628 <= 7000.0) ? (0.24406300485134124755859375 + ((99.1100006103515625 + ((2967800.0 - (4604438528.0 / _Globals.WhiteTemp)) / _628)) / _628)) : (0.23703999817371368408203125 + ((247.4799957275390625 + ((1901800.0 - (2005284352.0 / _Globals.WhiteTemp)) / _628)) / _628)); + float _659 = ((0.860117733478546142578125 + (0.00015411825734190642833709716796875 * _Globals.WhiteTemp)) + ((1.2864121856637211749330163002014e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 + (0.0008424202096648514270782470703125 * _Globals.WhiteTemp)) + ((7.0814513719597016461193561553955e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _670 = ((0.317398726940155029296875 + (4.25 * _Globals.WhiteTemp)) + ((4.2048167614439080352894961833954e-08 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 - (2.8974181986995972692966461181641e-05 * _Globals.WhiteTemp)) + ((1.6145605741257895715534687042236e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _675 = ((2.0 * _659) - (8.0 * _670)) + 4.0; + float2 _679 = float2((3.0 * _659) / _675, (2.0 * _670) / _675); + float2 _686 = normalize(float2(_659, _670)); + float _691 = _659 + (((-_686.y) * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _695 = _670 + ((_686.x * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _700 = ((2.0 * _691) - (8.0 * _695)) + 4.0; + float2 _706 = select(float2(_642, ((((-3.0) * _642) * _642) + (2.86999988555908203125 * _642)) - 0.2750000059604644775390625), _679, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _691) / _700, (2.0 * _695) / _700) - _679); + float _707 = _706.x; + float _708 = _706.y; + float _709 = fast::max(_708, 1.0000000133514319600180897396058e-10); + float3 _711 = _523; + _711.x = _707 / _709; + float3 _712 = _711; + _712.y = 1.0; + float3 _716 = _712; + _716.z = ((1.0 - _707) - _708) / _709; + float3 _719 = _523; + _719.x = 0.950455963611602783203125; + float3 _720 = _719; + _720.y = 1.0; + float3 _722 = _720; + _722.z = 1.0890576839447021484375; + float3 _723 = _716 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _724 = _722 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _743 = (_625 * ((float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * ((float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)) * float3x3(float3(_724.x / _723.x, 0.0, 0.0), float3(0.0, _724.y / _723.y, 0.0), float3(0.0, 0.0, _724.z / _723.z))) * float3x3(float3(0.986992895603179931640625, -0.14705429971218109130859375, 0.15996269881725311279296875), float3(0.4323053061962127685546875, 0.518360316753387451171875, 0.049291200935840606689453125), float3(-0.00852870009839534759521484375, 0.0400427989661693572998046875, 0.968486726284027099609375)))) * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)))) * _573; + float3 _771; + if (_Globals.ColorShadow_Tint2.w != 0.0) + { + float _750 = dot(_743, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float3 _753 = (_743 / float3(_750)) - float3(1.0); + _771 = mix(_743, _743 * (_575 * (float3x3(float3(0.544169127941131591796875, 0.23959259688854217529296875, 0.16669429838657379150390625), float3(0.23946559429168701171875, 0.702153027057647705078125, 0.058381401002407073974609375), float3(-0.0023439000360667705535888671875, 0.0361833982169628143310546875, 1.05521833896636962890625)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)))), float3((1.0 - exp2((-4.0) * dot(_753, _753))) * (1.0 - exp2((((-4.0) * _Globals.ExpandGamut) * _750) * _750)))); + } + else + { + _771 = _743; + } + float _772 = dot(_771, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float4 _777 = _Globals.ColorSaturationShadows * _Globals.ColorSaturation; + float4 _782 = _Globals.ColorContrastShadows * _Globals.ColorContrast; + float4 _787 = _Globals.ColorGammaShadows * _Globals.ColorGamma; + float4 _792 = _Globals.ColorGainShadows * _Globals.ColorGain; + float4 _797 = _Globals.ColorOffsetShadows + _Globals.ColorOffset; + float3 _798 = float3(_772); + float _830 = smoothstep(0.0, _Globals.ColorCorrectionShadowsMax, _772); + float4 _834 = _Globals.ColorSaturationHighlights * _Globals.ColorSaturation; + float4 _837 = _Globals.ColorContrastHighlights * _Globals.ColorContrast; + float4 _840 = _Globals.ColorGammaHighlights * _Globals.ColorGamma; + float4 _843 = _Globals.ColorGainHighlights * _Globals.ColorGain; + float4 _846 = _Globals.ColorOffsetHighlights + _Globals.ColorOffset; + float _878 = smoothstep(_Globals.ColorCorrectionHighlightsMin, 1.0, _772); + float4 _881 = _Globals.ColorSaturationMidtones * _Globals.ColorSaturation; + float4 _884 = _Globals.ColorContrastMidtones * _Globals.ColorContrast; + float4 _887 = _Globals.ColorGammaMidtones * _Globals.ColorGamma; + float4 _890 = _Globals.ColorGainMidtones * _Globals.ColorGain; + float4 _893 = _Globals.ColorOffsetMidtones + _Globals.ColorOffset; + float3 _931 = ((((pow(pow(fast::max(float3(0.0), mix(_798, _771, _777.xyz * float3(_777.w))) * float3(5.5555553436279296875), _782.xyz * float3(_782.w)) * float3(0.180000007152557373046875), float3(1.0) / (_787.xyz * float3(_787.w))) * (_792.xyz * float3(_792.w))) + (_797.xyz + float3(_797.w))) * float3(1.0 - _830)) + (((pow(pow(fast::max(float3(0.0), mix(_798, _771, _881.xyz * float3(_881.w))) * float3(5.5555553436279296875), _884.xyz * float3(_884.w)) * float3(0.180000007152557373046875), float3(1.0) / (_887.xyz * float3(_887.w))) * (_890.xyz * float3(_890.w))) + (_893.xyz + float3(_893.w))) * float3(_830 - _878))) + (((pow(pow(fast::max(float3(0.0), mix(_798, _771, _834.xyz * float3(_834.w))) * float3(5.5555553436279296875), _837.xyz * float3(_837.w)) * float3(0.180000007152557373046875), float3(1.0) / (_840.xyz * float3(_840.w))) * (_843.xyz * float3(_843.w))) + (_846.xyz + float3(_846.w))) * float3(_878)); + float3 _932 = _931 * _575; + float3 _940 = float3(_Globals.BlueCorrection); + float3 _942 = mix(_931, _931 * ((_577 * float3x3(float3(0.940437257289886474609375, -0.01830687932670116424560546875, 0.07786960899829864501953125), float3(0.008378696627914905548095703125, 0.82866001129150390625, 0.162961304187774658203125), float3(0.0005471261101774871349334716796875, -0.00088337459601461887359619140625, 1.00033628940582275390625))) * _576), _940) * _577; + float _943 = _942.x; + float _944 = _942.y; + float _946 = _942.z; + float _949 = fast::max(fast::max(_943, _944), _946); + float _954 = (fast::max(_949, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_943, _944), _946), 1.0000000133514319600180897396058e-10)) / fast::max(_949, 0.00999999977648258209228515625); + float _967 = ((_946 + _944) + _943) + (1.75 * sqrt(((_946 * (_946 - _944)) + (_944 * (_944 - _943))) + (_943 * (_943 - _946)))); + float _968 = _967 * 0.3333333432674407958984375; + float _969 = _954 - 0.4000000059604644775390625; + float _974 = fast::max(1.0 - abs(_969 * 2.5), 0.0); + float _982 = (1.0 + (float(int(sign(_969 * 5.0))) * (1.0 - (_974 * _974)))) * 0.02500000037252902984619140625; + float _995; + if (_968 <= 0.053333334624767303466796875) + { + _995 = _982; + } + else + { + float _994; + if (_968 >= 0.1599999964237213134765625) + { + _994 = 0.0; + } + else + { + _994 = _982 * ((0.23999999463558197021484375 / _967) - 0.5); + } + _995 = _994; + } + float3 _998 = _942 * float3(1.0 + _995); + float _999 = _998.x; + float _1000 = _998.y; + float _1002 = _998.z; + float _1016; + if ((_999 == _1000) && (_1000 == _1002)) + { + _1016 = 0.0; + } + else + { + _1016 = 57.2957763671875 * atan2(sqrt(3.0) * (_1000 - _1002), ((2.0 * _999) - _1000) - _1002); + } + float _1021; + if (_1016 < 0.0) + { + _1021 = _1016 + 360.0; + } + else + { + _1021 = _1016; + } + float _1022 = fast::clamp(_1021, 0.0, 360.0); + float _1027; + if (_1022 > 180.0) + { + _1027 = _1022 - 360.0; + } + else + { + _1027 = _1022; + } + float _1031 = smoothstep(0.0, 1.0, 1.0 - abs(_1027 * 0.01481481455266475677490234375)); + float3 _1038 = _998; + _1038.x = _999 + ((((_1031 * _1031) * _954) * (0.02999999932944774627685546875 - _999)) * 0.180000007152557373046875); + float3 _1040 = fast::max(float3(0.0), _1038 * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375))); + float _1049 = (1.0 + _Globals.FilmBlackClip) - _Globals.FilmToe; + float _1052 = 1.0 + _Globals.FilmWhiteClip; + float _1055 = _1052 - _Globals.FilmShoulder; + float _1082; + if (_Globals.FilmToe > 0.800000011920928955078125) + { + _1082 = ((0.819999992847442626953125 - _Globals.FilmToe) / _Globals.FilmSlope) + (log(0.180000007152557373046875) / log(10.0)); + } + else + { + float _1061 = (0.180000007152557373046875 + _Globals.FilmBlackClip) / _1049; + _1082 = (log(0.180000007152557373046875) / log(10.0)) - ((0.5 * log(_1061 / (2.0 - _1061))) * (_1049 / _Globals.FilmSlope)); + } + float _1087 = ((1.0 - _Globals.FilmToe) / _Globals.FilmSlope) - _1082; + float _1089 = (_Globals.FilmShoulder / _Globals.FilmSlope) - _1087; + float _1091 = log(10.0); + float3 _1093 = log(mix(float3(dot(_1040, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1040, float3(0.959999978542327880859375))) / float3(_1091); + float3 _1097 = float3(_Globals.FilmSlope) * (_1093 + float3(_1087)); + float3 _1105 = float3(_1082); + float3 _1106 = _1093 - _1105; + float3 _1118 = float3(_1089); + float3 _1132 = fast::clamp(_1106 / float3(_1089 - _1082), float3(0.0), float3(1.0)); + float3 _1136 = select(_1132, float3(1.0) - _1132, bool3(_1089 < _1082)); + float3 _1141 = mix(select(_1097, float3(-_Globals.FilmBlackClip) + (float3(2.0 * _1049) / (float3(1.0) + exp(float3(((-2.0) * _Globals.FilmSlope) / _1049) * _1106))), _1093 < _1105), select(_1097, float3(_1052) - (float3(2.0 * _1055) / (float3(1.0) + exp(float3((2.0 * _Globals.FilmSlope) / _1055) * (_1093 - _1118)))), _1093 > _1118), ((float3(3.0) - (float3(2.0) * _1136)) * _1136) * _1136); + float3 _1145 = fast::max(float3(0.0), mix(float3(dot(_1141, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1141, float3(0.930000007152557373046875))); + float3 _1215; + if (_Globals.ColorShadow_Tint2.w == 0.0) + { + float3 _1157 = _3123; + _1157.x = dot(_932, _Globals.ColorMatrixR_ColorCurveCd1.xyz); + float3 _1162 = _1157; + _1162.y = dot(_932, _Globals.ColorMatrixG_ColorCurveCd3Cm3.xyz); + float3 _1167 = _1162; + _1167.z = dot(_932, _Globals.ColorMatrixB_ColorCurveCm2.xyz); + float3 _1183 = fast::max(float3(0.0), _1167 * (_Globals.ColorShadow_Tint1.xyz + (_Globals.ColorShadow_Tint2.xyz * float3(1.0 / (dot(_932, _Globals.ColorShadow_Luma.xyz) + 1.0))))); + float3 _1188 = fast::max(float3(0.0), _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx - _1183); + float3 _1190 = fast::max(_1183, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz); + _1215 = ((((_1190 * _Globals.ColorCurve_Ch1_Ch2.xxx) + _Globals.ColorCurve_Ch1_Ch2.yyy) * (float3(1.0) / (_1190 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.www))) + ((fast::clamp(_1183, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz) * _Globals.ColorMatrixB_ColorCurveCm2.www) + (((_1188 * _Globals.ColorMatrixR_ColorCurveCd1.www) * (float3(1.0) / (_1188 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.yyy))) + _Globals.ColorMatrixG_ColorCurveCd3Cm3.www))) - float3(0.00200000009499490261077880859375); + } + else + { + _1215 = fast::max(float3(0.0), mix(_1145, _1145 * ((_577 * float3x3(float3(1.06317996978759765625, 0.02339559979736804962158203125, -0.08657260239124298095703125), float3(-0.010633699595928192138671875, 1.2063200473785400390625, -0.1956900060176849365234375), float3(-0.0005908869788981974124908447265625, 0.00105247995816171169281005859375, 0.999538004398345947265625))) * _576), _940) * _575); + } + float3 _1216 = fast::clamp(_1215, float3(0.0), float3(1.0)); + float _1217 = _1216.x; + float _1229; + for (;;) + { + if (_1217 < 0.00313066993840038776397705078125) + { + _1229 = _1217 * 12.9200000762939453125; + break; + } + _1229 = (pow(_1217, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _1230 = _1216.y; + float _1242; + for (;;) + { + if (_1230 < 0.00313066993840038776397705078125) + { + _1242 = _1230 * 12.9200000762939453125; + break; + } + _1242 = (pow(_1230, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _1243 = _1216.z; + float _1255; + for (;;) + { + if (_1243 < 0.00313066993840038776397705078125) + { + _1255 = _1243 * 12.9200000762939453125; + break; + } + _1255 = (pow(_1243, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float3 _1256 = float3(_1229, _1242, _1255); + float3 _1258 = (_1256 * float3(0.9375)) + float3(0.03125); + float _1270 = (_1258.z * 16.0) - 0.5; + float _1271 = floor(_1270); + float _1275 = (_1258.x + _1271) * 0.0625; + float _1276 = _1258.y; + float4 _1279 = Texture1.sample(Texture1Sampler, float2(_1275, _1276)); + float4 _1283 = Texture1.sample(Texture1Sampler, float2(_1275 + 0.0625, _1276)); + float3 _1289 = fast::max(float3(6.1035199905745685100555419921875e-05), (float3(_Globals.LUTWeights[0].x) * _1256) + (float3(_Globals.LUTWeights[1].x) * mix(_1279, _1283, float4(_1270 - _1271)).xyz)); + float3 _1295 = select(_1289 * float3(0.077399380505084991455078125), pow((_1289 * float3(0.94786727428436279296875)) + float3(0.0521326996386051177978515625), float3(2.400000095367431640625)), _1289 > float3(0.040449999272823333740234375)); + float3 _1324 = pow(fast::max(float3(0.0), mix((((float3(_Globals.MappingPolynomial.x) * (_1295 * _1295)) + (float3(_Globals.MappingPolynomial.y) * _1295)) + float3(_Globals.MappingPolynomial.z)) * _Globals.ColorScale, _Globals.OverlayColor.xyz, float3(_Globals.OverlayColor.w))), float3(_Globals.InverseGamma.y)); + float3 _3103; + if (_Globals.OutputDevice == 0u) + { + float _3063 = _1324.x; + float _3075; + for (;;) + { + if (_3063 < 0.00313066993840038776397705078125) + { + _3075 = _3063 * 12.9200000762939453125; + break; + } + _3075 = (pow(_3063, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _3076 = _1324.y; + float _3088; + for (;;) + { + if (_3076 < 0.00313066993840038776397705078125) + { + _3088 = _3076 * 12.9200000762939453125; + break; + } + _3088 = (pow(_3076, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _3089 = _1324.z; + float _3101; + for (;;) + { + if (_3089 < 0.00313066993840038776397705078125) + { + _3101 = _3089 * 12.9200000762939453125; + break; + } + _3101 = (pow(_3089, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + _3103 = float3(_3075, _3088, _3101); + } + else + { + float3 _3062; + if (_Globals.OutputDevice == 1u) + { + float3 _3055 = fast::max(float3(6.1035199905745685100555419921875e-05), (_1324 * _573) * _602); + _3062 = fast::min(_3055 * float3(4.5), (pow(fast::max(_3055, float3(0.017999999225139617919921875)), float3(0.449999988079071044921875)) * float3(1.09899997711181640625)) - float3(0.098999999463558197021484375)); + } + else + { + float3 _3052; + if ((_Globals.OutputDevice == 3u) || (_Globals.OutputDevice == 5u)) + { + float3 _2204 = (_932 * float3(1.5)) * (_572 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _2205 = _2204.x; + float _2206 = _2204.y; + float _2208 = _2204.z; + float _2211 = fast::max(fast::max(_2205, _2206), _2208); + float _2216 = (fast::max(_2211, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_2205, _2206), _2208), 1.0000000133514319600180897396058e-10)) / fast::max(_2211, 0.00999999977648258209228515625); + float _2229 = ((_2208 + _2206) + _2205) + (1.75 * sqrt(((_2208 * (_2208 - _2206)) + (_2206 * (_2206 - _2205))) + (_2205 * (_2205 - _2208)))); + float _2230 = _2229 * 0.3333333432674407958984375; + float _2231 = _2216 - 0.4000000059604644775390625; + float _2236 = fast::max(1.0 - abs(_2231 * 2.5), 0.0); + float _2244 = (1.0 + (float(int(sign(_2231 * 5.0))) * (1.0 - (_2236 * _2236)))) * 0.02500000037252902984619140625; + float _2257; + if (_2230 <= 0.053333334624767303466796875) + { + _2257 = _2244; + } + else + { + float _2256; + if (_2230 >= 0.1599999964237213134765625) + { + _2256 = 0.0; + } + else + { + _2256 = _2244 * ((0.23999999463558197021484375 / _2229) - 0.5); + } + _2257 = _2256; + } + float3 _2260 = _2204 * float3(1.0 + _2257); + float _2261 = _2260.x; + float _2262 = _2260.y; + float _2264 = _2260.z; + float _2278; + if ((_2261 == _2262) && (_2262 == _2264)) + { + _2278 = 0.0; + } + else + { + _2278 = 57.2957763671875 * atan2(sqrt(3.0) * (_2262 - _2264), ((2.0 * _2261) - _2262) - _2264); + } + float _2283; + if (_2278 < 0.0) + { + _2283 = _2278 + 360.0; + } + else + { + _2283 = _2278; + } + float _2284 = fast::clamp(_2283, 0.0, 360.0); + float _2289; + if (_2284 > 180.0) + { + _2289 = _2284 - 360.0; + } + else + { + _2289 = _2284; + } + float _2339; + if ((_2289 > (-67.5)) && (_2289 < 67.5)) + { + float _2296 = (_2289 - (-67.5)) * 0.0296296291053295135498046875; + int _2297 = int(_2296); + float _2299 = _2296 - float(_2297); + float _2300 = _2299 * _2299; + float _2301 = _2300 * _2299; + float _2338; + if (_2297 == 3) + { + _2338 = (((_2301 * (-0.16666667163372039794921875)) + (_2300 * 0.5)) + (_2299 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _2331; + if (_2297 == 2) + { + _2331 = ((_2301 * 0.5) + (_2300 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _2326; + if (_2297 == 1) + { + _2326 = (((_2301 * (-0.5)) + (_2300 * 0.5)) + (_2299 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _2319; + if (_2297 == 0) + { + _2319 = _2301 * 0.16666667163372039794921875; + } + else + { + _2319 = 0.0; + } + _2326 = _2319; + } + _2331 = _2326; + } + _2338 = _2331; + } + _2339 = _2338; + } + else + { + _2339 = 0.0; + } + float3 _2346 = _2260; + _2346.x = _2261 + ((((_2339 * 1.5) * _2216) * (0.02999999932944774627685546875 - _2261)) * 0.180000007152557373046875); + float3 _2349 = fast::clamp(fast::clamp(_2346, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _2352 = mix(float3(dot(_2349, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _2349, float3(0.959999978542327880859375)); + float _2353 = _2352.x; + float _2357 = 0.17999999225139617919921875 * exp2(18.0); + float _2359 = exp2(-14.0); + float _2362 = log((_2353 <= 0.0) ? _2359 : _2353) / _1091; + float _2364 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1091; + float _2431; + if (_2362 <= _2364) + { + _2431 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2371 = log(0.180000007152557373046875) / _1091; + float _2428; + if ((_2362 > _2364) && (_2362 < _2371)) + { + float _2411 = (3.0 * (_2362 - _2364)) / (_2371 - _2364); + int _2412 = int(_2411); + float _2414 = _2411 - float(_2412); + _2428 = dot(float3(_2414 * _2414, _2414, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2412], _499[_2412 + 1], _499[_2412 + 2])); + } + else + { + float _2379 = log(_2357) / _1091; + float _2407; + if ((_2362 >= _2371) && (_2362 < _2379)) + { + float _2390 = (3.0 * (_2362 - _2371)) / (_2379 - _2371); + int _2391 = int(_2390); + float _2393 = _2390 - float(_2391); + _2407 = dot(float3(_2393 * _2393, _2393, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2391], _500[_2391 + 1], _500[_2391 + 2])); + } + else + { + _2407 = log(10000.0) / _1091; + } + _2428 = _2407; + } + _2431 = _2428; + } + float3 _2433 = _523; + _2433.x = pow(10.0, _2431); + float _2434 = _2352.y; + float _2438 = log((_2434 <= 0.0) ? _2359 : _2434) / _1091; + float _2505; + if (_2438 <= _2364) + { + _2505 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2445 = log(0.180000007152557373046875) / _1091; + float _2502; + if ((_2438 > _2364) && (_2438 < _2445)) + { + float _2485 = (3.0 * (_2438 - _2364)) / (_2445 - _2364); + int _2486 = int(_2485); + float _2488 = _2485 - float(_2486); + _2502 = dot(float3(_2488 * _2488, _2488, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2486], _499[_2486 + 1], _499[_2486 + 2])); + } + else + { + float _2453 = log(_2357) / _1091; + float _2481; + if ((_2438 >= _2445) && (_2438 < _2453)) + { + float _2464 = (3.0 * (_2438 - _2445)) / (_2453 - _2445); + int _2465 = int(_2464); + float _2467 = _2464 - float(_2465); + _2481 = dot(float3(_2467 * _2467, _2467, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2465], _500[_2465 + 1], _500[_2465 + 2])); + } + else + { + _2481 = log(10000.0) / _1091; + } + _2502 = _2481; + } + _2505 = _2502; + } + float3 _2507 = _2433; + _2507.y = pow(10.0, _2505); + float _2508 = _2352.z; + float _2512 = log((_2508 <= 0.0) ? _2359 : _2508) / _1091; + float _2579; + if (_2512 <= _2364) + { + _2579 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2519 = log(0.180000007152557373046875) / _1091; + float _2576; + if ((_2512 > _2364) && (_2512 < _2519)) + { + float _2559 = (3.0 * (_2512 - _2364)) / (_2519 - _2364); + int _2560 = int(_2559); + float _2562 = _2559 - float(_2560); + _2576 = dot(float3(_2562 * _2562, _2562, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2560], _499[_2560 + 1], _499[_2560 + 2])); + } + else + { + float _2527 = log(_2357) / _1091; + float _2555; + if ((_2512 >= _2519) && (_2512 < _2527)) + { + float _2538 = (3.0 * (_2512 - _2519)) / (_2527 - _2519); + int _2539 = int(_2538); + float _2541 = _2538 - float(_2539); + _2555 = dot(float3(_2541 * _2541, _2541, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2539], _500[_2539 + 1], _500[_2539 + 2])); + } + else + { + _2555 = log(10000.0) / _1091; + } + _2576 = _2555; + } + _2579 = _2576; + } + float3 _2581 = _2507; + _2581.z = pow(10.0, _2579); + float3 _2583 = (_2581 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _2585 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _2589 = log((_2585 <= 0.0) ? _2359 : _2585) / _1091; + float _2656; + if (_2589 <= _2364) + { + _2656 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2596 = log(0.180000007152557373046875) / _1091; + float _2653; + if ((_2589 > _2364) && (_2589 < _2596)) + { + float _2636 = (3.0 * (_2589 - _2364)) / (_2596 - _2364); + int _2637 = int(_2636); + float _2639 = _2636 - float(_2637); + _2653 = dot(float3(_2639 * _2639, _2639, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2637], _499[_2637 + 1], _499[_2637 + 2])); + } + else + { + float _2604 = log(_2357) / _1091; + float _2632; + if ((_2589 >= _2596) && (_2589 < _2604)) + { + float _2615 = (3.0 * (_2589 - _2596)) / (_2604 - _2596); + int _2616 = int(_2615); + float _2618 = _2615 - float(_2616); + _2632 = dot(float3(_2618 * _2618, _2618, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2616], _500[_2616 + 1], _500[_2616 + 2])); + } + else + { + _2632 = log(10000.0) / _1091; + } + _2653 = _2632; + } + _2656 = _2653; + } + float _2659 = log(0.180000007152557373046875) / _1091; + float _2713; + if (_2659 <= _2364) + { + _2713 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2710; + if ((_2659 > _2364) && (_2659 < _2659)) + { + _2710 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(-0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875)).z; + } + else + { + float _2672 = log(_2357) / _1091; + float _2700; + if ((_2659 >= _2659) && (_2659 < _2672)) + { + float _2683 = (3.0 * (_2659 - _2659)) / (_2672 - _2659); + int _2684 = int(_2683); + float _2686 = _2683 - float(_2684); + _2700 = dot(float3(_2686 * _2686, _2686, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2684], _500[_2684 + 1], _500[_2684 + 2])); + } + else + { + _2700 = log(10000.0) / _1091; + } + _2710 = _2700; + } + _2713 = _2710; + } + float _2714 = pow(10.0, _2713); + float _2716 = 0.17999999225139617919921875 * pow(2.0, 10.0); + float _2720 = log((_2716 <= 0.0) ? _2359 : _2716) / _1091; + float _2785; + if (_2720 <= _2364) + { + _2785 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2782; + if ((_2720 > _2364) && (_2720 < _2659)) + { + float _2765 = (3.0 * (_2720 - _2364)) / (_2659 - _2364); + int _2766 = int(_2765); + float _2768 = _2765 - float(_2766); + _2782 = dot(float3(_2768 * _2768, _2768, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2766], _499[_2766 + 1], _499[_2766 + 2])); + } + else + { + float _2733 = log(_2357) / _1091; + float _2761; + if ((_2720 >= _2659) && (_2720 < _2733)) + { + float _2744 = (3.0 * (_2720 - _2659)) / (_2733 - _2659); + int _2745 = int(_2744); + float _2747 = _2744 - float(_2745); + _2761 = dot(float3(_2747 * _2747, _2747, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2745], _500[_2745 + 1], _500[_2745 + 2])); + } + else + { + _2761 = log(10000.0) / _1091; + } + _2782 = _2761; + } + _2785 = _2782; + } + float _2786 = pow(10.0, _2785); + float _2787 = _2583.x; + float _2791 = log((_2787 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2787) / _1091; + float _2792 = log(pow(10.0, _2656)); + float _2793 = _2792 / _1091; + float _2870; + if (_2791 <= _2793) + { + _2870 = (_2791 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1091) - ((3.0 * _2792) / _1091)); + } + else + { + float _2800 = log(_2714) / _1091; + float _2862; + if ((_2791 > _2793) && (_2791 < _2800)) + { + float _2845 = (7.0 * (_2791 - _2793)) / (_2800 - _2793); + int _2846 = int(_2845); + float _2848 = _2845 - float(_2846); + _2862 = dot(float3(_2848 * _2848, _2848, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_503[_2846], _503[_2846 + 1], _503[_2846 + 2])); + } + else + { + float _2807 = log(_2786); + float _2808 = _2807 / _1091; + float _2841; + if ((_2791 >= _2800) && (_2791 < _2808)) + { + float _2824 = (7.0 * (_2791 - _2800)) / (_2808 - _2800); + int _2825 = int(_2824); + float _2827 = _2824 - float(_2825); + _2841 = dot(float3(_2827 * _2827, _2827, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_504[_2825], _504[_2825 + 1], _504[_2825 + 2])); + } + else + { + _2841 = (_2791 * 0.0599999986588954925537109375) + ((log(1000.0) / _1091) - ((0.0599999986588954925537109375 * _2807) / _1091)); + } + _2862 = _2841; + } + _2870 = _2862; + } + float3 _2872 = _523; + _2872.x = pow(10.0, _2870); + float _2873 = _2583.y; + float _2877 = log((_2873 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2873) / _1091; + float _2954; + if (_2877 <= _2793) + { + _2954 = (_2877 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1091) - ((3.0 * _2792) / _1091)); + } + else + { + float _2884 = log(_2714) / _1091; + float _2946; + if ((_2877 > _2793) && (_2877 < _2884)) + { + float _2929 = (7.0 * (_2877 - _2793)) / (_2884 - _2793); + int _2930 = int(_2929); + float _2932 = _2929 - float(_2930); + _2946 = dot(float3(_2932 * _2932, _2932, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_503[_2930], _503[_2930 + 1], _503[_2930 + 2])); + } + else + { + float _2891 = log(_2786); + float _2892 = _2891 / _1091; + float _2925; + if ((_2877 >= _2884) && (_2877 < _2892)) + { + float _2908 = (7.0 * (_2877 - _2884)) / (_2892 - _2884); + int _2909 = int(_2908); + float _2911 = _2908 - float(_2909); + _2925 = dot(float3(_2911 * _2911, _2911, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_504[_2909], _504[_2909 + 1], _504[_2909 + 2])); + } + else + { + _2925 = (_2877 * 0.0599999986588954925537109375) + ((log(1000.0) / _1091) - ((0.0599999986588954925537109375 * _2891) / _1091)); + } + _2946 = _2925; + } + _2954 = _2946; + } + float3 _2956 = _2872; + _2956.y = pow(10.0, _2954); + float _2957 = _2583.z; + float _2961 = log((_2957 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2957) / _1091; + float _3038; + if (_2961 <= _2793) + { + _3038 = (_2961 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1091) - ((3.0 * _2792) / _1091)); + } + else + { + float _2968 = log(_2714) / _1091; + float _3030; + if ((_2961 > _2793) && (_2961 < _2968)) + { + float _3013 = (7.0 * (_2961 - _2793)) / (_2968 - _2793); + int _3014 = int(_3013); + float _3016 = _3013 - float(_3014); + _3030 = dot(float3(_3016 * _3016, _3016, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_503[_3014], _503[_3014 + 1], _503[_3014 + 2])); + } + else + { + float _2975 = log(_2786); + float _2976 = _2975 / _1091; + float _3009; + if ((_2961 >= _2968) && (_2961 < _2976)) + { + float _2992 = (7.0 * (_2961 - _2968)) / (_2976 - _2968); + int _2993 = int(_2992); + float _2995 = _2992 - float(_2993); + _3009 = dot(float3(_2995 * _2995, _2995, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_504[_2993], _504[_2993 + 1], _504[_2993 + 2])); + } + else + { + _3009 = (_2961 * 0.0599999986588954925537109375) + ((log(1000.0) / _1091) - ((0.0599999986588954925537109375 * _2975) / _1091)); + } + _3030 = _3009; + } + _3038 = _3030; + } + float3 _3040 = _2956; + _3040.z = pow(10.0, _3038); + float3 _3044 = pow(((_3040 - float3(3.5073844628641381859779357910156e-05)) * _602) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _3052 = pow((float3(0.8359375) + (float3(18.8515625) * _3044)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _3044))), float3(78.84375)); + } + else + { + float3 _2201; + if ((_Globals.OutputDevice == 4u) || (_Globals.OutputDevice == 6u)) + { + float3 _1369 = (_932 * float3(1.5)) * (_572 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _1370 = _1369.x; + float _1371 = _1369.y; + float _1373 = _1369.z; + float _1376 = fast::max(fast::max(_1370, _1371), _1373); + float _1381 = (fast::max(_1376, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_1370, _1371), _1373), 1.0000000133514319600180897396058e-10)) / fast::max(_1376, 0.00999999977648258209228515625); + float _1394 = ((_1373 + _1371) + _1370) + (1.75 * sqrt(((_1373 * (_1373 - _1371)) + (_1371 * (_1371 - _1370))) + (_1370 * (_1370 - _1373)))); + float _1395 = _1394 * 0.3333333432674407958984375; + float _1396 = _1381 - 0.4000000059604644775390625; + float _1401 = fast::max(1.0 - abs(_1396 * 2.5), 0.0); + float _1409 = (1.0 + (float(int(sign(_1396 * 5.0))) * (1.0 - (_1401 * _1401)))) * 0.02500000037252902984619140625; + float _1422; + if (_1395 <= 0.053333334624767303466796875) + { + _1422 = _1409; + } + else + { + float _1421; + if (_1395 >= 0.1599999964237213134765625) + { + _1421 = 0.0; + } + else + { + _1421 = _1409 * ((0.23999999463558197021484375 / _1394) - 0.5); + } + _1422 = _1421; + } + float3 _1425 = _1369 * float3(1.0 + _1422); + float _1426 = _1425.x; + float _1427 = _1425.y; + float _1429 = _1425.z; + float _1443; + if ((_1426 == _1427) && (_1427 == _1429)) + { + _1443 = 0.0; + } + else + { + _1443 = 57.2957763671875 * atan2(sqrt(3.0) * (_1427 - _1429), ((2.0 * _1426) - _1427) - _1429); + } + float _1448; + if (_1443 < 0.0) + { + _1448 = _1443 + 360.0; + } + else + { + _1448 = _1443; + } + float _1449 = fast::clamp(_1448, 0.0, 360.0); + float _1454; + if (_1449 > 180.0) + { + _1454 = _1449 - 360.0; + } + else + { + _1454 = _1449; + } + float _1504; + if ((_1454 > (-67.5)) && (_1454 < 67.5)) + { + float _1461 = (_1454 - (-67.5)) * 0.0296296291053295135498046875; + int _1462 = int(_1461); + float _1464 = _1461 - float(_1462); + float _1465 = _1464 * _1464; + float _1466 = _1465 * _1464; + float _1503; + if (_1462 == 3) + { + _1503 = (((_1466 * (-0.16666667163372039794921875)) + (_1465 * 0.5)) + (_1464 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _1496; + if (_1462 == 2) + { + _1496 = ((_1466 * 0.5) + (_1465 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _1491; + if (_1462 == 1) + { + _1491 = (((_1466 * (-0.5)) + (_1465 * 0.5)) + (_1464 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _1484; + if (_1462 == 0) + { + _1484 = _1466 * 0.16666667163372039794921875; + } + else + { + _1484 = 0.0; + } + _1491 = _1484; + } + _1496 = _1491; + } + _1503 = _1496; + } + _1504 = _1503; + } + else + { + _1504 = 0.0; + } + float3 _1511 = _1425; + _1511.x = _1426 + ((((_1504 * 1.5) * _1381) * (0.02999999932944774627685546875 - _1426)) * 0.180000007152557373046875); + float3 _1514 = fast::clamp(fast::clamp(_1511, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _1517 = mix(float3(dot(_1514, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1514, float3(0.959999978542327880859375)); + float _1518 = _1517.x; + float _1522 = 0.17999999225139617919921875 * exp2(18.0); + float _1524 = exp2(-14.0); + float _1527 = log((_1518 <= 0.0) ? _1524 : _1518) / _1091; + float _1529 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1091; + float _1596; + if (_1527 <= _1529) + { + _1596 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1536 = log(0.180000007152557373046875) / _1091; + float _1593; + if ((_1527 > _1529) && (_1527 < _1536)) + { + float _1576 = (3.0 * (_1527 - _1529)) / (_1536 - _1529); + int _1577 = int(_1576); + float _1579 = _1576 - float(_1577); + _1593 = dot(float3(_1579 * _1579, _1579, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1577], _499[_1577 + 1], _499[_1577 + 2])); + } + else + { + float _1544 = log(_1522) / _1091; + float _1572; + if ((_1527 >= _1536) && (_1527 < _1544)) + { + float _1555 = (3.0 * (_1527 - _1536)) / (_1544 - _1536); + int _1556 = int(_1555); + float _1558 = _1555 - float(_1556); + _1572 = dot(float3(_1558 * _1558, _1558, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1556], _500[_1556 + 1], _500[_1556 + 2])); + } + else + { + _1572 = log(10000.0) / _1091; + } + _1593 = _1572; + } + _1596 = _1593; + } + float3 _1598 = _523; + _1598.x = pow(10.0, _1596); + float _1599 = _1517.y; + float _1603 = log((_1599 <= 0.0) ? _1524 : _1599) / _1091; + float _1670; + if (_1603 <= _1529) + { + _1670 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1610 = log(0.180000007152557373046875) / _1091; + float _1667; + if ((_1603 > _1529) && (_1603 < _1610)) + { + float _1650 = (3.0 * (_1603 - _1529)) / (_1610 - _1529); + int _1651 = int(_1650); + float _1653 = _1650 - float(_1651); + _1667 = dot(float3(_1653 * _1653, _1653, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1651], _499[_1651 + 1], _499[_1651 + 2])); + } + else + { + float _1618 = log(_1522) / _1091; + float _1646; + if ((_1603 >= _1610) && (_1603 < _1618)) + { + float _1629 = (3.0 * (_1603 - _1610)) / (_1618 - _1610); + int _1630 = int(_1629); + float _1632 = _1629 - float(_1630); + _1646 = dot(float3(_1632 * _1632, _1632, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1630], _500[_1630 + 1], _500[_1630 + 2])); + } + else + { + _1646 = log(10000.0) / _1091; + } + _1667 = _1646; + } + _1670 = _1667; + } + float3 _1672 = _1598; + _1672.y = pow(10.0, _1670); + float _1673 = _1517.z; + float _1677 = log((_1673 <= 0.0) ? _1524 : _1673) / _1091; + float _1744; + if (_1677 <= _1529) + { + _1744 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1684 = log(0.180000007152557373046875) / _1091; + float _1741; + if ((_1677 > _1529) && (_1677 < _1684)) + { + float _1724 = (3.0 * (_1677 - _1529)) / (_1684 - _1529); + int _1725 = int(_1724); + float _1727 = _1724 - float(_1725); + _1741 = dot(float3(_1727 * _1727, _1727, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1725], _499[_1725 + 1], _499[_1725 + 2])); + } + else + { + float _1692 = log(_1522) / _1091; + float _1720; + if ((_1677 >= _1684) && (_1677 < _1692)) + { + float _1703 = (3.0 * (_1677 - _1684)) / (_1692 - _1684); + int _1704 = int(_1703); + float _1706 = _1703 - float(_1704); + _1720 = dot(float3(_1706 * _1706, _1706, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1704], _500[_1704 + 1], _500[_1704 + 2])); + } + else + { + _1720 = log(10000.0) / _1091; + } + _1741 = _1720; + } + _1744 = _1741; + } + float3 _1746 = _1672; + _1746.z = pow(10.0, _1744); + float3 _1748 = (_1746 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _1750 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _1754 = log((_1750 <= 0.0) ? _1524 : _1750) / _1091; + float _1821; + if (_1754 <= _1529) + { + _1821 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1761 = log(0.180000007152557373046875) / _1091; + float _1818; + if ((_1754 > _1529) && (_1754 < _1761)) + { + float _1801 = (3.0 * (_1754 - _1529)) / (_1761 - _1529); + int _1802 = int(_1801); + float _1804 = _1801 - float(_1802); + _1818 = dot(float3(_1804 * _1804, _1804, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1802], _499[_1802 + 1], _499[_1802 + 2])); + } + else + { + float _1769 = log(_1522) / _1091; + float _1797; + if ((_1754 >= _1761) && (_1754 < _1769)) + { + float _1780 = (3.0 * (_1754 - _1761)) / (_1769 - _1761); + int _1781 = int(_1780); + float _1783 = _1780 - float(_1781); + _1797 = dot(float3(_1783 * _1783, _1783, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1781], _500[_1781 + 1], _500[_1781 + 2])); + } + else + { + _1797 = log(10000.0) / _1091; + } + _1818 = _1797; + } + _1821 = _1818; + } + float _1824 = log(0.180000007152557373046875) / _1091; + float _1878; + if (_1824 <= _1529) + { + _1878 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1875; + if ((_1824 > _1529) && (_1824 < _1824)) + { + _1875 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(-0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875)).z; + } + else + { + float _1837 = log(_1522) / _1091; + float _1865; + if ((_1824 >= _1824) && (_1824 < _1837)) + { + float _1848 = (3.0 * (_1824 - _1824)) / (_1837 - _1824); + int _1849 = int(_1848); + float _1851 = _1848 - float(_1849); + _1865 = dot(float3(_1851 * _1851, _1851, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1849], _500[_1849 + 1], _500[_1849 + 2])); + } + else + { + _1865 = log(10000.0) / _1091; + } + _1875 = _1865; + } + _1878 = _1875; + } + float _1879 = pow(10.0, _1878); + float _1881 = 0.17999999225139617919921875 * pow(2.0, 11.0); + float _1885 = log((_1881 <= 0.0) ? _1524 : _1881) / _1091; + float _1950; + if (_1885 <= _1529) + { + _1950 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1947; + if ((_1885 > _1529) && (_1885 < _1824)) + { + float _1930 = (3.0 * (_1885 - _1529)) / (_1824 - _1529); + int _1931 = int(_1930); + float _1933 = _1930 - float(_1931); + _1947 = dot(float3(_1933 * _1933, _1933, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1931], _499[_1931 + 1], _499[_1931 + 2])); + } + else + { + float _1898 = log(_1522) / _1091; + float _1926; + if ((_1885 >= _1824) && (_1885 < _1898)) + { + float _1909 = (3.0 * (_1885 - _1824)) / (_1898 - _1824); + int _1910 = int(_1909); + float _1912 = _1909 - float(_1910); + _1926 = dot(float3(_1912 * _1912, _1912, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1910], _500[_1910 + 1], _500[_1910 + 2])); + } + else + { + _1926 = log(10000.0) / _1091; + } + _1947 = _1926; + } + _1950 = _1947; + } + float _1951 = pow(10.0, _1950); + float _1952 = _1748.x; + float _1956 = log((_1952 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _1952) / _1091; + float _1958 = log(pow(10.0, _1821)) / _1091; + float _2030; + if (_1956 <= _1958) + { + _2030 = log(0.004999999888241291046142578125) / _1091; + } + else + { + float _1965 = log(_1879) / _1091; + float _2027; + if ((_1956 > _1958) && (_1956 < _1965)) + { + float _2010 = (7.0 * (_1956 - _1958)) / (_1965 - _1958); + int _2011 = int(_2010); + float _2013 = _2010 - float(_2011); + _2027 = dot(float3(_2013 * _2013, _2013, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_506[_2011], _506[_2011 + 1], _506[_2011 + 2])); + } + else + { + float _1972 = log(_1951); + float _1973 = _1972 / _1091; + float _2006; + if ((_1956 >= _1965) && (_1956 < _1973)) + { + float _1989 = (7.0 * (_1956 - _1965)) / (_1973 - _1965); + int _1990 = int(_1989); + float _1992 = _1989 - float(_1990); + _2006 = dot(float3(_1992 * _1992, _1992, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_507[_1990], _507[_1990 + 1], _507[_1990 + 2])); + } + else + { + _2006 = (_1956 * 0.119999997317790985107421875) + ((log(2000.0) / _1091) - ((0.119999997317790985107421875 * _1972) / _1091)); + } + _2027 = _2006; + } + _2030 = _2027; + } + float3 _2032 = _523; + _2032.x = pow(10.0, _2030); + float _2033 = _1748.y; + float _2037 = log((_2033 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2033) / _1091; + float _2109; + if (_2037 <= _1958) + { + _2109 = log(0.004999999888241291046142578125) / _1091; + } + else + { + float _2044 = log(_1879) / _1091; + float _2106; + if ((_2037 > _1958) && (_2037 < _2044)) + { + float _2089 = (7.0 * (_2037 - _1958)) / (_2044 - _1958); + int _2090 = int(_2089); + float _2092 = _2089 - float(_2090); + _2106 = dot(float3(_2092 * _2092, _2092, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_506[_2090], _506[_2090 + 1], _506[_2090 + 2])); + } + else + { + float _2051 = log(_1951); + float _2052 = _2051 / _1091; + float _2085; + if ((_2037 >= _2044) && (_2037 < _2052)) + { + float _2068 = (7.0 * (_2037 - _2044)) / (_2052 - _2044); + int _2069 = int(_2068); + float _2071 = _2068 - float(_2069); + _2085 = dot(float3(_2071 * _2071, _2071, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_507[_2069], _507[_2069 + 1], _507[_2069 + 2])); + } + else + { + _2085 = (_2037 * 0.119999997317790985107421875) + ((log(2000.0) / _1091) - ((0.119999997317790985107421875 * _2051) / _1091)); + } + _2106 = _2085; + } + _2109 = _2106; + } + float3 _2111 = _2032; + _2111.y = pow(10.0, _2109); + float _2112 = _1748.z; + float _2116 = log((_2112 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2112) / _1091; + float _2188; + if (_2116 <= _1958) + { + _2188 = log(0.004999999888241291046142578125) / _1091; + } + else + { + float _2123 = log(_1879) / _1091; + float _2185; + if ((_2116 > _1958) && (_2116 < _2123)) + { + float _2168 = (7.0 * (_2116 - _1958)) / (_2123 - _1958); + int _2169 = int(_2168); + float _2171 = _2168 - float(_2169); + _2185 = dot(float3(_2171 * _2171, _2171, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_506[_2169], _506[_2169 + 1], _506[_2169 + 2])); + } + else + { + float _2130 = log(_1951); + float _2131 = _2130 / _1091; + float _2164; + if ((_2116 >= _2123) && (_2116 < _2131)) + { + float _2147 = (7.0 * (_2116 - _2123)) / (_2131 - _2123); + int _2148 = int(_2147); + float _2150 = _2147 - float(_2148); + _2164 = dot(float3(_2150 * _2150, _2150, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_507[_2148], _507[_2148 + 1], _507[_2148 + 2])); + } + else + { + _2164 = (_2116 * 0.119999997317790985107421875) + ((log(2000.0) / _1091) - ((0.119999997317790985107421875 * _2130) / _1091)); + } + _2185 = _2164; + } + _2188 = _2185; + } + float3 _2190 = _2111; + _2190.z = pow(10.0, _2188); + float3 _2193 = pow((_2190 * _602) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _2201 = pow((float3(0.8359375) + (float3(18.8515625) * _2193)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _2193))), float3(78.84375)); + } + else + { + float3 _1366; + if (_Globals.OutputDevice == 7u) + { + float3 _1358 = pow(((_932 * _573) * _602) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _1366 = pow((float3(0.8359375) + (float3(18.8515625) * _1358)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _1358))), float3(78.84375)); + } + else + { + _1366 = pow((_1324 * _573) * _602, float3(_Globals.InverseGamma.z)); + } + _2201 = _1366; + } + _3052 = _2201; + } + _3062 = _3052; + } + _3103 = _3062; + } + float3 _3104 = _3103 * float3(0.95238101482391357421875); + float4 _3106 = float4(_3104.x, _3104.y, _3104.z, float4(0.0).w); + _3106.w = 0.0; + out.out_var_SV_Target0 = _3106; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag new file mode 100644 index 000000000..e43b7bd37 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag @@ -0,0 +1,356 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_PrimitiveDither +{ + float PrimitiveDither_LODFactor; +}; + +struct type_PrimitiveFade +{ + float2 PrimitiveFade_FadeTimeScaleBias; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[9]; + float4 Material_ScalarExpressions[3]; +}; + +constant float _98 = {}; +constant float _103 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; + float gl_FragDepth [[depth(less)]]; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD6 [[user(locn0)]]; + float4 in_var_TEXCOORD7 [[user(locn1)]]; + float4 in_var_TEXCOORD10_centroid [[user(locn2)]]; + float4 in_var_TEXCOORD11_centroid [[user(locn3)]]; + float4 in_var_TEXCOORD0_0 [[user(locn4)]]; +}; + +static inline __attribute__((always_inline)) +void _353() +{ + discard_fragment(); +} + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_PrimitiveDither& PrimitiveDither [[buffer(1)]], constant type_PrimitiveFade& PrimitiveFade [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture2d Material_Texture2D_0 [[texture(0)]], texture2d Material_Texture2D_3 [[texture(1)]], sampler Material_Texture2D_0Sampler [[sampler(0)]], sampler Material_Texture2D_3Sampler [[sampler(1)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + spvUnsafeArray in_var_TEXCOORD0 = {}; + in_var_TEXCOORD0[0] = in.in_var_TEXCOORD0_0; + float2 _135 = gl_FragCoord.xy - View.View_ViewRectMin.xy; + float4 _140 = float4(_103, _103, gl_FragCoord.z, 1.0) * float4(gl_FragCoord.w); + float4 _144 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0); + float3 _148 = _144.xyz / float3(_144.w); + float3 _149 = _148 - float3(View.View_PreViewTranslation); + float3 _151 = normalize(-_148); + float3 _152 = _151 * float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz); + float _170 = mix(Material.Material_ScalarExpressions[0].y, Material.Material_ScalarExpressions[0].z, fast::min(fast::max(abs(dot(_151, in.in_var_TEXCOORD11_centroid.xyz)), 0.0), 1.0)); + float _172 = 1.0 / _170; + float2 _174 = (float2(Material.Material_ScalarExpressions[0].x) * ((_152.xy * float2(-1.0)) / float2(_152.z))) * float2(_172); + float _180_copy; + float2 _183; + _183 = float2(0.0); + float _188; + float _211; + float2 _212; + float _180 = 1.0; + int _185 = 0; + float _187 = 1.0; + float _189 = 1.0; + for (;;) + { + if (float(_185) < (floor(_170) + 2.0)) + { + _188 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _183), gradient2d(dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)), dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)))).y; + if (_180 < _188) + { + float _201 = _188 - _180; + float _203 = _201 / ((_189 - _187) + _201); + _211 = (_189 * _203) + (_180 * (1.0 - _203)); + _212 = _183 - (float2(_203) * _174); + break; + } + _180_copy = _180; + _180 -= _172; + _183 += _174; + _185++; + _187 = _188; + _189 = _180_copy; + continue; + } + else + { + _211 = _98; + _212 = _183; + break; + } + } + float4 _218 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _212.xy), bias(View.View_MaterialTextureMipBias)); + float2 _229 = _135 + float2(View.View_TemporalAAParams.x); + float _237 = float((uint(_229.x) + (2u * uint(_229.y))) % 5u); + float2 _238 = _135 * float2(0.015625); + float4 _242 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float4 _254 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float3 _272 = float3(_212, (1.0 - _211) * Material.Material_ScalarExpressions[0].x); + float2 _275 = dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _276 = abs(_275); + float3 _279 = dfdx(_149); + float2 _283 = dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _284 = abs(_283); + float3 _287 = dfdy(_149); + if (PrimitiveDither.PrimitiveDither_LODFactor != 0.0) + { + if (abs(PrimitiveDither.PrimitiveDither_LODFactor) > 0.001000000047497451305389404296875) + { + float _317 = fract(cos(dot(floor(gl_FragCoord.xy), float2(347.834503173828125, 3343.28369140625))) * 1000.0); + if ((float((PrimitiveDither.PrimitiveDither_LODFactor < 0.0) ? ((PrimitiveDither.PrimitiveDither_LODFactor + 1.0) > _317) : (PrimitiveDither.PrimitiveDither_LODFactor < _317)) - 0.001000000047497451305389404296875) < 0.0) + { + _353(); + } + } + } + if ((((_218.z + ((fast::min(fast::max(1.0 - (_218.x * Material.Material_ScalarExpressions[2].y), 0.0), 1.0) + ((_237 + (_242.x * Material.Material_ScalarExpressions[2].z)) * 0.16666667163372039794921875)) + (-0.5))) * ((fast::clamp((View.View_RealTime * PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.x) + PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.y, 0.0, 1.0) + ((_237 + _254.x) * 0.16666667163372039794921875)) + (-0.5))) - 0.33329999446868896484375) < 0.0) + { + _353(); + } + float2 _351 = ((((in.in_var_TEXCOORD6.xy / float2(in.in_var_TEXCOORD6.w)) - View.View_TemporalAAJitter.xy) - ((in.in_var_TEXCOORD7.xy / float2(in.in_var_TEXCOORD7.w)) - View.View_TemporalAAJitter.zw)) * float2(0.2495000064373016357421875)) + float2(0.49999237060546875); + out.gl_FragDepth = fast::min(_140.z / (_140.w + (sqrt(dot(_272, _272)) / (fast::max(sqrt(dot(_276, _276)) / sqrt(dot(_279, _279)), sqrt(dot(_284, _284)) / sqrt(dot(_287, _287))) / abs(dot(float3x3(View.View_ViewToTranslatedWorld[0].xyz, View.View_ViewToTranslatedWorld[1].xyz, View.View_ViewToTranslatedWorld[2].xyz) * float3(0.0, 0.0, 1.0), _151))))), gl_FragCoord.z); + out.out_var_SV_Target0 = float4(_351.x, _351.y, float2(0.0).x, float2(0.0).y); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag new file mode 100644 index 000000000..dd54893a2 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag @@ -0,0 +1,503 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct type_TranslucentBasePass +{ + uint TranslucentBasePass_Shared_Forward_NumLocalLights; + uint TranslucentBasePass_Shared_Forward_NumReflectionCaptures; + uint TranslucentBasePass_Shared_Forward_HasDirectionalLight; + uint TranslucentBasePass_Shared_Forward_NumGridCells; + packed_int3 TranslucentBasePass_Shared_Forward_CulledGridSize; + uint TranslucentBasePass_Shared_Forward_MaxCulledLightsPerCell; + uint TranslucentBasePass_Shared_Forward_LightGridPixelSizeShift; + uint PrePadding_TranslucentBasePass_Shared_Forward_36; + uint PrePadding_TranslucentBasePass_Shared_Forward_40; + uint PrePadding_TranslucentBasePass_Shared_Forward_44; + packed_float3 TranslucentBasePass_Shared_Forward_LightGridZParams; + float PrePadding_TranslucentBasePass_Shared_Forward_60; + packed_float3 TranslucentBasePass_Shared_Forward_DirectionalLightDirection; + float PrePadding_TranslucentBasePass_Shared_Forward_76; + packed_float3 TranslucentBasePass_Shared_Forward_DirectionalLightColor; + float TranslucentBasePass_Shared_Forward_DirectionalLightVolumetricScatteringIntensity; + uint TranslucentBasePass_Shared_Forward_DirectionalLightShadowMapChannelMask; + uint PrePadding_TranslucentBasePass_Shared_Forward_100; + float2 TranslucentBasePass_Shared_Forward_DirectionalLightDistanceFadeMAD; + uint TranslucentBasePass_Shared_Forward_NumDirectionalLightCascades; + uint PrePadding_TranslucentBasePass_Shared_Forward_116; + uint PrePadding_TranslucentBasePass_Shared_Forward_120; + uint PrePadding_TranslucentBasePass_Shared_Forward_124; + float4 TranslucentBasePass_Shared_Forward_CascadeEndDepths; + float4x4 TranslucentBasePass_Shared_Forward_DirectionalLightWorldToShadowMatrix[4]; + float4 TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapMinMax[4]; + float4 TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapAtlasBufferSize; + float TranslucentBasePass_Shared_Forward_DirectionalLightDepthBias; + uint TranslucentBasePass_Shared_Forward_DirectionalLightUseStaticShadowing; + uint PrePadding_TranslucentBasePass_Shared_Forward_488; + uint PrePadding_TranslucentBasePass_Shared_Forward_492; + float4 TranslucentBasePass_Shared_Forward_DirectionalLightStaticShadowBufferSize; + float4x4 TranslucentBasePass_Shared_Forward_DirectionalLightWorldToStaticShadow; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_576; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_580; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_584; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_588; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_592; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_596; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_600; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_604; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_608; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_612; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_616; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_620; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_624; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_628; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_632; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_636; + uint TranslucentBasePass_Shared_ForwardISR_NumLocalLights; + uint TranslucentBasePass_Shared_ForwardISR_NumReflectionCaptures; + uint TranslucentBasePass_Shared_ForwardISR_HasDirectionalLight; + uint TranslucentBasePass_Shared_ForwardISR_NumGridCells; + packed_int3 TranslucentBasePass_Shared_ForwardISR_CulledGridSize; + uint TranslucentBasePass_Shared_ForwardISR_MaxCulledLightsPerCell; + uint TranslucentBasePass_Shared_ForwardISR_LightGridPixelSizeShift; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_676; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_680; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_684; + packed_float3 TranslucentBasePass_Shared_ForwardISR_LightGridZParams; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_700; + packed_float3 TranslucentBasePass_Shared_ForwardISR_DirectionalLightDirection; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_716; + packed_float3 TranslucentBasePass_Shared_ForwardISR_DirectionalLightColor; + float TranslucentBasePass_Shared_ForwardISR_DirectionalLightVolumetricScatteringIntensity; + uint TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowMapChannelMask; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_740; + float2 TranslucentBasePass_Shared_ForwardISR_DirectionalLightDistanceFadeMAD; + uint TranslucentBasePass_Shared_ForwardISR_NumDirectionalLightCascades; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_756; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_760; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_764; + float4 TranslucentBasePass_Shared_ForwardISR_CascadeEndDepths; + float4x4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToShadowMatrix[4]; + float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapMinMax[4]; + float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapAtlasBufferSize; + float TranslucentBasePass_Shared_ForwardISR_DirectionalLightDepthBias; + uint TranslucentBasePass_Shared_ForwardISR_DirectionalLightUseStaticShadowing; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_1128; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_1132; + float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightStaticShadowBufferSize; + float4x4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToStaticShadow; + float PrePadding_TranslucentBasePass_Shared_Reflection_1216; + float PrePadding_TranslucentBasePass_Shared_Reflection_1220; + float PrePadding_TranslucentBasePass_Shared_Reflection_1224; + float PrePadding_TranslucentBasePass_Shared_Reflection_1228; + float PrePadding_TranslucentBasePass_Shared_Reflection_1232; + float PrePadding_TranslucentBasePass_Shared_Reflection_1236; + float PrePadding_TranslucentBasePass_Shared_Reflection_1240; + float PrePadding_TranslucentBasePass_Shared_Reflection_1244; + float PrePadding_TranslucentBasePass_Shared_Reflection_1248; + float PrePadding_TranslucentBasePass_Shared_Reflection_1252; + float PrePadding_TranslucentBasePass_Shared_Reflection_1256; + float PrePadding_TranslucentBasePass_Shared_Reflection_1260; + float PrePadding_TranslucentBasePass_Shared_Reflection_1264; + float PrePadding_TranslucentBasePass_Shared_Reflection_1268; + float PrePadding_TranslucentBasePass_Shared_Reflection_1272; + float PrePadding_TranslucentBasePass_Shared_Reflection_1276; + float4 TranslucentBasePass_Shared_Reflection_SkyLightParameters; + float TranslucentBasePass_Shared_Reflection_SkyLightCubemapBrightness; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1300; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1304; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1308; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1312; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1316; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1320; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1324; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1328; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1332; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1336; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1340; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1344; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1348; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1352; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1356; + float4 TranslucentBasePass_Shared_PlanarReflection_ReflectionPlane; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionOrigin; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionXAxis; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionYAxis; + float3x4 TranslucentBasePass_Shared_PlanarReflection_InverseTransposeMirrorMatrix; + packed_float3 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1484; + float2 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters2; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1496; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1500; + float4x4 TranslucentBasePass_Shared_PlanarReflection_ProjectionWithExtraFOV[2]; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenScaleBias[2]; + float2 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenBound; + uint TranslucentBasePass_Shared_PlanarReflection_bIsStereo; + float PrePadding_TranslucentBasePass_Shared_Fog_1676; + float PrePadding_TranslucentBasePass_Shared_Fog_1680; + float PrePadding_TranslucentBasePass_Shared_Fog_1684; + float PrePadding_TranslucentBasePass_Shared_Fog_1688; + float PrePadding_TranslucentBasePass_Shared_Fog_1692; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters2; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogColorParameter; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters3; + float4 TranslucentBasePass_Shared_Fog_InscatteringLightDirection; + float4 TranslucentBasePass_Shared_Fog_DirectionalInscatteringColor; + float2 TranslucentBasePass_Shared_Fog_SinCosInscatteringColorCubemapRotation; + float PrePadding_TranslucentBasePass_Shared_Fog_1800; + float PrePadding_TranslucentBasePass_Shared_Fog_1804; + packed_float3 TranslucentBasePass_Shared_Fog_FogInscatteringTextureParameters; + float TranslucentBasePass_Shared_Fog_ApplyVolumetricFog; + float PrePadding_TranslucentBasePass_1824; + float PrePadding_TranslucentBasePass_1828; + float PrePadding_TranslucentBasePass_1832; + float PrePadding_TranslucentBasePass_1836; + float PrePadding_TranslucentBasePass_1840; + float PrePadding_TranslucentBasePass_1844; + float PrePadding_TranslucentBasePass_1848; + float PrePadding_TranslucentBasePass_1852; + float PrePadding_TranslucentBasePass_1856; + float PrePadding_TranslucentBasePass_1860; + float PrePadding_TranslucentBasePass_1864; + float PrePadding_TranslucentBasePass_1868; + float PrePadding_TranslucentBasePass_1872; + float PrePadding_TranslucentBasePass_1876; + float PrePadding_TranslucentBasePass_1880; + float PrePadding_TranslucentBasePass_1884; + float PrePadding_TranslucentBasePass_1888; + float PrePadding_TranslucentBasePass_1892; + float PrePadding_TranslucentBasePass_1896; + float PrePadding_TranslucentBasePass_1900; + float PrePadding_TranslucentBasePass_1904; + float PrePadding_TranslucentBasePass_1908; + float PrePadding_TranslucentBasePass_1912; + float PrePadding_TranslucentBasePass_1916; + float PrePadding_TranslucentBasePass_1920; + float PrePadding_TranslucentBasePass_1924; + float PrePadding_TranslucentBasePass_1928; + float PrePadding_TranslucentBasePass_1932; + float PrePadding_TranslucentBasePass_1936; + float PrePadding_TranslucentBasePass_1940; + float PrePadding_TranslucentBasePass_1944; + float PrePadding_TranslucentBasePass_1948; + float PrePadding_TranslucentBasePass_1952; + float PrePadding_TranslucentBasePass_1956; + float PrePadding_TranslucentBasePass_1960; + float PrePadding_TranslucentBasePass_1964; + float PrePadding_TranslucentBasePass_1968; + float PrePadding_TranslucentBasePass_1972; + float PrePadding_TranslucentBasePass_1976; + float PrePadding_TranslucentBasePass_1980; + float PrePadding_TranslucentBasePass_1984; + float PrePadding_TranslucentBasePass_1988; + float PrePadding_TranslucentBasePass_1992; + float PrePadding_TranslucentBasePass_1996; + float PrePadding_TranslucentBasePass_2000; + float PrePadding_TranslucentBasePass_2004; + float PrePadding_TranslucentBasePass_2008; + float PrePadding_TranslucentBasePass_2012; + float PrePadding_TranslucentBasePass_2016; + float PrePadding_TranslucentBasePass_2020; + float PrePadding_TranslucentBasePass_2024; + float PrePadding_TranslucentBasePass_2028; + float PrePadding_TranslucentBasePass_2032; + float PrePadding_TranslucentBasePass_2036; + float PrePadding_TranslucentBasePass_2040; + float PrePadding_TranslucentBasePass_2044; + float PrePadding_TranslucentBasePass_2048; + float PrePadding_TranslucentBasePass_2052; + float PrePadding_TranslucentBasePass_2056; + float PrePadding_TranslucentBasePass_2060; + float PrePadding_TranslucentBasePass_2064; + float PrePadding_TranslucentBasePass_2068; + float PrePadding_TranslucentBasePass_2072; + float PrePadding_TranslucentBasePass_2076; + float PrePadding_TranslucentBasePass_2080; + float PrePadding_TranslucentBasePass_2084; + float PrePadding_TranslucentBasePass_2088; + float PrePadding_TranslucentBasePass_2092; + float PrePadding_TranslucentBasePass_2096; + float PrePadding_TranslucentBasePass_2100; + float PrePadding_TranslucentBasePass_2104; + float PrePadding_TranslucentBasePass_2108; + float PrePadding_TranslucentBasePass_2112; + float PrePadding_TranslucentBasePass_2116; + float PrePadding_TranslucentBasePass_2120; + float PrePadding_TranslucentBasePass_2124; + float PrePadding_TranslucentBasePass_2128; + float PrePadding_TranslucentBasePass_2132; + float PrePadding_TranslucentBasePass_2136; + float PrePadding_TranslucentBasePass_2140; + float4 TranslucentBasePass_HZBUvFactorAndInvFactor; + float4 TranslucentBasePass_PrevScreenPositionScaleBias; + float TranslucentBasePass_PrevSceneColorPreExposureInv; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[2]; + float4 Material_ScalarExpressions[1]; +}; + +constant float _108 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; + uint gl_SampleMask [[sample_mask]]; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 in_var_TEXCOORD11_centroid [[user(locn1)]]; + uint in_var_PRIMITIVE_ID [[user(locn2)]]; + float4 in_var_TEXCOORD7 [[user(locn3)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], const device type_StructuredBuffer_v4float& View_PrimitiveSceneData [[buffer(1)]], constant type_TranslucentBasePass& TranslucentBasePass [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture3d TranslucentBasePass_Shared_Fog_IntegratedLightScattering [[texture(0)]], sampler View_SharedBilinearClampedSampler [[sampler(0)]], float4 gl_FragCoord [[position]], uint gl_SampleMaskIn [[sample_mask]]) +{ + main0_out out = {}; + float4 _137 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0); + float3 _142 = (_137.xyz / float3(_137.w)) - float3(View.View_PreViewTranslation); + bool _165 = TranslucentBasePass.TranslucentBasePass_Shared_Fog_ApplyVolumetricFog > 0.0; + float4 _215; + if (_165) + { + float4 _172 = View.View_WorldToClip * float4(_142, 1.0); + float _173 = _172.w; + float4 _202; + if (_165) + { + _202 = TranslucentBasePass_Shared_Fog_IntegratedLightScattering.sample(View_SharedBilinearClampedSampler, float3(((_172.xy / float2(_173)).xy * float2(0.5, -0.5)) + float2(0.5), (log2((_173 * View.View_VolumetricFogGridZParams[0]) + View.View_VolumetricFogGridZParams[1]) * View.View_VolumetricFogGridZParams[2]) * View.View_VolumetricFogInvGridSize[2]), level(0.0)); + } + else + { + _202 = float4(0.0, 0.0, 0.0, 1.0); + } + _215 = float4(_202.xyz + (in.in_var_TEXCOORD7.xyz * float3(_202.w)), _202.w * in.in_var_TEXCOORD7.w); + } + else + { + _215 = in.in_var_TEXCOORD7; + } + float3 _216 = fast::max(Material.Material_VectorExpressions[1].xyz * float3(((1.0 + dot(float3(-1.0, -1.5, 3.0) / float3(sqrt(12.25)), normalize(float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz) * normalize((float3(0.0, 0.0, 1.0) * float3(View.View_NormalOverrideParameter.w)) + View.View_NormalOverrideParameter.xyz)))) * 0.5) + 0.20000000298023223876953125), float3(0.0)); + float3 _246; + if (View.View_OutOfBoundsMask > 0.0) + { + uint _222 = in.in_var_PRIMITIVE_ID * 26u; + float3 _245; + if (any(abs(_142 - View_PrimitiveSceneData._m0[_222 + 5u].xyz) > (View_PrimitiveSceneData._m0[_222 + 19u].xyz + float3(1.0)))) + { + _245 = mix(float3(1.0, 1.0, 0.0), float3(0.0, 1.0, 1.0), select(float3(0.0), float3(1.0), float3(fract(dot(_142, float3(0.57700002193450927734375)) * 0.00200000009499490261077880859375)) > float3(0.5))); + } + else + { + _245 = _216; + } + _246 = _245; + } + else + { + _246 = _216; + } + float4 _256 = float4((_246 * float3(_215.w)) + _215.xyz, _108); + _256.w = 1.0; + float4 _268; + uint _269; + if (View.View_NumSceneColorMSAASamples > 1) + { + _268 = _256 * float4(float(View.View_NumSceneColorMSAASamples) * 0.25); + _269 = gl_SampleMaskIn & 15u; + } + else + { + _268 = _256; + _269 = gl_SampleMaskIn; + } + out.out_var_SV_Target0 = _268; + out.gl_SampleMask = _269; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag new file mode 100644 index 000000000..02cfc8829 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag @@ -0,0 +1,213 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Globals +{ + float3 SoftTransitionScale; + float4 ShadowBufferSize; + float ShadowFadeFraction; + float ShadowSharpen; + float4 LightPositionAndInvRadius; + float4x4 ScreenToShadowMatrix; + float2 ProjectionDepthBiasParameters; + float4 ModulatedShadowColor; + float4 ShadowTileOffsetAndSize; +}; + +constant float4 _58 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +fragment main0_out main0(constant type_View& View [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], float4 _gl_LastFragData [[color(0)]], texture2d ShadowDepthTexture [[texture(1)]], sampler ShadowDepthTextureSampler [[sampler(0)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + float4 _67 = _gl_LastFragData; + float _68 = _67.w; + float4 _82 = _Globals.ScreenToShadowMatrix * float4((((gl_FragCoord.xy * View.View_BufferSizeAndInvSize.zw) - View.View_ScreenPositionScaleBias.wz) / View.View_ScreenPositionScaleBias.xy) * float2(_68), _68, 1.0); + float _118 = fast::clamp(((fast::clamp((ShadowDepthTexture.sample(ShadowDepthTextureSampler, (((_82.xyz / float3(_82.w)).xy * _Globals.ShadowTileOffsetAndSize.zw).xy + _Globals.ShadowTileOffsetAndSize.xy).xy, level(0.0)).xxx * float3(_Globals.SoftTransitionScale.z)) - float3((fast::min(_82.z, 0.999989986419677734375) * _Globals.SoftTransitionScale.z) - 1.0), float3(0.0), float3(1.0)).x - 0.5) * _Globals.ShadowSharpen) + 0.5, 0.0, 1.0); + float3 _127 = mix(_Globals.ModulatedShadowColor.xyz, float3(1.0), float3(mix(1.0, _118 * _118, _Globals.ShadowFadeFraction))); + float4 _129 = float4(_127.x, _127.y, _127.z, _58.w); + _129.w = 0.0; + out.out_var_SV_Target0 = _129; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/texture-atomics.asm.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/texture-atomics.asm.frag new file mode 100644 index 000000000..a416259d8 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/texture-atomics.asm.frag @@ -0,0 +1,121 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _107 = _103 + 1u; + if (all(CulledObjectBoxBounds._m0[_107].xy > _96.xy) && all(CulledObjectBoxBounds._m0[_103].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[_160] - (float3(0.5) * (CulledObjectBoxBounds._m0[_103].xyz + CulledObjectBoxBounds._m0[_107].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[_103 + 2u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 3u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 4u].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag new file mode 100644 index 000000000..85e27bd1e --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag @@ -0,0 +1,122 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant uint* spvBufferSizeConstants [[buffer(25)]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + constant uint& CulledObjectBoxBoundsBufferSize = spvBufferSizeConstants[0]; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _186 = clamp(_103 + 1u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u); + if (all(CulledObjectBoxBounds._m0[_186].xy > _96.xy) && all(CulledObjectBoxBounds._m0[clamp(_103, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[int(clamp(uint(_160), uint(0), uint(7)))] - (float3(0.5) * (CulledObjectBoxBounds._m0[clamp(_103, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz + CulledObjectBoxBounds._m0[_186].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[clamp(_103 + 2u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz), dot(_166, CulledObjectBoxBounds._m0[clamp(_103 + 3u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz), dot(_166, CulledObjectBoxBounds._m0[clamp(_103 + 4u, 0u, ((CulledObjectBoxBoundsBufferSize - 0) / 16) - 1u)].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc new file mode 100644 index 000000000..47a957663 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc @@ -0,0 +1,399 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; + float4 Color; + spvUnsafeArray TexCoords; + float4 LightMapCoordinate; + uint PrimitiveId; + uint LightmapDataIndex; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FSharedBasePassInterpolants +{ +}; +struct FBasePassInterpolantsVSToDS +{ + FSharedBasePassInterpolants _m0; +}; + +struct FBasePassVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + FBasePassInterpolantsVSToDS BasePassInterpolants; + float4 Position; +}; + +struct FPNTessellationHSToDS +{ + FBasePassVSToDS PassSpecificData; + spvUnsafeArray WorldPosition; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +constant float4 _600 = {}; + +struct main0_out +{ + float4 out_var_COLOR0; + uint out_var_LIGHTMAP_ID; + float3 out_var_PN_DisplacementScales; + spvUnsafeArray out_var_PN_POSITION; + float out_var_PN_TessellationMultiplier; + float out_var_PN_WorldDisplacementMultiplier; + uint out_var_PRIMITIVE_ID; + spvUnsafeArray out_var_TEXCOORD0; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_TEXCOORD4; + float4 out_var_VS_To_DS_Position; +}; + +struct main0_patchOut +{ + float4 out_var_PN_POSITION9; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_COLOR0 [[attribute(2)]]; + float4 in_var_TEXCOORD0_0 [[attribute(3)]]; + float4 in_var_TEXCOORD4 [[attribute(4)]]; + uint in_var_PRIMITIVE_ID [[attribute(5)]]; + uint in_var_LIGHTMAP_ID [[attribute(6)]]; + float4 in_var_VS_To_DS_Position [[attribute(7)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], const device type_StructuredBuffer_v4float& View_PrimitiveSceneData [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FPNTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _144 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _145 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _146 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _147 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray _148 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD4, gl_in[1].in_var_TEXCOORD4, gl_in[2].in_var_TEXCOORD4, gl_in[3].in_var_TEXCOORD4, gl_in[4].in_var_TEXCOORD4, gl_in[5].in_var_TEXCOORD4, gl_in[6].in_var_TEXCOORD4, gl_in[7].in_var_TEXCOORD4, gl_in[8].in_var_TEXCOORD4, gl_in[9].in_var_TEXCOORD4, gl_in[10].in_var_TEXCOORD4, gl_in[11].in_var_TEXCOORD4 }); + spvUnsafeArray _149 = spvUnsafeArray({ gl_in[0].in_var_PRIMITIVE_ID, gl_in[1].in_var_PRIMITIVE_ID, gl_in[2].in_var_PRIMITIVE_ID, gl_in[3].in_var_PRIMITIVE_ID, gl_in[4].in_var_PRIMITIVE_ID, gl_in[5].in_var_PRIMITIVE_ID, gl_in[6].in_var_PRIMITIVE_ID, gl_in[7].in_var_PRIMITIVE_ID, gl_in[8].in_var_PRIMITIVE_ID, gl_in[9].in_var_PRIMITIVE_ID, gl_in[10].in_var_PRIMITIVE_ID, gl_in[11].in_var_PRIMITIVE_ID }); + spvUnsafeArray _150 = spvUnsafeArray({ gl_in[0].in_var_LIGHTMAP_ID, gl_in[1].in_var_LIGHTMAP_ID, gl_in[2].in_var_LIGHTMAP_ID, gl_in[3].in_var_LIGHTMAP_ID, gl_in[4].in_var_LIGHTMAP_ID, gl_in[5].in_var_LIGHTMAP_ID, gl_in[6].in_var_LIGHTMAP_ID, gl_in[7].in_var_LIGHTMAP_ID, gl_in[8].in_var_LIGHTMAP_ID, gl_in[9].in_var_LIGHTMAP_ID, gl_in[10].in_var_LIGHTMAP_ID, gl_in[11].in_var_LIGHTMAP_ID }); + spvUnsafeArray _259 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _284 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[0], _145[0], _146[0], _147[0], _148[0], _149[0], _150[0] } }, FBasePassInterpolantsVSToDS{ { } }, _259[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[1], _145[1], _146[1], _147[1], _148[1], _149[1], _150[1] } }, FBasePassInterpolantsVSToDS{ { } }, _259[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[2], _145[2], _146[2], _147[2], _148[2], _149[2], _150[2] } }, FBasePassInterpolantsVSToDS{ { } }, _259[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[3], _145[3], _146[3], _147[3], _148[3], _149[3], _150[3] } }, FBasePassInterpolantsVSToDS{ { } }, _259[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[4], _145[4], _146[4], _147[4], _148[4], _149[4], _150[4] } }, FBasePassInterpolantsVSToDS{ { } }, _259[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[5], _145[5], _146[5], _147[5], _148[5], _149[5], _150[5] } }, FBasePassInterpolantsVSToDS{ { } }, _259[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[6], _145[6], _146[6], _147[6], _148[6], _149[6], _150[6] } }, FBasePassInterpolantsVSToDS{ { } }, _259[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[7], _145[7], _146[7], _147[7], _148[7], _149[7], _150[7] } }, FBasePassInterpolantsVSToDS{ { } }, _259[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[8], _145[8], _146[8], _147[8], _148[8], _149[8], _150[8] } }, FBasePassInterpolantsVSToDS{ { } }, _259[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[9], _145[9], _146[9], _147[9], _148[9], _149[9], _150[9] } }, FBasePassInterpolantsVSToDS{ { } }, _259[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[10], _145[10], _146[10], _147[10], _148[10], _149[10], _150[10] } }, FBasePassInterpolantsVSToDS{ { } }, _259[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[11], _145[11], _146[11], _147[11], _148[11], _149[11], _150[11] } }, FBasePassInterpolantsVSToDS{ { } }, _259[11] } }); + spvUnsafeArray param_var_I; + param_var_I = _284; + float4 _301 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _310 = View_PrimitiveSceneData._m0[(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId * 26u) + 22u].xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _313 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _314 = 2u * gl_InvocationID; + uint _315 = 3u + _314; + uint _316 = _314 + 4u; + float4 _328 = float4(param_var_I[_313].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _336 = float4(param_var_I[_315].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _344 = float4(param_var_I[_316].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _392 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_313].Position) - (float4(dot(param_var_I[_313].Position - param_var_I[gl_InvocationID].Position, _301)) * _301)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_315].Position) + param_var_I[_316].Position) - (float4(dot(param_var_I[_316].Position - param_var_I[_315].Position, _336)) * _336)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_313].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_313].Position, _328)) * _328)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_316].Position) + param_var_I[_315].Position) - (float4(dot(param_var_I[_315].Position - param_var_I[_316].Position, _344)) * _344)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_COLOR0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.Color; + gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TexCoords; + gl_out[gl_InvocationID].out_var_TEXCOORD4 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.LightMapCoordinate; + gl_out[gl_InvocationID].out_var_PRIMITIVE_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId; + gl_out[gl_InvocationID].out_var_LIGHTMAP_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.LightmapDataIndex; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_PN_POSITION = _392; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _310; + gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _392, _310, 1.0, 1.0 }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _450 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); + float4 _463 = _600; + _463.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _469 = _463; + _469.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _474 = _469; + _474.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _481 = _474; + _481.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _589; + for (;;) + { + float4 _489 = View.View_ViewToClip * float4(0.0); + float4 _494 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _495 = _494.xyz; + float3 _496 = _489.xyz; + float _498 = _494.w; + float _499 = _489.w; + float4 _516 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _517 = _516.xyz; + float _519 = _516.w; + float4 _537 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _538 = _537.xyz; + float _540 = _537.w; + if (any((((select(int3(0), int3(1), (_495 - _496) < float3(_498 + _499)) + (int3(2) * select(int3(0), int3(1), (_495 + _496) > float3((-_498) - _499)))) | (select(int3(0), int3(1), (_517 - _496) < float3(_519 + _499)) + (int3(2) * select(int3(0), int3(1), (_517 + _496) > float3((-_519) - _499))))) | (select(int3(0), int3(1), (_538 - _496) < float3(_540 + _499)) + (int3(2) * select(int3(0), int3(1), (_538 + _496) > float3((-_540) - _499))))) != int3(3))) + { + _589 = float4(0.0); + break; + } + float3 _558 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _559 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _560 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _563 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _566 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _569 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _573 = sqrt(dot(_559, _559) / dot(_566, _566)); + float _577 = sqrt(dot(_560, _560) / dot(_569, _569)); + float _581 = sqrt(dot(_558, _558) / dot(_563, _563)); + float4 _586 = float4(_573, _577, _581, 1.0); + _586.w = 0.333000004291534423828125 * ((_573 + _577) + _581); + _589 = float4(View.View_AdaptiveTessellationFactor) * _586; + break; + } + float4 _591 = fast::clamp(_481 * _589, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_591.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_591.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_591.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_591.w); + patchOut.out_var_PN_POSITION9 = _450 + ((_450 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + } +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc new file mode 100644 index 000000000..f41095a31 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc @@ -0,0 +1,467 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FHitProxyVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + float4 Position; + uint VertexID; +}; + +struct FHullShaderConstantDominantVertexData +{ + float2 UV; + float4 Normal; + float3 Tangent; +}; + +struct FHullShaderConstantDominantEdgeData +{ + float2 UV0; + float2 UV1; + float4 Normal0; + float4 Normal1; + float3 Tangent0; + float3 Tangent1; +}; + +struct FPNTessellationHSToDS +{ + FHitProxyVSToDS PassSpecificData; + spvUnsafeArray WorldPosition; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; + FHullShaderConstantDominantVertexData DominantVertex; + FHullShaderConstantDominantEdgeData DominantEdge; +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_DrawsVelocity; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + uint Primitive_LightingChannelMask; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightmapDataIndex; + packed_float3 Primitive_PreSkinnedLocalBounds; + int Primitive_SingleCaptureIndex; + uint Primitive_OutputVelocity; + uint PrePadding_Primitive_420; + uint PrePadding_Primitive_424; + uint PrePadding_Primitive_428; + float4 Primitive_CustomPrimitiveData[4]; +}; + +constant float4 _611 = {}; + +struct main0_out +{ + float3 out_var_PN_DisplacementScales; + float2 out_var_PN_DominantEdge; + float2 out_var_PN_DominantEdge1; + float4 out_var_PN_DominantEdge2; + float4 out_var_PN_DominantEdge3; + float3 out_var_PN_DominantEdge4; + float3 out_var_PN_DominantEdge5; + float2 out_var_PN_DominantVertex; + float4 out_var_PN_DominantVertex1; + float3 out_var_PN_DominantVertex2; + spvUnsafeArray out_var_PN_POSITION; + float out_var_PN_TessellationMultiplier; + float out_var_PN_WorldDisplacementMultiplier; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_VS_To_DS_Position; + uint out_var_VS_To_DS_VertexID; +}; + +struct main0_patchOut +{ + float4 out_var_PN_POSITION9; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_VS_To_DS_Position [[attribute(2)]]; + uint in_var_VS_To_DS_VertexID [[attribute(3)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Primitive& Primitive [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FPNTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _142 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _143 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _192 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _193 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_VertexID, gl_in[1].in_var_VS_To_DS_VertexID, gl_in[2].in_var_VS_To_DS_VertexID, gl_in[3].in_var_VS_To_DS_VertexID, gl_in[4].in_var_VS_To_DS_VertexID, gl_in[5].in_var_VS_To_DS_VertexID, gl_in[6].in_var_VS_To_DS_VertexID, gl_in[7].in_var_VS_To_DS_VertexID, gl_in[8].in_var_VS_To_DS_VertexID, gl_in[9].in_var_VS_To_DS_VertexID, gl_in[10].in_var_VS_To_DS_VertexID, gl_in[11].in_var_VS_To_DS_VertexID }); + spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0] } }, _192[0], _193[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1] } }, _192[1], _193[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2] } }, _192[2], _193[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3] } }, _192[3], _193[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4] } }, _192[4], _193[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5] } }, _192[5], _193[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6] } }, _192[6], _193[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7] } }, _192[7], _193[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8] } }, _192[8], _193[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9] } }, _192[9], _193[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10] } }, _192[10], _193[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11] } }, _192[11], _193[11] } }); + spvUnsafeArray param_var_I; + param_var_I = _230; + float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _255 = 2u * gl_InvocationID; + uint _256 = 3u + _255; + uint _257 = _255 + 4u; + uint _264 = (_254 < 2u) ? (_254 + 1u) : 0u; + uint _265 = 2u * _254; + uint _266 = 3u + _265; + uint _267 = _265 + 4u; + float4 _279 = float4(param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _315; + float4 _316; + float4 _317; + float4 _318; + if ((param_var_I[_266].VertexID < param_var_I[_254].VertexID) || ((param_var_I[_266].VertexID == param_var_I[_254].VertexID) && (param_var_I[_267].VertexID < param_var_I[_264].VertexID))) + { + _315 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _316 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _317 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _318 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + } + else + { + _315 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _316 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _317 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _318 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + } + float4 _324 = float4(_318.xyz, 0.0); + float4 _328 = float4(_316.xyz, 0.0); + float4 _336 = float4(param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _344 = float4(param_var_I[_256].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _352 = float4(param_var_I[_257].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _402 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _344)) * _344)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _336)) * _336)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _352)) * _352)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_VS_To_DS_VertexID = param_var_I[gl_InvocationID].VertexID; + gl_out[gl_InvocationID].out_var_PN_POSITION = _402; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_DominantVertex = float2(0.0); + gl_out[gl_InvocationID].out_var_PN_DominantVertex1 = _279; + gl_out[gl_InvocationID].out_var_PN_DominantVertex2 = param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz; + gl_out[gl_InvocationID].out_var_PN_DominantEdge = float2(0.0); + gl_out[gl_InvocationID].out_var_PN_DominantEdge1 = float2(0.0); + gl_out[gl_InvocationID].out_var_PN_DominantEdge2 = _324; + gl_out[gl_InvocationID].out_var_PN_DominantEdge3 = _328; + gl_out[gl_InvocationID].out_var_PN_DominantEdge4 = _317.xyz; + gl_out[gl_InvocationID].out_var_PN_DominantEdge5 = _315.xyz; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _402, _251, 1.0, 1.0, FHullShaderConstantDominantVertexData{ float2(0.0), _279, param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz }, FHullShaderConstantDominantEdgeData{ float2(0.0), float2(0.0), _324, _328, _317.xyz, _315.xyz } }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _461 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); + float4 _474 = _611; + _474.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _480 = _474; + _480.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _485 = _480; + _485.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _492 = _485; + _492.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _600; + for (;;) + { + float4 _500 = View.View_ViewToClip * float4(0.0); + float4 _505 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _506 = _505.xyz; + float3 _507 = _500.xyz; + float _509 = _505.w; + float _510 = _500.w; + float4 _527 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _528 = _527.xyz; + float _530 = _527.w; + float4 _548 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _549 = _548.xyz; + float _551 = _548.w; + if (any((((select(int3(0), int3(1), (_506 - _507) < float3(_509 + _510)) + (int3(2) * select(int3(0), int3(1), (_506 + _507) > float3((-_509) - _510)))) | (select(int3(0), int3(1), (_528 - _507) < float3(_530 + _510)) + (int3(2) * select(int3(0), int3(1), (_528 + _507) > float3((-_530) - _510))))) | (select(int3(0), int3(1), (_549 - _507) < float3(_551 + _510)) + (int3(2) * select(int3(0), int3(1), (_549 + _507) > float3((-_551) - _510))))) != int3(3))) + { + _600 = float4(0.0); + break; + } + float3 _569 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _570 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _571 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _574 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _577 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _580 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _584 = sqrt(dot(_570, _570) / dot(_577, _577)); + float _588 = sqrt(dot(_571, _571) / dot(_580, _580)); + float _592 = sqrt(dot(_569, _569) / dot(_574, _574)); + float4 _597 = float4(_584, _588, _592, 1.0); + _597.w = 0.333000004291534423828125 * ((_584 + _588) + _592); + _600 = float4(View.View_AdaptiveTessellationFactor) * _597; + break; + } + float4 _602 = fast::clamp(_492 * _600, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_602.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_602.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_602.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_602.w); + patchOut.out_var_PN_POSITION9 = _461 + ((_461 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + } +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc new file mode 100644 index 000000000..51c2a1dee --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc @@ -0,0 +1,411 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; + float4 Color; + spvUnsafeArray TexCoords; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FHitProxyVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + float4 Position; +}; + +struct FPNTessellationHSToDS +{ + FHitProxyVSToDS PassSpecificData; + spvUnsafeArray WorldPosition; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_DrawsVelocity; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + uint Primitive_LightingChannelMask; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightmapDataIndex; + packed_float3 Primitive_PreSkinnedLocalBounds; + int Primitive_SingleCaptureIndex; + uint Primitive_OutputVelocity; + uint PrePadding_Primitive_420; + uint PrePadding_Primitive_424; + uint PrePadding_Primitive_428; + float4 Primitive_CustomPrimitiveData[4]; +}; + +constant float4 _535 = {}; + +struct main0_out +{ + float4 out_var_COLOR0; + float3 out_var_PN_DisplacementScales; + spvUnsafeArray out_var_PN_POSITION; + float out_var_PN_TessellationMultiplier; + float out_var_PN_WorldDisplacementMultiplier; + spvUnsafeArray out_var_TEXCOORD0; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_VS_To_DS_Position; +}; + +struct main0_patchOut +{ + float4 out_var_PN_POSITION9; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_COLOR0 [[attribute(2)]]; + float2 in_var_TEXCOORD0_0 [[attribute(3)]]; + float2 in_var_TEXCOORD0_1 [[attribute(4)]]; + float4 in_var_VS_To_DS_Position [[attribute(5)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Primitive& Primitive [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FPNTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _129 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _130 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _131 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _132 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 }) }); + spvUnsafeArray _205 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[0], _130[0], _131[0], _132[0] } }, _205[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[1], _130[1], _131[1], _132[1] } }, _205[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[2], _130[2], _131[2], _132[2] } }, _205[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[3], _130[3], _131[3], _132[3] } }, _205[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[4], _130[4], _131[4], _132[4] } }, _205[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[5], _130[5], _131[5], _132[5] } }, _205[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[6], _130[6], _131[6], _132[6] } }, _205[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[7], _130[7], _131[7], _132[7] } }, _205[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[8], _130[8], _131[8], _132[8] } }, _205[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[9], _130[9], _131[9], _132[9] } }, _205[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[10], _130[10], _131[10], _132[10] } }, _205[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[11], _130[11], _131[11], _132[11] } }, _205[11] } }); + spvUnsafeArray param_var_I; + param_var_I = _230; + float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _255 = 2u * gl_InvocationID; + uint _256 = 3u + _255; + uint _257 = _255 + 4u; + float4 _269 = float4(param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _277 = float4(param_var_I[_256].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _285 = float4(param_var_I[_257].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _333 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _277)) * _277)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _269)) * _269)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _285)) * _285)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_COLOR0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.Color; + gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TexCoords; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_PN_POSITION = _333; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _333, _251, 1.0, 1.0 }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _385 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); + float4 _398 = _535; + _398.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _404 = _398; + _404.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _409 = _404; + _409.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _416 = _409; + _416.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _524; + for (;;) + { + float4 _424 = View.View_ViewToClip * float4(0.0); + float4 _429 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _430 = _429.xyz; + float3 _431 = _424.xyz; + float _433 = _429.w; + float _434 = _424.w; + float4 _451 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _452 = _451.xyz; + float _454 = _451.w; + float4 _472 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _473 = _472.xyz; + float _475 = _472.w; + if (any((((select(int3(0), int3(1), (_430 - _431) < float3(_433 + _434)) + (int3(2) * select(int3(0), int3(1), (_430 + _431) > float3((-_433) - _434)))) | (select(int3(0), int3(1), (_452 - _431) < float3(_454 + _434)) + (int3(2) * select(int3(0), int3(1), (_452 + _431) > float3((-_454) - _434))))) | (select(int3(0), int3(1), (_473 - _431) < float3(_475 + _434)) + (int3(2) * select(int3(0), int3(1), (_473 + _431) > float3((-_475) - _434))))) != int3(3))) + { + _524 = float4(0.0); + break; + } + float3 _493 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _494 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _495 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _498 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _501 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _504 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _508 = sqrt(dot(_494, _494) / dot(_501, _501)); + float _512 = sqrt(dot(_495, _495) / dot(_504, _504)); + float _516 = sqrt(dot(_493, _493) / dot(_498, _498)); + float4 _521 = float4(_508, _512, _516, 1.0); + _521.w = 0.333000004291534423828125 * ((_508 + _512) + _516); + _524 = float4(View.View_AdaptiveTessellationFactor) * _521; + break; + } + float4 _526 = fast::clamp(_416 * _524, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_526.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_526.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_526.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_526.w); + patchOut.out_var_PN_POSITION9 = _385 + ((_385 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + } +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc new file mode 100644 index 000000000..13ea8bb71 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc @@ -0,0 +1,178 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FSharedBasePassInterpolants +{ +}; +struct FBasePassInterpolantsVSToDS +{ + FSharedBasePassInterpolants _m0; +}; + +struct FBasePassVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + FBasePassInterpolantsVSToDS BasePassInterpolants; + float4 Position; +}; + +struct FFlatTessellationHSToDS +{ + FBasePassVSToDS PassSpecificData; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_DrawsVelocity; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + uint Primitive_LightingChannelMask; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightmapDataIndex; + packed_float3 Primitive_PreSkinnedLocalBounds; + int Primitive_SingleCaptureIndex; + uint Primitive_OutputVelocity; + uint PrePadding_Primitive_420; + uint PrePadding_Primitive_424; + uint PrePadding_Primitive_428; + float4 Primitive_CustomPrimitiveData[4]; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[3]; + float4 Material_ScalarExpressions[1]; +}; + +constant float4 _182 = {}; + +struct main0_out +{ + float3 out_var_Flat_DisplacementScales; + float out_var_Flat_TessellationMultiplier; + float out_var_Flat_WorldDisplacementMultiplier; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_VS_To_DS_Position; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_VS_To_DS_Position [[attribute(2)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_Primitive& Primitive [[buffer(0)]], constant type_Material& Material [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FFlatTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _90 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _91 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _104 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position }); + spvUnsafeArray _111 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[0], _91[0] } }, FBasePassInterpolantsVSToDS{ { } }, _104[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[1], _91[1] } }, FBasePassInterpolantsVSToDS{ { } }, _104[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[2], _91[2] } }, FBasePassInterpolantsVSToDS{ { } }, _104[2] } }); + spvUnsafeArray param_var_I; + param_var_I = _111; + float3 _128 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_Flat_DisplacementScales = _128; + gl_out[gl_InvocationID].out_var_Flat_TessellationMultiplier = Material.Material_ScalarExpressions[0].x; + gl_out[gl_InvocationID].out_var_Flat_WorldDisplacementMultiplier = 1.0; + temp_var_hullMainRetVal[gl_InvocationID] = FFlatTessellationHSToDS{ param_var_I[gl_InvocationID], _128, Material.Material_ScalarExpressions[0].x, 1.0 }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _154 = _182; + _154.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _160 = _154; + _160.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _165 = _160; + _165.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _172 = _165; + _172.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _173 = fast::clamp(_172, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_173.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_173.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_173.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_173.w); + } +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese new file mode 100644 index 000000000..19e402e67 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese @@ -0,0 +1,419 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_ShadowDepthPass +{ + float PrePadding_ShadowDepthPass_LPV_0; + float PrePadding_ShadowDepthPass_LPV_4; + float PrePadding_ShadowDepthPass_LPV_8; + float PrePadding_ShadowDepthPass_LPV_12; + float PrePadding_ShadowDepthPass_LPV_16; + float PrePadding_ShadowDepthPass_LPV_20; + float PrePadding_ShadowDepthPass_LPV_24; + float PrePadding_ShadowDepthPass_LPV_28; + float PrePadding_ShadowDepthPass_LPV_32; + float PrePadding_ShadowDepthPass_LPV_36; + float PrePadding_ShadowDepthPass_LPV_40; + float PrePadding_ShadowDepthPass_LPV_44; + float PrePadding_ShadowDepthPass_LPV_48; + float PrePadding_ShadowDepthPass_LPV_52; + float PrePadding_ShadowDepthPass_LPV_56; + float PrePadding_ShadowDepthPass_LPV_60; + float PrePadding_ShadowDepthPass_LPV_64; + float PrePadding_ShadowDepthPass_LPV_68; + float PrePadding_ShadowDepthPass_LPV_72; + float PrePadding_ShadowDepthPass_LPV_76; + float PrePadding_ShadowDepthPass_LPV_80; + float PrePadding_ShadowDepthPass_LPV_84; + float PrePadding_ShadowDepthPass_LPV_88; + float PrePadding_ShadowDepthPass_LPV_92; + float PrePadding_ShadowDepthPass_LPV_96; + float PrePadding_ShadowDepthPass_LPV_100; + float PrePadding_ShadowDepthPass_LPV_104; + float PrePadding_ShadowDepthPass_LPV_108; + float PrePadding_ShadowDepthPass_LPV_112; + float PrePadding_ShadowDepthPass_LPV_116; + float PrePadding_ShadowDepthPass_LPV_120; + float PrePadding_ShadowDepthPass_LPV_124; + float PrePadding_ShadowDepthPass_LPV_128; + float PrePadding_ShadowDepthPass_LPV_132; + float PrePadding_ShadowDepthPass_LPV_136; + float PrePadding_ShadowDepthPass_LPV_140; + float PrePadding_ShadowDepthPass_LPV_144; + float PrePadding_ShadowDepthPass_LPV_148; + float PrePadding_ShadowDepthPass_LPV_152; + float PrePadding_ShadowDepthPass_LPV_156; + float PrePadding_ShadowDepthPass_LPV_160; + float PrePadding_ShadowDepthPass_LPV_164; + float PrePadding_ShadowDepthPass_LPV_168; + float PrePadding_ShadowDepthPass_LPV_172; + float PrePadding_ShadowDepthPass_LPV_176; + float PrePadding_ShadowDepthPass_LPV_180; + float PrePadding_ShadowDepthPass_LPV_184; + float PrePadding_ShadowDepthPass_LPV_188; + float PrePadding_ShadowDepthPass_LPV_192; + float PrePadding_ShadowDepthPass_LPV_196; + float PrePadding_ShadowDepthPass_LPV_200; + float PrePadding_ShadowDepthPass_LPV_204; + float PrePadding_ShadowDepthPass_LPV_208; + float PrePadding_ShadowDepthPass_LPV_212; + float PrePadding_ShadowDepthPass_LPV_216; + float PrePadding_ShadowDepthPass_LPV_220; + float PrePadding_ShadowDepthPass_LPV_224; + float PrePadding_ShadowDepthPass_LPV_228; + float PrePadding_ShadowDepthPass_LPV_232; + float PrePadding_ShadowDepthPass_LPV_236; + float PrePadding_ShadowDepthPass_LPV_240; + float PrePadding_ShadowDepthPass_LPV_244; + float PrePadding_ShadowDepthPass_LPV_248; + float PrePadding_ShadowDepthPass_LPV_252; + float PrePadding_ShadowDepthPass_LPV_256; + float PrePadding_ShadowDepthPass_LPV_260; + float PrePadding_ShadowDepthPass_LPV_264; + float PrePadding_ShadowDepthPass_LPV_268; + float4x4 ShadowDepthPass_LPV_mRsmToWorld; + float4 ShadowDepthPass_LPV_mLightColour; + float4 ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection; + float4 ShadowDepthPass_LPV_mEyePos; + packed_int3 ShadowDepthPass_LPV_mOldGridOffset; + int PrePadding_ShadowDepthPass_LPV_396; + packed_int3 ShadowDepthPass_LPV_mLpvGridOffset; + float ShadowDepthPass_LPV_ClearMultiplier; + float ShadowDepthPass_LPV_LpvScale; + float ShadowDepthPass_LPV_OneOverLpvScale; + float ShadowDepthPass_LPV_DirectionalOcclusionIntensity; + float ShadowDepthPass_LPV_DirectionalOcclusionRadius; + float ShadowDepthPass_LPV_RsmAreaIntensityMultiplier; + float ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier; + float ShadowDepthPass_LPV_SecondaryOcclusionStrength; + float ShadowDepthPass_LPV_SecondaryBounceStrength; + float ShadowDepthPass_LPV_VplInjectionBias; + float ShadowDepthPass_LPV_GeometryVolumeInjectionBias; + float ShadowDepthPass_LPV_EmissiveInjectionMultiplier; + int ShadowDepthPass_LPV_PropagationIndex; + float4x4 ShadowDepthPass_ProjectionMatrix; + float4x4 ShadowDepthPass_ViewMatrix; + float4 ShadowDepthPass_ShadowParams; + float ShadowDepthPass_bClampToNearPlane; + float PrePadding_ShadowDepthPass_612; + float PrePadding_ShadowDepthPass_616; + float PrePadding_ShadowDepthPass_620; + float4x4 ShadowDepthPass_ShadowViewProjectionMatrices[6]; + float4x4 ShadowDepthPass_ShadowViewMatrices[6]; +}; + +constant float4 _113 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; + float4 out_var_COLOR0 [[user(locn2)]]; + float4 out_var_TEXCOORD0_0 [[user(locn3)]]; + uint out_var_PRIMITIVE_ID [[user(locn4)]]; + float out_var_TEXCOORD6 [[user(locn5)]]; + float out_var_TEXCOORD8 [[user(locn6)]]; + float3 out_var_TEXCOORD7 [[user(locn7)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_COLOR0 [[attribute(0)]]; + float4 in_var_PN_POSITION_0 [[attribute(2)]]; + float4 in_var_PN_POSITION_1 [[attribute(3)]]; + float4 in_var_PN_POSITION_2 [[attribute(4)]]; + float in_var_PN_WorldDisplacementMultiplier [[attribute(7)]]; + uint in_var_PRIMITIVE_ID [[attribute(8)]]; + float4 in_var_TEXCOORD0_0 [[attribute(9)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(10)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(11)]]; +}; + +struct main0_patchIn +{ + float4 in_var_PN_POSITION9 [[attribute(5)]]; + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], constant type_ShadowDepthPass& ShadowDepthPass [[buffer(1)]], texture2d Material_Texture2D_3 [[texture(0)]], sampler Material_Texture2D_3Sampler [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray out_var_TEXCOORD0 = {}; + spvUnsafeArray _117 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _118 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _119 = spvUnsafeArray({ patchIn.gl_in[0].in_var_COLOR0, patchIn.gl_in[1].in_var_COLOR0, patchIn.gl_in[2].in_var_COLOR0 }); + spvUnsafeArray, 3> _120 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray, 3> _135 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); + spvUnsafeArray _136 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier }); + float _157 = gl_TessCoord.x * gl_TessCoord.x; + float _158 = gl_TessCoord.y * gl_TessCoord.y; + float _159 = gl_TessCoord.z * gl_TessCoord.z; + float4 _165 = float4(gl_TessCoord.x); + float4 _169 = float4(gl_TessCoord.y); + float4 _174 = float4(gl_TessCoord.z); + float4 _177 = float4(_157 * 3.0); + float4 _181 = float4(_158 * 3.0); + float4 _188 = float4(_159 * 3.0); + float4 _202 = ((((((((((_135[0][0] * float4(_157)) * _165) + ((_135[1][0] * float4(_158)) * _169)) + ((_135[2][0] * float4(_159)) * _174)) + ((_135[0][1] * _177) * _169)) + ((_135[0][2] * _181) * _165)) + ((_135[1][1] * _181) * _174)) + ((_135[1][2] * _188) * _169)) + ((_135[2][1] * _188) * _165)) + ((_135[2][2] * _177) * _174)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _174) * _165) * _169); + float3 _226 = ((_117[0].xyz * float3(gl_TessCoord.x)) + (_117[1].xyz * float3(gl_TessCoord.y))).xyz + (_117[2].xyz * float3(gl_TessCoord.z)); + float4 _229 = ((_118[0] * _165) + (_118[1] * _169)) + (_118[2] * _174); + float4 _231 = ((_119[0] * _165) + (_119[1] * _169)) + (_119[2] * _174); + float4 _233 = ((_120[0][0] * _165) + (_120[1][0] * _169)) + (_120[2][0] * _174); + spvUnsafeArray _234 = spvUnsafeArray({ _233 }); + float3 _236 = _229.xyz; + float3 _264 = _202.xyz + (((float3((Material_Texture2D_3.sample(Material_Texture2D_3Sampler, (float2(View.View_GameTime * 0.20000000298023223876953125, View.View_GameTime * (-0.699999988079071044921875)) + (_233.zw * float2(1.0, 2.0))), level(-1.0)).x * 10.0) * (1.0 - _231.x)) * _236) * float3(0.5)) * float3(((_136[0] * gl_TessCoord.x) + (_136[1] * gl_TessCoord.y)) + (_136[2] * gl_TessCoord.z))); + float4 _270 = ShadowDepthPass.ShadowDepthPass_ProjectionMatrix * float4(_264.x, _264.y, _264.z, _202.w); + float4 _281; + if ((ShadowDepthPass.ShadowDepthPass_bClampToNearPlane > 0.0) && (_270.z < 0.0)) + { + float4 _279 = _270; + _279.z = 9.9999999747524270787835121154785e-07; + float4 _280 = _279; + _280.w = 1.0; + _281 = _280; + } + else + { + _281 = _270; + } + float _290 = abs(dot(float3(ShadowDepthPass.ShadowDepthPass_ViewMatrix[0].z, ShadowDepthPass.ShadowDepthPass_ViewMatrix[1].z, ShadowDepthPass.ShadowDepthPass_ViewMatrix[2].z), _236)); + out.out_var_TEXCOORD10_centroid = float4(_226.x, _226.y, _226.z, _113.w); + out.out_var_TEXCOORD11_centroid = _229; + out.out_var_COLOR0 = _231; + out_var_TEXCOORD0 = _234; + out.out_var_PRIMITIVE_ID = patchIn.gl_in[0u].in_var_PRIMITIVE_ID; + out.out_var_TEXCOORD6 = _281.z; + out.out_var_TEXCOORD8 = (ShadowDepthPass.ShadowDepthPass_ShadowParams.y * fast::clamp((abs(_290) > 0.0) ? (sqrt(fast::clamp(1.0 - (_290 * _290), 0.0, 1.0)) / _290) : ShadowDepthPass.ShadowDepthPass_ShadowParams.z, 0.0, ShadowDepthPass.ShadowDepthPass_ShadowParams.z)) + ShadowDepthPass.ShadowDepthPass_ShadowParams.x; + out.out_var_TEXCOORD7 = _264.xyz; + out.gl_Position = _281; + out.out_var_TEXCOORD0_0 = out_var_TEXCOORD0[0]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese new file mode 100644 index 000000000..d8921bb8e --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese @@ -0,0 +1,415 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; + float PrePadding_View_3048; + float PrePadding_View_3052; + float4x4 View_WorldToVirtualTexture; + float4 View_VirtualTextureParams; + float4 View_XRPassthroughCameraUVs[2]; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[5]; + float4 Material_ScalarExpressions[2]; +}; + +constant float4 _118 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD6 [[user(locn0)]]; + float4 out_var_TEXCOORD7 [[user(locn1)]]; + float4 out_var_TEXCOORD10_centroid [[user(locn2)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn3)]]; + float gl_ClipDistance [[clip_distance]] [1]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_PN_DominantEdge2 [[attribute(3)]]; + float4 in_var_PN_DominantEdge3 [[attribute(4)]]; + float3 in_var_PN_DominantEdge4 [[attribute(5)]]; + float3 in_var_PN_DominantEdge5 [[attribute(6)]]; + float4 in_var_PN_DominantVertex1 [[attribute(8)]]; + float3 in_var_PN_DominantVertex2 [[attribute(9)]]; + float4 in_var_PN_POSITION_0 [[attribute(10)]]; + float4 in_var_PN_POSITION_1 [[attribute(11)]]; + float4 in_var_PN_POSITION_2 [[attribute(12)]]; + float in_var_PN_WorldDisplacementMultiplier [[attribute(15)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(16)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(17)]]; + float4 in_var_TEXCOORD6 [[attribute(18)]]; + float4 in_var_TEXCOORD8 [[attribute(19)]]; +}; + +struct main0_patchIn +{ + float4 in_var_PN_POSITION9 [[attribute(13)]]; + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Material& Material [[buffer(1)]], texture3d View_GlobalDistanceFieldTexture0 [[texture(0)]], texture3d View_GlobalDistanceFieldTexture1 [[texture(1)]], texture3d View_GlobalDistanceFieldTexture2 [[texture(2)]], texture3d View_GlobalDistanceFieldTexture3 [[texture(3)]], sampler View_GlobalDistanceFieldSampler0 [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray _120 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD6, patchIn.gl_in[1].in_var_TEXCOORD6, patchIn.gl_in[2].in_var_TEXCOORD6 }); + spvUnsafeArray _121 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD8, patchIn.gl_in[1].in_var_TEXCOORD8, patchIn.gl_in[2].in_var_TEXCOORD8 }); + spvUnsafeArray _128 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _129 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray, 3> _136 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); + spvUnsafeArray _137 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier }); + spvUnsafeArray _138 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantVertex1, patchIn.gl_in[1].in_var_PN_DominantVertex1, patchIn.gl_in[2].in_var_PN_DominantVertex1 }); + spvUnsafeArray _139 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantVertex2, patchIn.gl_in[1].in_var_PN_DominantVertex2, patchIn.gl_in[2].in_var_PN_DominantVertex2 }); + spvUnsafeArray _146 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge2, patchIn.gl_in[1].in_var_PN_DominantEdge2, patchIn.gl_in[2].in_var_PN_DominantEdge2 }); + spvUnsafeArray _147 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge3, patchIn.gl_in[1].in_var_PN_DominantEdge3, patchIn.gl_in[2].in_var_PN_DominantEdge3 }); + spvUnsafeArray _148 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge4, patchIn.gl_in[1].in_var_PN_DominantEdge4, patchIn.gl_in[2].in_var_PN_DominantEdge4 }); + spvUnsafeArray _149 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge5, patchIn.gl_in[1].in_var_PN_DominantEdge5, patchIn.gl_in[2].in_var_PN_DominantEdge5 }); + float _190 = gl_TessCoord.x * gl_TessCoord.x; + float _191 = gl_TessCoord.y * gl_TessCoord.y; + float _192 = gl_TessCoord.z * gl_TessCoord.z; + float4 _198 = float4(gl_TessCoord.x); + float4 _202 = float4(gl_TessCoord.y); + float4 _207 = float4(gl_TessCoord.z); + float4 _210 = float4(_190 * 3.0); + float4 _214 = float4(_191 * 3.0); + float4 _221 = float4(_192 * 3.0); + float4 _235 = ((((((((((_136[0][0] * float4(_190)) * _198) + ((_136[1][0] * float4(_191)) * _202)) + ((_136[2][0] * float4(_192)) * _207)) + ((_136[0][1] * _210) * _202)) + ((_136[0][2] * _214) * _198)) + ((_136[1][1] * _214) * _207)) + ((_136[1][2] * _221) * _202)) + ((_136[2][1] * _221) * _198)) + ((_136[2][2] * _210) * _207)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _207) * _198) * _202); + float3 _237 = float3(gl_TessCoord.x); + float3 _240 = float3(gl_TessCoord.y); + float3 _254 = float3(gl_TessCoord.z); + float3 _256 = ((_128[0].xyz * _237) + (_128[1].xyz * _240)).xyz + (_128[2].xyz * _254); + float4 _259 = ((_129[0] * _198) + (_129[1] * _202)) + (_129[2] * _207); + float3 _264 = _235.xyz; + float3 _265 = _256.xyz; + float3 _266 = _259.xyz; + float3 _272 = _264 + float3(View.View_WorldCameraOrigin); + float _279 = float(int(gl_TessCoord.x == 0.0)); + float _282 = float(int(gl_TessCoord.y == 0.0)); + float _285 = float(int(gl_TessCoord.z == 0.0)); + float _286 = _279 + _282; + float _287 = _286 + _285; + float4 _387; + float3 _388; + if (float(int(_287 == 2.0)) == 1.0) + { + float _363 = float(int((_282 + _285) == 2.0)); + float _367 = float(int((_285 + _279) == 2.0)); + float _370 = float(int(_286 == 2.0)); + _387 = ((float4(_363) * _138[0]) + (float4(_367) * _138[1])) + (float4(_370) * _138[2]); + _388 = ((float3(_363) * _139[0]) + (float3(_367) * _139[1])) + (float3(_370) * _139[2]); + } + else + { + float4 _358; + float3 _359; + if (float(int(_287 == 1.0)) != 0.0) + { + float4 _304 = float4(_279); + float4 _306 = float4(_282); + float4 _309 = float4(_285); + float4 _311 = ((_304 * _146[0]) + (_306 * _146[1])) + (_309 * _146[2]); + float4 _316 = ((_304 * _147[0]) + (_306 * _147[1])) + (_309 * _147[2]); + float3 _331 = float3(_279); + float3 _333 = float3(_282); + float3 _336 = float3(_285); + float3 _338 = ((_331 * _148[0]) + (_333 * _148[1])) + (_336 * _148[2]); + float3 _343 = ((_331 * _149[0]) + (_333 * _149[1])) + (_336 * _149[2]); + _358 = ((_304 * ((_202 * _311) + (_207 * _316))) + (_306 * ((_207 * _311) + (_198 * _316)))) + (_309 * ((_198 * _311) + (_202 * _316))); + _359 = ((_331 * ((_240 * _338) + (_254 * _343))) + (_333 * ((_254 * _338) + (_237 * _343)))) + (_336 * ((_237 * _338) + (_240 * _343))); + } + else + { + _358 = float4(_259.xyz, 0.0); + _359 = _265; + } + _387 = _358; + _388 = _359; + } + float3x3 _398; + if (float(int(_287 == 0.0)) == 0.0) + { + _398 = float3x3(_388, cross(_387.xyz, _388) * float3(_387.w), _387.xyz); + } + else + { + _398 = float3x3(_265, cross(_266, _265) * float3(_259.w), _266); + } + float3 _411 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[0].xyz) + View.View_GlobalVolumeCenterAndExtent[0].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[0].xyz + View.View_GlobalVolumeCenterAndExtent[0].www) - _272, float3(0.0))); + float _547; + if (fast::min(_411.x, fast::min(_411.y, _411.z)) > (View.View_GlobalVolumeCenterAndExtent[0].w * View.View_GlobalVolumeTexelSize)) + { + _547 = View_GlobalDistanceFieldTexture0.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[0u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[0u].xyz), level(0.0)).x; + } + else + { + float3 _436 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[1].xyz) + View.View_GlobalVolumeCenterAndExtent[1].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[1].xyz + View.View_GlobalVolumeCenterAndExtent[1].www) - _272, float3(0.0))); + float _535; + if (fast::min(_436.x, fast::min(_436.y, _436.z)) > (View.View_GlobalVolumeCenterAndExtent[1].w * View.View_GlobalVolumeTexelSize)) + { + _535 = View_GlobalDistanceFieldTexture1.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[1u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[1u].xyz), level(0.0)).x; + } + else + { + float3 _459 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[2].xyz) + View.View_GlobalVolumeCenterAndExtent[2].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[2].xyz + View.View_GlobalVolumeCenterAndExtent[2].www) - _272, float3(0.0))); + float3 _475 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[3].xyz) + View.View_GlobalVolumeCenterAndExtent[3].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[3].xyz + View.View_GlobalVolumeCenterAndExtent[3].www) - _272, float3(0.0))); + float _480 = fast::min(_475.x, fast::min(_475.y, _475.z)); + float _523; + if (fast::min(_459.x, fast::min(_459.y, _459.z)) > (View.View_GlobalVolumeCenterAndExtent[2].w * View.View_GlobalVolumeTexelSize)) + { + _523 = View_GlobalDistanceFieldTexture2.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[2u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[2u].xyz), level(0.0)).x; + } + else + { + float _511; + if (_480 > (View.View_GlobalVolumeCenterAndExtent[3].w * View.View_GlobalVolumeTexelSize)) + { + _511 = mix(View.View_MaxGlobalDistance, View_GlobalDistanceFieldTexture3.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[3u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[3u].xyz), level(0.0)).x, fast::clamp((_480 * 10.0) * View.View_GlobalVolumeWorldToUVAddAndMul[3].w, 0.0, 1.0)); + } + else + { + _511 = View.View_MaxGlobalDistance; + } + _523 = _511; + } + _535 = _523; + } + _547 = _535; + } + float3 _565 = _264 + ((_398[2] * float3(fast::min(_547 + Material.Material_ScalarExpressions[0].z, 0.0) * Material.Material_ScalarExpressions[0].w)) * float3(((_137[0] * gl_TessCoord.x) + (_137[1] * gl_TessCoord.y)) + (_137[2] * gl_TessCoord.z))); + float4 _574 = View.View_TranslatedWorldToClip * float4(_565.x, _565.y, _565.z, _235.w); + float4 _579 = _574; + _579.z = _574.z + (0.001000000047497451305389404296875 * _574.w); + out.gl_Position = _579; + out.out_var_TEXCOORD6 = ((_120[0] * _198) + (_120[1] * _202)) + (_120[2] * _207); + out.out_var_TEXCOORD7 = ((_121[0] * _198) + (_121[1] * _202)) + (_121[2] * _207); + out.out_var_TEXCOORD10_centroid = float4(_256.x, _256.y, _256.z, _118.w); + out.out_var_TEXCOORD11_centroid = _259; + out.gl_ClipDistance[0u] = dot(View.View_GlobalClippingPlane, float4(_565.xyz - float3(View.View_PreViewTranslation), 1.0)); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese new file mode 100644 index 000000000..4a872e5f7 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese @@ -0,0 +1,216 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_ShadowDepthPass +{ + float PrePadding_ShadowDepthPass_LPV_0; + float PrePadding_ShadowDepthPass_LPV_4; + float PrePadding_ShadowDepthPass_LPV_8; + float PrePadding_ShadowDepthPass_LPV_12; + float PrePadding_ShadowDepthPass_LPV_16; + float PrePadding_ShadowDepthPass_LPV_20; + float PrePadding_ShadowDepthPass_LPV_24; + float PrePadding_ShadowDepthPass_LPV_28; + float PrePadding_ShadowDepthPass_LPV_32; + float PrePadding_ShadowDepthPass_LPV_36; + float PrePadding_ShadowDepthPass_LPV_40; + float PrePadding_ShadowDepthPass_LPV_44; + float PrePadding_ShadowDepthPass_LPV_48; + float PrePadding_ShadowDepthPass_LPV_52; + float PrePadding_ShadowDepthPass_LPV_56; + float PrePadding_ShadowDepthPass_LPV_60; + float PrePadding_ShadowDepthPass_LPV_64; + float PrePadding_ShadowDepthPass_LPV_68; + float PrePadding_ShadowDepthPass_LPV_72; + float PrePadding_ShadowDepthPass_LPV_76; + float PrePadding_ShadowDepthPass_LPV_80; + float PrePadding_ShadowDepthPass_LPV_84; + float PrePadding_ShadowDepthPass_LPV_88; + float PrePadding_ShadowDepthPass_LPV_92; + float PrePadding_ShadowDepthPass_LPV_96; + float PrePadding_ShadowDepthPass_LPV_100; + float PrePadding_ShadowDepthPass_LPV_104; + float PrePadding_ShadowDepthPass_LPV_108; + float PrePadding_ShadowDepthPass_LPV_112; + float PrePadding_ShadowDepthPass_LPV_116; + float PrePadding_ShadowDepthPass_LPV_120; + float PrePadding_ShadowDepthPass_LPV_124; + float PrePadding_ShadowDepthPass_LPV_128; + float PrePadding_ShadowDepthPass_LPV_132; + float PrePadding_ShadowDepthPass_LPV_136; + float PrePadding_ShadowDepthPass_LPV_140; + float PrePadding_ShadowDepthPass_LPV_144; + float PrePadding_ShadowDepthPass_LPV_148; + float PrePadding_ShadowDepthPass_LPV_152; + float PrePadding_ShadowDepthPass_LPV_156; + float PrePadding_ShadowDepthPass_LPV_160; + float PrePadding_ShadowDepthPass_LPV_164; + float PrePadding_ShadowDepthPass_LPV_168; + float PrePadding_ShadowDepthPass_LPV_172; + float PrePadding_ShadowDepthPass_LPV_176; + float PrePadding_ShadowDepthPass_LPV_180; + float PrePadding_ShadowDepthPass_LPV_184; + float PrePadding_ShadowDepthPass_LPV_188; + float PrePadding_ShadowDepthPass_LPV_192; + float PrePadding_ShadowDepthPass_LPV_196; + float PrePadding_ShadowDepthPass_LPV_200; + float PrePadding_ShadowDepthPass_LPV_204; + float PrePadding_ShadowDepthPass_LPV_208; + float PrePadding_ShadowDepthPass_LPV_212; + float PrePadding_ShadowDepthPass_LPV_216; + float PrePadding_ShadowDepthPass_LPV_220; + float PrePadding_ShadowDepthPass_LPV_224; + float PrePadding_ShadowDepthPass_LPV_228; + float PrePadding_ShadowDepthPass_LPV_232; + float PrePadding_ShadowDepthPass_LPV_236; + float PrePadding_ShadowDepthPass_LPV_240; + float PrePadding_ShadowDepthPass_LPV_244; + float PrePadding_ShadowDepthPass_LPV_248; + float PrePadding_ShadowDepthPass_LPV_252; + float PrePadding_ShadowDepthPass_LPV_256; + float PrePadding_ShadowDepthPass_LPV_260; + float PrePadding_ShadowDepthPass_LPV_264; + float PrePadding_ShadowDepthPass_LPV_268; + float4x4 ShadowDepthPass_LPV_mRsmToWorld; + float4 ShadowDepthPass_LPV_mLightColour; + float4 ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection; + float4 ShadowDepthPass_LPV_mEyePos; + packed_int3 ShadowDepthPass_LPV_mOldGridOffset; + int PrePadding_ShadowDepthPass_LPV_396; + packed_int3 ShadowDepthPass_LPV_mLpvGridOffset; + float ShadowDepthPass_LPV_ClearMultiplier; + float ShadowDepthPass_LPV_LpvScale; + float ShadowDepthPass_LPV_OneOverLpvScale; + float ShadowDepthPass_LPV_DirectionalOcclusionIntensity; + float ShadowDepthPass_LPV_DirectionalOcclusionRadius; + float ShadowDepthPass_LPV_RsmAreaIntensityMultiplier; + float ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier; + float ShadowDepthPass_LPV_SecondaryOcclusionStrength; + float ShadowDepthPass_LPV_SecondaryBounceStrength; + float ShadowDepthPass_LPV_VplInjectionBias; + float ShadowDepthPass_LPV_GeometryVolumeInjectionBias; + float ShadowDepthPass_LPV_EmissiveInjectionMultiplier; + int ShadowDepthPass_LPV_PropagationIndex; + float4x4 ShadowDepthPass_ProjectionMatrix; + float4x4 ShadowDepthPass_ViewMatrix; + float4 ShadowDepthPass_ShadowParams; + float ShadowDepthPass_bClampToNearPlane; + float PrePadding_ShadowDepthPass_612; + float PrePadding_ShadowDepthPass_616; + float PrePadding_ShadowDepthPass_620; + float4x4 ShadowDepthPass_ShadowViewProjectionMatrices[6]; + float4x4 ShadowDepthPass_ShadowViewMatrices[6]; +}; + +constant float4 _90 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; + float out_var_TEXCOORD6 [[user(locn2)]]; + float3 out_var_TEXCOORD7 [[user(locn3)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_PN_POSITION_0 [[attribute(10)]]; + float4 in_var_PN_POSITION_1 [[attribute(11)]]; + float4 in_var_PN_POSITION_2 [[attribute(12)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(16)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(17)]]; +}; + +struct main0_patchIn +{ + float4 in_var_PN_POSITION9 [[attribute(13)]]; + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_ShadowDepthPass& ShadowDepthPass [[buffer(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray _93 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _94 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray, 3> _101 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); + float _119 = gl_TessCoord.x * gl_TessCoord.x; + float _120 = gl_TessCoord.y * gl_TessCoord.y; + float _121 = gl_TessCoord.z * gl_TessCoord.z; + float4 _127 = float4(gl_TessCoord.x); + float4 _131 = float4(gl_TessCoord.y); + float4 _136 = float4(gl_TessCoord.z); + float4 _139 = float4(_119 * 3.0); + float4 _143 = float4(_120 * 3.0); + float4 _150 = float4(_121 * 3.0); + float4 _164 = ((((((((((_101[0][0] * float4(_119)) * _127) + ((_101[1][0] * float4(_120)) * _131)) + ((_101[2][0] * float4(_121)) * _136)) + ((_101[0][1] * _139) * _131)) + ((_101[0][2] * _143) * _127)) + ((_101[1][1] * _143) * _136)) + ((_101[1][2] * _150) * _131)) + ((_101[2][1] * _150) * _127)) + ((_101[2][2] * _139) * _136)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _136) * _127) * _131); + float3 _179 = ((_93[0].xyz * float3(gl_TessCoord.x)) + (_93[1].xyz * float3(gl_TessCoord.y))).xyz + (_93[2].xyz * float3(gl_TessCoord.z)); + float4 _182 = ((_94[0] * _127) + (_94[1] * _131)) + (_94[2] * _136); + float4 _189 = ShadowDepthPass.ShadowDepthPass_ProjectionMatrix * float4(_164.x, _164.y, _164.z, _164.w); + float4 _200; + if ((ShadowDepthPass.ShadowDepthPass_bClampToNearPlane > 0.0) && (_189.z < 0.0)) + { + float4 _198 = _189; + _198.z = 9.9999999747524270787835121154785e-07; + float4 _199 = _198; + _199.w = 1.0; + _200 = _199; + } + else + { + _200 = _189; + } + float _209 = abs(dot(float3(ShadowDepthPass.ShadowDepthPass_ViewMatrix[0].z, ShadowDepthPass.ShadowDepthPass_ViewMatrix[1].z, ShadowDepthPass.ShadowDepthPass_ViewMatrix[2].z), _182.xyz)); + float4 _234 = _200; + _234.z = ((_200.z * ShadowDepthPass.ShadowDepthPass_ShadowParams.w) + ((ShadowDepthPass.ShadowDepthPass_ShadowParams.y * fast::clamp((abs(_209) > 0.0) ? (sqrt(fast::clamp(1.0 - (_209 * _209), 0.0, 1.0)) / _209) : ShadowDepthPass.ShadowDepthPass_ShadowParams.z, 0.0, ShadowDepthPass.ShadowDepthPass_ShadowParams.z)) + ShadowDepthPass.ShadowDepthPass_ShadowParams.x)) * _200.w; + out.out_var_TEXCOORD10_centroid = float4(_179.x, _179.y, _179.z, _90.w); + out.out_var_TEXCOORD11_centroid = _182; + out.out_var_TEXCOORD6 = 0.0; + out.out_var_TEXCOORD7 = _164.xyz; + out.gl_Position = _234; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese new file mode 100644 index 000000000..346d7e3fc --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese @@ -0,0 +1,318 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; + float PrePadding_View_3048; + float PrePadding_View_3052; + float4x4 View_WorldToVirtualTexture; + float4 View_VirtualTextureParams; + float4 View_XRPassthroughCameraUVs[2]; +}; + +constant float4 _68 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; + float4 out_var_TEXCOORD0_0 [[user(locn2)]]; + float4 out_var_COLOR1 [[user(locn3)]]; + float4 out_var_COLOR2 [[user(locn4)]]; + float4 out_var_TEXCOORD6 [[user(locn5)]]; + float3 out_var_TEXCOORD7 [[user(locn6)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_COLOR1 [[attribute(0)]]; + float4 in_var_COLOR2 [[attribute(1)]]; + float4 in_var_TEXCOORD0_0 [[attribute(5)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(6)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(7)]]; + float3 in_var_TEXCOORD7 [[attribute(8)]]; + float4 in_var_VS_To_DS_Position [[attribute(9)]]; +}; + +struct main0_patchIn +{ + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray out_var_TEXCOORD0 = {}; + spvUnsafeArray _77 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _78 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray, 3> _79 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray _80 = spvUnsafeArray({ patchIn.gl_in[0].in_var_COLOR1, patchIn.gl_in[1].in_var_COLOR1, patchIn.gl_in[2].in_var_COLOR1 }); + spvUnsafeArray _81 = spvUnsafeArray({ patchIn.gl_in[0].in_var_COLOR2, patchIn.gl_in[1].in_var_COLOR2, patchIn.gl_in[2].in_var_COLOR2 }); + spvUnsafeArray _97 = spvUnsafeArray({ patchIn.gl_in[0].in_var_VS_To_DS_Position, patchIn.gl_in[1].in_var_VS_To_DS_Position, patchIn.gl_in[2].in_var_VS_To_DS_Position }); + spvUnsafeArray _98 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD7, patchIn.gl_in[1].in_var_TEXCOORD7, patchIn.gl_in[2].in_var_TEXCOORD7 }); + float4 _111 = float4(gl_TessCoord.x); + float4 _113 = float4(gl_TessCoord.y); + float4 _116 = float4(gl_TessCoord.z); + float4 _118 = ((_97[0] * _111) + (_97[1] * _113)) + (_97[2] * _116); + spvUnsafeArray _72; + _72 = _79[0]; + spvUnsafeArray _71; + _71 = _79[1]; + float3 _120 = float3(gl_TessCoord.x); + float3 _123 = float3(gl_TessCoord.y); + spvUnsafeArray _73; + for (int _133 = 0; _133 < 1; ) + { + _73[_133] = (_72[_133] * _111) + (_71[_133] * _113); + _133++; + continue; + } + spvUnsafeArray _75; + _75 = _73; + spvUnsafeArray _74; + _74 = _79[2]; + float3 _155 = float3(gl_TessCoord.z); + float3 _157 = ((_77[0].xyz * _120) + (_77[1].xyz * _123)).xyz + (_77[2].xyz * _155); + spvUnsafeArray _76; + for (int _164 = 0; _164 < 1; ) + { + _76[_164] = _75[_164] + (_74[_164] * _116); + _164++; + continue; + } + float4 _181 = float4(_118.x, _118.y, _118.z, _118.w); + out.out_var_TEXCOORD10_centroid = float4(_157.x, _157.y, _157.z, _68.w); + out.out_var_TEXCOORD11_centroid = ((_78[0] * _111) + (_78[1] * _113)) + (_78[2] * _116); + out_var_TEXCOORD0 = _76; + out.out_var_COLOR1 = ((_80[0] * _111) + (_80[1] * _113)) + (_80[2] * _116); + out.out_var_COLOR2 = ((_81[0] * _111) + (_81[1] * _113)) + (_81[2] * _116); + out.out_var_TEXCOORD6 = _181; + out.out_var_TEXCOORD7 = ((_98[0] * _120) + (_98[1] * _123)) + (_98[2] * _155); + out.gl_Position = View.View_TranslatedWorldToClip * _181; + out.out_var_TEXCOORD0_0 = out_var_TEXCOORD0[0]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert new file mode 100644 index 000000000..3d3e0e51f --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert @@ -0,0 +1,466 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_MobileBasePass +{ + float4 MobileBasePass_Fog_ExponentialFogParameters; + float4 MobileBasePass_Fog_ExponentialFogParameters2; + float4 MobileBasePass_Fog_ExponentialFogColorParameter; + float4 MobileBasePass_Fog_ExponentialFogParameters3; + float4 MobileBasePass_Fog_InscatteringLightDirection; + float4 MobileBasePass_Fog_DirectionalInscatteringColor; + float2 MobileBasePass_Fog_SinCosInscatteringColorCubemapRotation; + float PrePadding_MobileBasePass_Fog_104; + float PrePadding_MobileBasePass_Fog_108; + packed_float3 MobileBasePass_Fog_FogInscatteringTextureParameters; + float MobileBasePass_Fog_ApplyVolumetricFog; + float PrePadding_MobileBasePass_PlanarReflection_128; + float PrePadding_MobileBasePass_PlanarReflection_132; + float PrePadding_MobileBasePass_PlanarReflection_136; + float PrePadding_MobileBasePass_PlanarReflection_140; + float PrePadding_MobileBasePass_PlanarReflection_144; + float PrePadding_MobileBasePass_PlanarReflection_148; + float PrePadding_MobileBasePass_PlanarReflection_152; + float PrePadding_MobileBasePass_PlanarReflection_156; + float4 MobileBasePass_PlanarReflection_ReflectionPlane; + float4 MobileBasePass_PlanarReflection_PlanarReflectionOrigin; + float4 MobileBasePass_PlanarReflection_PlanarReflectionXAxis; + float4 MobileBasePass_PlanarReflection_PlanarReflectionYAxis; + float3x4 MobileBasePass_PlanarReflection_InverseTransposeMirrorMatrix; + packed_float3 MobileBasePass_PlanarReflection_PlanarReflectionParameters; + float PrePadding_MobileBasePass_PlanarReflection_284; + float2 MobileBasePass_PlanarReflection_PlanarReflectionParameters2; + float PrePadding_MobileBasePass_PlanarReflection_296; + float PrePadding_MobileBasePass_PlanarReflection_300; + float4x4 MobileBasePass_PlanarReflection_ProjectionWithExtraFOV[2]; + float4 MobileBasePass_PlanarReflection_PlanarReflectionScreenScaleBias[2]; + float2 MobileBasePass_PlanarReflection_PlanarReflectionScreenBound; + uint MobileBasePass_PlanarReflection_bIsStereo; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_UseEditorDepthTest; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + float PrePadding_Primitive_380; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightingChannelMask; + uint Primitive_LightmapDataIndex; + int Primitive_SingleCaptureIndex; +}; + +struct type_LandscapeParameters +{ + float4 LandscapeParameters_HeightmapUVScaleBias; + float4 LandscapeParameters_WeightmapUVScaleBias; + float4 LandscapeParameters_LandscapeLightmapScaleBias; + float4 LandscapeParameters_SubsectionSizeVertsLayerUVPan; + float4 LandscapeParameters_SubsectionOffsetParams; + float4 LandscapeParameters_LightmapSubsectionOffsetParams; + float4x4 LandscapeParameters_LocalToWorldNoScaling; +}; + +struct type_Globals +{ + float4 LodBias; + float4 LodValues; + float4 SectionLods; + float4 NeighborSectionLod[4]; +}; + +struct main0_out +{ + float2 out_var_TEXCOORD0 [[user(locn0)]]; + float2 out_var_TEXCOORD1 [[user(locn1)]]; + float4 out_var_TEXCOORD2 [[user(locn2)]]; + float4 out_var_TEXCOORD3 [[user(locn3)]]; + float4 out_var_TEXCOORD8 [[user(locn4)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_ATTRIBUTE0 [[attribute(0)]]; + float4 in_var_ATTRIBUTE1_0 [[attribute(1)]]; + float4 in_var_ATTRIBUTE1_1 [[attribute(2)]]; +}; + +vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_MobileBasePass& MobileBasePass [[buffer(1)]], constant type_Primitive& Primitive [[buffer(2)]], constant type_LandscapeParameters& LandscapeParameters [[buffer(3)]], constant type_Globals& _Globals [[buffer(4)]]) +{ + main0_out out = {}; + spvUnsafeArray in_var_ATTRIBUTE1 = {}; + in_var_ATTRIBUTE1[0] = in.in_var_ATTRIBUTE1_0; + in_var_ATTRIBUTE1[1] = in.in_var_ATTRIBUTE1_1; + spvUnsafeArray _97; + for (int _107 = 0; _107 < 1; ) + { + _97[_107] = float4(0.0); + _107++; + continue; + } + float4 _115 = in.in_var_ATTRIBUTE0 * float4(255.0); + float2 _116 = _115.zw; + float2 _119 = fract(_116 * float2(0.5)) * float2(2.0); + float2 _121 = (_116 - _119) * float2(0.0039215688593685626983642578125); + float2 _122 = _115.xy; + float2 _126 = _122 * float2(_Globals.LodValues.w); + float _127 = _126.y; + float _128 = _126.x; + float4 _132 = float4(_127, _128, 1.0 - _128, 1.0 - _127) * float4(2.0); + float4 _186; + if (_119.y > 0.5) + { + float4 _161; + if (_119.x > 0.5) + { + _161 = (_132 * float4(_Globals.SectionLods.w)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[3]); + } + else + { + _161 = (_132 * float4(_Globals.SectionLods.z)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[2]); + } + _186 = _161; + } + else + { + float4 _185; + if (_119.x > 0.5) + { + _185 = (_132 * float4(_Globals.SectionLods.y)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[1]); + } + else + { + _185 = (_132 * float4(_Globals.SectionLods.x)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[0]); + } + _186 = _185; + } + float _206; + if ((_128 + _127) > 1.0) + { + float _198; + if (_128 < _127) + { + _198 = _186.w; + } + else + { + _198 = _186.z; + } + _206 = _198; + } + else + { + float _205; + if (_128 < _127) + { + _205 = _186.y; + } + else + { + _205 = _186.x; + } + _206 = _205; + } + float _207 = floor(_206); + float _220 = _121.x; + float3 _235 = select(select(select(select(select(float3(0.03125, _121.yy), float3(0.0625, _220, _121.y), bool3(_207 < 5.0)), float3(0.125, in_var_ATTRIBUTE1[1].w, _220), bool3(_207 < 4.0)), float3(0.25, in_var_ATTRIBUTE1[1].zw), bool3(_207 < 3.0)), float3(0.5, in_var_ATTRIBUTE1[1].yz), bool3(_207 < 2.0)), float3(1.0, in_var_ATTRIBUTE1[1].xy), bool3(_207 < 1.0)); + float _236 = _235.x; + float _245 = (((in_var_ATTRIBUTE1[0].x * 65280.0) + (in_var_ATTRIBUTE1[0].y * 255.0)) - 32768.0) * 0.0078125; + float _252 = (((in_var_ATTRIBUTE1[0].z * 65280.0) + (in_var_ATTRIBUTE1[0].w * 255.0)) - 32768.0) * 0.0078125; + float2 _257 = floor(_122 * float2(_236)); + float2 _271 = float2((LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.x * _236) - 1.0, fast::max((LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.x * 0.5) * _236, 2.0) - 1.0) * float2(LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.y); + float3 _287 = mix(float3(_257 / float2(_271.x), mix(_245, _252, _235.y)), float3(floor(_257 * float2(0.5)) / float2(_271.y), mix(_245, _252, _235.z)), float3(_206 - _207)); + float2 _288 = _119.xy; + float2 _292 = _288 * LandscapeParameters.LandscapeParameters_SubsectionOffsetParams.ww; + float3 _296 = _287 + float3(_292, 0.0); + float4 _322 = float4((((Primitive.Primitive_LocalToWorld[0u].xyz * _296.xxx) + (Primitive.Primitive_LocalToWorld[1u].xyz * _296.yyy)) + (Primitive.Primitive_LocalToWorld[2u].xyz * _296.zzz)) + (Primitive.Primitive_LocalToWorld[3u].xyz + float3(View.View_PreViewTranslation)), 1.0); + float2 _323 = _287.xy; + float4 _338 = float4(_322.x, _322.y, _322.z, _322.w); + float4 _339 = View.View_TranslatedWorldToClip * _338; + float3 _341 = _322.xyz - float3(View.View_TranslatedWorldCameraOrigin); + float _345 = dot(_341, _341); + float _346 = rsqrt(_345); + float _347 = _345 * _346; + float _354 = _341.z; + float _357 = fast::max(0.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.w); + float _393; + float _394; + float _395; + float _396; + if (_357 > 0.0) + { + float _361 = _357 * _346; + float _362 = _361 * _354; + float _365 = View.View_WorldCameraOrigin[2] + _362; + _393 = (1.0 - _361) * _347; + _394 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.z * exp2(-fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.y * (_365 - MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.w))); + _395 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.x * exp2(-fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.y * (_365 - MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.y))); + _396 = _354 - _362; + } + else + { + _393 = _347; + _394 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.x; + _395 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.x; + _396 = _354; + } + float _400 = fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.y * _396); + float _405 = log(2.0); + float _407 = 0.5 * (_405 * _405); + float _417 = fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.y * _396); + float _428 = (_395 * ((abs(_400) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_400)) / _400) : (_405 - (_407 * _400)))) + (_394 * ((abs(_417) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_417)) / _417) : (_405 - (_407 * _417)))); + float3 _459; + if (MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.w >= 0.0) + { + _459 = (MobileBasePass.MobileBasePass_Fog_DirectionalInscatteringColor.xyz * float3(pow(fast::clamp(dot(_341 * float3(_346), MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.xyz), 0.0, 1.0), MobileBasePass.MobileBasePass_Fog_DirectionalInscatteringColor.w))) * float3(1.0 - fast::clamp(exp2(-(_428 * fast::max(_393 - MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.w, 0.0))), 0.0, 1.0)); + } + else + { + _459 = float3(0.0); + } + bool _468 = (MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w > 0.0) && (_347 > MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w); + float _471 = _468 ? 1.0 : fast::max(fast::clamp(exp2(-(_428 * _393)), 0.0, 1.0), MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.w); + _97[0] = float4((MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.xyz * float3(1.0 - _471)) + select(_459, float3(0.0), bool3(_468)), _471); + float4 _482 = _338; + _482.w = _339.w; + out.out_var_TEXCOORD0 = ((_323 + LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.zw) + _292).xy; + out.out_var_TEXCOORD1 = ((_323 * LandscapeParameters.LandscapeParameters_WeightmapUVScaleBias.xy) + LandscapeParameters.LandscapeParameters_WeightmapUVScaleBias.zw) + (_288 * LandscapeParameters.LandscapeParameters_SubsectionOffsetParams.zz); + out.out_var_TEXCOORD2 = float4(float4(0.0).x, float4(0.0).y, _97[0].x, _97[0].y); + out.out_var_TEXCOORD3 = float4(float4(0.0).x, float4(0.0).y, _97[0].z, _97[0].w); + out.out_var_TEXCOORD8 = _482; + out.gl_Position = _339; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert new file mode 100644 index 000000000..b1298b7e6 --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert @@ -0,0 +1,122 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_Globals +{ + float4 ViewportSize; + float ScatteringScaling; + float CocRadiusToCircumscribedRadius; +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct main0_out +{ + float2 out_var_TEXCOORD0 [[user(locn0)]]; + float4 out_var_TEXCOORD1 [[user(locn1)]]; + float4 out_var_TEXCOORD2 [[user(locn2)]]; + float4 out_var_TEXCOORD3 [[user(locn3)]]; + float4 out_var_TEXCOORD4 [[user(locn4)]]; + float4 out_var_TEXCOORD5 [[user(locn5)]]; + float4 out_var_TEXCOORD6 [[user(locn6)]]; + float4 gl_Position [[position]]; +}; + +vertex main0_out main0(constant type_Globals& _Globals [[buffer(0)]], const device type_StructuredBuffer_v4float& ScatterDrawList [[buffer(1)]], uint gl_VertexIndex [[vertex_id]], uint gl_InstanceIndex [[instance_id]]) +{ + main0_out out = {}; + uint _66 = gl_VertexIndex / 4u; + uint _68 = gl_VertexIndex - (_66 * 4u); + uint _70 = (16u * gl_InstanceIndex) + _66; + float _72; + _72 = 0.0; + spvUnsafeArray _61; + spvUnsafeArray _62; + spvUnsafeArray _63; + float _73; + uint _75 = 0u; + for (;;) + { + if (_75 < 4u) + { + uint _82 = ((5u * _70) + _75) + 1u; + _61[_75] = float4(ScatterDrawList._m0[_82].xyz, 0.0); + _62[_75] = ScatterDrawList._m0[_82].w; + if (_75 == 0u) + { + _73 = _62[_75]; + } + else + { + _73 = fast::max(_72, _62[_75]); + } + _63[_75].x = (-0.5) / _62[_75]; + _63[_75].y = (0.5 * _62[_75]) + 0.5; + _72 = _73; + _75++; + continue; + } + else + { + break; + } + } + float2 _144 = float2(_Globals.ScatteringScaling) * ScatterDrawList._m0[5u * _70].xy; + float2 _173 = (((float2((_72 * _Globals.CocRadiusToCircumscribedRadius) + 1.0) * ((float2(float(_68 % 2u), float(_68 / 2u)) * float2(2.0)) - float2(1.0))) + _144) + float2(0.5)) * _Globals.ViewportSize.zw; + out.out_var_TEXCOORD0 = _144; + out.out_var_TEXCOORD1 = float4(_61[0].xyz, _62[0]); + out.out_var_TEXCOORD2 = float4(_61[1].xyz, _62[1]); + out.out_var_TEXCOORD3 = float4(_61[2].xyz, _62[2]); + out.out_var_TEXCOORD4 = float4(_61[3].xyz, _62[3]); + out.out_var_TEXCOORD5 = float4(_63[0].x, _63[0].y, _63[1].x, _63[1].y); + out.out_var_TEXCOORD6 = float4(_63[2].x, _63[2].y, _63[3].x, _63[3].y); + out.gl_Position = float4((_173.x * 2.0) - 1.0, 1.0 - (_173.y * 2.0), 0.0, 1.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert new file mode 100644 index 000000000..6384e1b9d --- /dev/null +++ b/3rdparty/spirv-cross/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert @@ -0,0 +1,387 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" + +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_UseEditorDepthTest; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + float PrePadding_Primitive_380; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightingChannelMask; + uint Primitive_LightmapDataIndex; + int Primitive_SingleCaptureIndex; +}; + +struct type_MobileShadowDepthPass +{ + float PrePadding_MobileShadowDepthPass_0; + float PrePadding_MobileShadowDepthPass_4; + float PrePadding_MobileShadowDepthPass_8; + float PrePadding_MobileShadowDepthPass_12; + float PrePadding_MobileShadowDepthPass_16; + float PrePadding_MobileShadowDepthPass_20; + float PrePadding_MobileShadowDepthPass_24; + float PrePadding_MobileShadowDepthPass_28; + float PrePadding_MobileShadowDepthPass_32; + float PrePadding_MobileShadowDepthPass_36; + float PrePadding_MobileShadowDepthPass_40; + float PrePadding_MobileShadowDepthPass_44; + float PrePadding_MobileShadowDepthPass_48; + float PrePadding_MobileShadowDepthPass_52; + float PrePadding_MobileShadowDepthPass_56; + float PrePadding_MobileShadowDepthPass_60; + float PrePadding_MobileShadowDepthPass_64; + float PrePadding_MobileShadowDepthPass_68; + float PrePadding_MobileShadowDepthPass_72; + float PrePadding_MobileShadowDepthPass_76; + float4x4 MobileShadowDepthPass_ProjectionMatrix; + float2 MobileShadowDepthPass_ShadowParams; + float MobileShadowDepthPass_bClampToNearPlane; + float PrePadding_MobileShadowDepthPass_156; + float4x4 MobileShadowDepthPass_ShadowViewProjectionMatrices[6]; +}; + +struct type_EmitterDynamicUniforms +{ + float2 EmitterDynamicUniforms_LocalToWorldScale; + float EmitterDynamicUniforms_EmitterInstRandom; + float PrePadding_EmitterDynamicUniforms_12; + float4 EmitterDynamicUniforms_AxisLockRight; + float4 EmitterDynamicUniforms_AxisLockUp; + float4 EmitterDynamicUniforms_DynamicColor; + float4 EmitterDynamicUniforms_MacroUVParameters; +}; + +struct type_EmitterUniforms +{ + float4 EmitterUniforms_ColorCurve; + float4 EmitterUniforms_ColorScale; + float4 EmitterUniforms_ColorBias; + float4 EmitterUniforms_MiscCurve; + float4 EmitterUniforms_MiscScale; + float4 EmitterUniforms_MiscBias; + float4 EmitterUniforms_SizeBySpeed; + float4 EmitterUniforms_SubImageSize; + float4 EmitterUniforms_TangentSelector; + packed_float3 EmitterUniforms_CameraFacingBlend; + float EmitterUniforms_RemoveHMDRoll; + float EmitterUniforms_RotationRateScale; + float EmitterUniforms_RotationBias; + float EmitterUniforms_CameraMotionBlurAmount; + float PrePadding_EmitterUniforms_172; + float2 EmitterUniforms_PivotOffset; +}; + +struct type_Globals +{ + uint ParticleIndicesOffset; +}; + +struct main0_out +{ + float out_var_TEXCOORD6 [[user(locn0)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float2 in_var_ATTRIBUTE0 [[attribute(0)]]; +}; + +// Returns 2D texture coords corresponding to 1D texel buffer coords +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) +{ + return uint2(tc % 4096, tc / 4096); +} + +vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Primitive& Primitive [[buffer(1)]], constant type_MobileShadowDepthPass& MobileShadowDepthPass [[buffer(2)]], constant type_EmitterDynamicUniforms& EmitterDynamicUniforms [[buffer(3)]], constant type_EmitterUniforms& EmitterUniforms [[buffer(4)]], constant type_Globals& _Globals [[buffer(5)]], texture2d ParticleIndices [[texture(0)]], texture2d PositionTexture [[texture(1)]], texture2d VelocityTexture [[texture(2)]], texture2d AttributesTexture [[texture(3)]], texture2d CurveTexture [[texture(4)]], sampler PositionTextureSampler [[sampler(0)]], sampler VelocityTextureSampler [[sampler(1)]], sampler AttributesTextureSampler [[sampler(2)]], sampler CurveTextureSampler [[sampler(3)]], uint gl_VertexIndex [[vertex_id]], uint gl_InstanceIndex [[instance_id]]) +{ + main0_out out = {}; + float2 _133 = ParticleIndices.read(spvTexelBufferCoord((_Globals.ParticleIndicesOffset + ((gl_InstanceIndex * 16u) + (gl_VertexIndex / 4u))))).xy; + float4 _137 = PositionTexture.sample(PositionTextureSampler, _133, level(0.0)); + float4 _145 = AttributesTexture.sample(AttributesTextureSampler, _133, level(0.0)); + float _146 = _137.w; + float3 _158 = float3x3(Primitive.Primitive_LocalToWorld[0].xyz, Primitive.Primitive_LocalToWorld[1].xyz, Primitive.Primitive_LocalToWorld[2].xyz) * VelocityTexture.sample(VelocityTextureSampler, _133, level(0.0)).xyz; + float3 _160 = normalize(_158 + float3(0.0, 0.0, 9.9999997473787516355514526367188e-05)); + float2 _204 = ((((_145.xy + float2((_145.x < 0.5) ? 0.0 : (-0.5), (_145.y < 0.5) ? 0.0 : (-0.5))) * float2(2.0)) * (((CurveTexture.sample(CurveTextureSampler, (EmitterUniforms.EmitterUniforms_MiscCurve.xy + (EmitterUniforms.EmitterUniforms_MiscCurve.zw * float2(_146))), level(0.0)) * EmitterUniforms.EmitterUniforms_MiscScale) + EmitterUniforms.EmitterUniforms_MiscBias).xy * EmitterDynamicUniforms.EmitterDynamicUniforms_LocalToWorldScale)) * fast::min(fast::max(EmitterUniforms.EmitterUniforms_SizeBySpeed.xy * float2(length(_158)), float2(1.0)), EmitterUniforms.EmitterUniforms_SizeBySpeed.zw)) * float2(step(_146, 1.0)); + float3 _239 = float4((((Primitive.Primitive_LocalToWorld[0u].xyz * _137.xxx) + (Primitive.Primitive_LocalToWorld[1u].xyz * _137.yyy)) + (Primitive.Primitive_LocalToWorld[2u].xyz * _137.zzz)) + (Primitive.Primitive_LocalToWorld[3u].xyz + float3(View.View_PreViewTranslation)), 1.0).xyz; + float3 _242 = float3(EmitterUniforms.EmitterUniforms_RemoveHMDRoll); + float3 _251 = mix(mix(float3(View.View_ViewRight), float3(View.View_HMDViewNoRollRight), _242), EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.xyz, float3(EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.w)); + float3 _259 = mix(-mix(float3(View.View_ViewUp), float3(View.View_HMDViewNoRollUp), _242), EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockUp.xyz, float3(EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockUp.w)); + float3 _260 = float3(View.View_TranslatedWorldCameraOrigin) - _239; + float _261 = dot(_260, _260); + float3 _265 = _260 / float3(sqrt(fast::max(_261, 0.00999999977648258209228515625))); + float3 _335; + float3 _336; + if (EmitterUniforms.EmitterUniforms_CameraFacingBlend[0] > 0.0) + { + float3 _279 = cross(_265, float3(0.0, 0.0, 1.0)); + float3 _284 = _279 / float3(sqrt(fast::max(dot(_279, _279), 0.00999999977648258209228515625))); + float3 _286 = float3(fast::clamp((_261 * EmitterUniforms.EmitterUniforms_CameraFacingBlend[1]) - EmitterUniforms.EmitterUniforms_CameraFacingBlend[2], 0.0, 1.0)); + _335 = normalize(mix(_251, _284, _286)); + _336 = normalize(mix(_259, cross(_265, _284), _286)); + } + else + { + float3 _333; + float3 _334; + if (EmitterUniforms.EmitterUniforms_TangentSelector.y > 0.0) + { + float3 _297 = cross(_265, _160); + _333 = _297 / float3(sqrt(fast::max(dot(_297, _297), 0.00999999977648258209228515625))); + _334 = -_160; + } + else + { + float3 _331; + float3 _332; + if (EmitterUniforms.EmitterUniforms_TangentSelector.z > 0.0) + { + float3 _310 = cross(EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.xyz, _265); + _331 = EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.xyz; + _332 = -(_310 / float3(sqrt(fast::max(dot(_310, _310), 0.00999999977648258209228515625)))); + } + else + { + float3 _329; + float3 _330; + if (EmitterUniforms.EmitterUniforms_TangentSelector.w > 0.0) + { + float3 _322 = cross(_265, float3(0.0, 0.0, 1.0)); + float3 _327 = _322 / float3(sqrt(fast::max(dot(_322, _322), 0.00999999977648258209228515625))); + _329 = _327; + _330 = cross(_265, _327); + } + else + { + _329 = _251; + _330 = _259; + } + _331 = _329; + _332 = _330; + } + _333 = _331; + _334 = _332; + } + _335 = _333; + _336 = _334; + } + float _339 = ((_145.z + ((_145.w * EmitterUniforms.EmitterUniforms_RotationRateScale) * _146)) * 6.283185482025146484375) + EmitterUniforms.EmitterUniforms_RotationBias; + float3 _342 = float3(sin(_339)); + float3 _344 = float3(cos(_339)); + float4 _371 = float4(_239 + ((float3(_204.x * (in.in_var_ATTRIBUTE0.x + EmitterUniforms.EmitterUniforms_PivotOffset.x)) * ((_342 * _336) + (_344 * _335))) + (float3(_204.y * (in.in_var_ATTRIBUTE0.y + EmitterUniforms.EmitterUniforms_PivotOffset.y)) * ((_344 * _336) - (_342 * _335)))), 1.0); + float4 _375 = MobileShadowDepthPass.MobileShadowDepthPass_ProjectionMatrix * float4(_371.x, _371.y, _371.z, _371.w); + float4 _386; + if ((MobileShadowDepthPass.MobileShadowDepthPass_bClampToNearPlane > 0.0) && (_375.z < 0.0)) + { + float4 _384 = _375; + _384.z = 9.9999999747524270787835121154785e-07; + float4 _385 = _384; + _385.w = 1.0; + _386 = _385; + } + else + { + _386 = _375; + } + float4 _396 = _386; + _396.z = ((_386.z * MobileShadowDepthPass.MobileShadowDepthPass_ShadowParams.y) + MobileShadowDepthPass.MobileShadowDepthPass_ShadowParams.x) * _386.w; + out.out_var_TEXCOORD6 = 0.0; + out.gl_Position = _396; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/opt/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp b/3rdparty/spirv-cross/reference/opt/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp index 4f8d2ffa7..f8650b5e5 100644 --- a/3rdparty/spirv-cross/reference/opt/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp +++ b/3rdparty/spirv-cross/reference/opt/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp @@ -5,9 +5,9 @@ layout(binding = 1, rgba32f) uniform writeonly image2D outImageTexture; void main() { + int _27_copy; int _30; _30 = 7; - int _27_copy; for (int _27 = 7; _27 >= 0; _27_copy = _27, _27--, _30 = _27_copy) { if (5.0 > float(_27)) diff --git a/3rdparty/spirv-cross/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/3rdparty/spirv-cross/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag new file mode 100644 index 000000000..e7ffd8d60 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -0,0 +1,37 @@ +struct EmptyStructTest +{ + int empty_struct_member; +}; + +struct EmptyStruct2Test +{ + EmptyStructTest _m0; +}; + +static const EmptyStructTest _30 = { 0 }; +static const EmptyStruct2Test _20 = { { 0 } }; + +float GetValue(EmptyStruct2Test self) +{ + return 0.0f; +} + +float GetValue_1(EmptyStruct2Test self) +{ + return 0.0f; +} + +void frag_main() +{ + EmptyStructTest _25 = { 0 }; + EmptyStruct2Test _26 = { _25 }; + EmptyStruct2Test emptyStruct; + float value = GetValue(emptyStruct); + value = GetValue_1(_26); + value = GetValue_1(_20); +} + +void main() +{ + frag_main(); +} diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp index eee35d297..6e9768540 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp @@ -15,7 +15,8 @@ struct SSBORead float b; }; -inline void copy_out(device float& A, device const float& B) +static inline __attribute__((always_inline)) +void copy_out(device float& A, device const float& B) { A = B; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp index a42eca2b3..7c9718d1c 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp @@ -22,17 +22,20 @@ struct baz int e[128]; }; -inline device int* select_buffer(device foo& buf, device baz& buf2, constant bar& cb) +static inline __attribute__((always_inline)) +device int* select_buffer(device foo& buf, device baz& buf2, constant bar& cb) { return (cb.d != 0) ? &buf.a[0u] : &buf2.e[0u]; } -inline device int* select_buffer_null(device foo& buf, constant bar& cb) +static inline __attribute__((always_inline)) +device int* select_buffer_null(device foo& buf, constant bar& cb) { return (cb.d != 0) ? &buf.a[0u] : nullptr; } -inline threadgroup int* select_tgsm(constant bar& cb, threadgroup int (&tgsm)[128]) +static inline __attribute__((always_inline)) +threadgroup int* select_tgsm(constant bar& cb, threadgroup int (&tgsm)[128]) { return (cb.d != 0) ? &tgsm[0u] : nullptr; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/empty-struct-in-struct.asm.frag new file mode 100644 index 000000000..fdf4a92b9 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -0,0 +1,35 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" + +#include +#include + +using namespace metal; + +struct EmptyStructTest +{ +}; +struct EmptyStruct2Test +{ + EmptyStructTest _m0; +}; + +static inline __attribute__((always_inline)) +float GetValue(thread const EmptyStruct2Test& self) +{ + return 0.0; +} + +static inline __attribute__((always_inline)) +float GetValue_1(EmptyStruct2Test self) +{ + return 0.0; +} + +fragment void main0() +{ + EmptyStruct2Test emptyStruct; + float value = GetValue(emptyStruct); + value = GetValue_1(EmptyStruct2Test{ EmptyStructTest{ } }); + value = GetValue_1(EmptyStruct2Test{ { } }); +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag deleted file mode 100644 index 168129ae8..000000000 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag +++ /dev/null @@ -1,235 +0,0 @@ -#include -#include - -using namespace metal; - -struct VertexOutput -{ - float4 HPosition; - float4 Uv_EdgeDistance1; - float4 UvStuds_EdgeDistance2; - float4 Color; - float4 LightPosition_Fog; - float4 View_Depth; - float4 Normal_SpecPower; - float3 Tangent; - float4 PosLightSpace_Reflectance; - float studIndex; -}; - -struct Surface -{ - float3 albedo; - float3 normal; - float specular; - float gloss; - float reflectance; - float opacity; -}; - -struct SurfaceInput -{ - float4 Color; - float2 Uv; - float2 UvStuds; -}; - -struct Globals -{ - float4x4 ViewProjection; - float4 ViewRight; - float4 ViewUp; - float4 ViewDir; - float3 CameraPosition; - float3 AmbientColor; - float3 Lamp0Color; - float3 Lamp0Dir; - float3 Lamp1Color; - float4 FogParams; - float3 FogColor; - float4 LightBorder; - float4 LightConfig0; - float4 LightConfig1; - float4 LightConfig2; - float4 LightConfig3; - float4 RefractionBias_FadeDistance_GlowFactor; - float4 OutlineBrightness_ShadowInfo; - float4 ShadowMatrix0; - float4 ShadowMatrix1; - float4 ShadowMatrix2; -}; - -struct CB0 -{ - Globals CB0; -}; - -struct Params -{ - float4 LqmatFarTilingFactor; -}; - -struct CB2 -{ - Params CB2; -}; - -constant VertexOutput _121 = {}; -constant SurfaceInput _122 = {}; -constant float2 _123 = {}; -constant float4 _124 = {}; -constant Surface _125 = {}; -constant float4 _192 = {}; -constant float4 _219 = {}; -constant float4 _297 = {}; - -struct main0_out -{ - float4 _entryPointOutput [[color(0)]]; -}; - -struct main0_in -{ - float4 IN_Uv_EdgeDistance1 [[user(locn0)]]; - float4 IN_UvStuds_EdgeDistance2 [[user(locn1)]]; - float4 IN_Color [[user(locn2)]]; - float4 IN_LightPosition_Fog [[user(locn3)]]; - float4 IN_View_Depth [[user(locn4)]]; - float4 IN_Normal_SpecPower [[user(locn5)]]; - float3 IN_Tangent [[user(locn6)]]; - float4 IN_PosLightSpace_Reflectance [[user(locn7)]]; - float IN_studIndex [[user(locn8)]]; -}; - -fragment main0_out main0(main0_in in [[stage_in]], constant CB0& _19 [[buffer(0)]], texture3d LightMapTexture [[texture(0)]], texture2d ShadowMapTexture [[texture(1)]], texturecube EnvironmentMapTexture [[texture(2)]], texture2d DiffuseMapTexture [[texture(3)]], texture2d NormalMapTexture [[texture(4)]], texture2d NormalDetailMapTexture [[texture(5)]], texture2d StudsMapTexture [[texture(6)]], texture2d SpecularMapTexture [[texture(7)]], sampler LightMapSampler [[sampler(0)]], sampler ShadowMapSampler [[sampler(1)]], sampler EnvironmentMapSampler [[sampler(2)]], sampler DiffuseMapSampler [[sampler(3)]], sampler NormalMapSampler [[sampler(4)]], sampler NormalDetailMapSampler [[sampler(5)]], sampler StudsMapSampler [[sampler(6)]], sampler SpecularMapSampler [[sampler(7)]], float4 gl_FragCoord [[position]]) -{ - main0_out out = {}; - VertexOutput _128 = _121; - _128.HPosition = gl_FragCoord; - VertexOutput _130 = _128; - _130.Uv_EdgeDistance1 = in.IN_Uv_EdgeDistance1; - VertexOutput _132 = _130; - _132.UvStuds_EdgeDistance2 = in.IN_UvStuds_EdgeDistance2; - VertexOutput _134 = _132; - _134.Color = in.IN_Color; - VertexOutput _136 = _134; - _136.LightPosition_Fog = in.IN_LightPosition_Fog; - VertexOutput _138 = _136; - _138.View_Depth = in.IN_View_Depth; - VertexOutput _140 = _138; - _140.Normal_SpecPower = in.IN_Normal_SpecPower; - VertexOutput _142 = _140; - _142.Tangent = in.IN_Tangent; - VertexOutput _144 = _142; - _144.PosLightSpace_Reflectance = in.IN_PosLightSpace_Reflectance; - VertexOutput _146 = _144; - _146.studIndex = in.IN_studIndex; - SurfaceInput _147 = _122; - _147.Color = in.IN_Color; - SurfaceInput _149 = _147; - _149.Uv = in.IN_Uv_EdgeDistance1.xy; - SurfaceInput _151 = _149; - _151.UvStuds = in.IN_UvStuds_EdgeDistance2.xy; - SurfaceInput _156 = _151; - _156.UvStuds.y = (fract(_151.UvStuds.y) + in.IN_studIndex) * 0.25; - float _163 = _146.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y; - float _165 = fast::clamp(1.0 - _163, 0.0, 1.0); - float2 _166 = in.IN_Uv_EdgeDistance1.xy * 1.0; - bool _173; - float4 _193; - for (;;) - { - _173 = 0.0 == 0.0; - if (_173) - { - _193 = DiffuseMapTexture.sample(DiffuseMapSampler, _166); - break; - } - else - { - float _180 = 1.0 / (1.0 - 0.0); - _193 = mix(DiffuseMapTexture.sample(DiffuseMapSampler, (_166 * 0.25)), DiffuseMapTexture.sample(DiffuseMapSampler, _166), float4(fast::clamp((fast::clamp(1.0 - (_146.View_Depth.w * 0.00333332992158830165863037109375), 0.0, 1.0) * _180) - (0.0 * _180), 0.0, 1.0))); - break; - } - _193 = _192; - break; - } - float4 _220; - for (;;) - { - if (_173) - { - _220 = NormalMapTexture.sample(NormalMapSampler, _166); - break; - } - else - { - float _207 = 1.0 / (1.0 - 0.0); - _220 = mix(NormalMapTexture.sample(NormalMapSampler, (_166 * 0.25)), NormalMapTexture.sample(NormalMapSampler, _166), float4(fast::clamp((_165 * _207) - (0.0 * _207), 0.0, 1.0))); - break; - } - _220 = _219; - break; - } - float2 _223 = float2(1.0); - float2 _224 = (_220.wy * 2.0) - _223; - float3 _232 = float3(_224, sqrt(fast::clamp(1.0 + dot(-_224, _224), 0.0, 1.0))); - float2 _240 = (NormalDetailMapTexture.sample(NormalDetailMapSampler, (_166 * 0.0)).wy * 2.0) - _223; - float2 _252 = _232.xy + (float3(_240, sqrt(fast::clamp(1.0 + dot(-_240, _240), 0.0, 1.0))).xy * 0.0); - float3 _253 = float3(_252.x, _252.y, _232.z); - float2 _255 = _253.xy * _165; - float3 _256 = float3(_255.x, _255.y, _253.z); - float3 _271 = ((in.IN_Color.xyz * (_193 * 1.0).xyz) * (1.0 + (_256.x * 0.300000011920928955078125))) * (StudsMapTexture.sample(StudsMapSampler, _156.UvStuds).x * 2.0); - float4 _298; - for (;;) - { - if (0.75 == 0.0) - { - _298 = SpecularMapTexture.sample(SpecularMapSampler, _166); - break; - } - else - { - float _285 = 1.0 / (1.0 - 0.75); - _298 = mix(SpecularMapTexture.sample(SpecularMapSampler, (_166 * 0.25)), SpecularMapTexture.sample(SpecularMapSampler, _166), float4(fast::clamp((_165 * _285) - (0.75 * _285), 0.0, 1.0))); - break; - } - _298 = _297; - break; - } - float2 _303 = mix(float2(0.800000011920928955078125, 120.0), (_298.xy * float2(2.0, 256.0)) + float2(0.0, 0.00999999977648258209228515625), float2(_165)); - Surface _304 = _125; - _304.albedo = _271; - Surface _305 = _304; - _305.normal = _256; - float _306 = _303.x; - Surface _307 = _305; - _307.specular = _306; - float _308 = _303.y; - Surface _309 = _307; - _309.gloss = _308; - float _312 = (_298.xy.y * _165) * 0.0; - Surface _313 = _309; - _313.reflectance = _312; - float4 _318 = float4(_271, _146.Color.w); - float3 _329 = normalize(((in.IN_Tangent * _313.normal.x) + (cross(in.IN_Normal_SpecPower.xyz, in.IN_Tangent) * _313.normal.y)) + (in.IN_Normal_SpecPower.xyz * _313.normal.z)); - float3 _332 = -_19.CB0.Lamp0Dir; - float _333 = dot(_329, _332); - float _357 = fast::clamp(dot(step(_19.CB0.LightConfig3.xyz, abs(in.IN_LightPosition_Fog.xyz - _19.CB0.LightConfig2.xyz)), float3(1.0)), 0.0, 1.0); - float4 _368 = mix(LightMapTexture.sample(LightMapSampler, (in.IN_LightPosition_Fog.xyz.yzx - (in.IN_LightPosition_Fog.xyz.yzx * _357))), _19.CB0.LightBorder, float4(_357)); - float2 _376 = ShadowMapTexture.sample(ShadowMapSampler, in.IN_PosLightSpace_Reflectance.xyz.xy).xy; - float _392 = (1.0 - (((step(_376.x, in.IN_PosLightSpace_Reflectance.xyz.z) * fast::clamp(9.0 - (20.0 * abs(in.IN_PosLightSpace_Reflectance.xyz.z - 0.5)), 0.0, 1.0)) * _376.y) * _19.CB0.OutlineBrightness_ShadowInfo.w)) * _368.w; - float3 _403 = mix(_318.xyz, EnvironmentMapTexture.sample(EnvironmentMapSampler, reflect(-in.IN_View_Depth.xyz, _329)).xyz, float3(_312)); - float4 _404 = float4(_403.x, _403.y, _403.z, _318.w); - float3 _422 = (((_19.CB0.AmbientColor + (((_19.CB0.Lamp0Color * fast::clamp(_333, 0.0, 1.0)) + (_19.CB0.Lamp1Color * fast::max(-_333, 0.0))) * _392)) + _368.xyz) * _404.xyz) + (_19.CB0.Lamp0Color * (((step(0.0, _333) * _306) * _392) * pow(fast::clamp(dot(_329, normalize(_332 + normalize(in.IN_View_Depth.xyz))), 0.0, 1.0), _308))); - float4 _425 = float4(_422.x, _422.y, _422.z, _124.w); - _425.w = _404.w; - float2 _435 = fast::min(in.IN_Uv_EdgeDistance1.wz, in.IN_UvStuds_EdgeDistance2.wz); - float _439 = fast::min(_435.x, _435.y) / _163; - float3 _445 = _425.xyz * fast::clamp((fast::clamp((_163 * _19.CB0.OutlineBrightness_ShadowInfo.x) + _19.CB0.OutlineBrightness_ShadowInfo.y, 0.0, 1.0) * (1.5 - _439)) + _439, 0.0, 1.0); - float4 _446 = float4(_445.x, _445.y, _445.z, _425.w); - float3 _453 = mix(_19.CB0.FogColor, _446.xyz, float3(fast::clamp(_146.LightPosition_Fog.w, 0.0, 1.0))); - out._entryPointOutput = float4(_453.x, _453.y, _453.z, _446.w); - return out; -} - diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag index 1b6af2a36..8ceb9f43e 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag @@ -15,13 +15,15 @@ struct SSBO0 uint values0[1]; }; -inline void callee2(thread float4& gl_FragCoord, device SSBO1& v_7) +static inline __attribute__((always_inline)) +void callee2(thread float4& gl_FragCoord, device SSBO1& v_7) { int _31 = int(gl_FragCoord.x); v_7.values1[_31]++; } -inline void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& v_9) +static inline __attribute__((always_inline)) +void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& v_9) { int _39 = int(gl_FragCoord.x); v_9.values0[_39]++; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag index dded6a145..a38231639 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag @@ -20,13 +20,15 @@ struct SSBO0 uint values0[1]; }; -inline void callee2(thread float4& gl_FragCoord, device SSBO1& v_7) +static inline __attribute__((always_inline)) +void callee2(thread float4& gl_FragCoord, device SSBO1& v_7) { int _44 = int(gl_FragCoord.x); v_7.values1[_44]++; } -inline void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& v_9) +static inline __attribute__((always_inline)) +void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& v_9) { int _52 = int(gl_FragCoord.x); v_9.values0[_52]++; @@ -36,7 +38,8 @@ inline void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& } } -inline void _35(thread float4& gl_FragCoord, device _12& v_13) +static inline __attribute__((always_inline)) +void _35(thread float4& gl_FragCoord, device _12& v_13) { v_13._m0[int(gl_FragCoord.x)] = 4u; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag index 5fe65f3b0..beb21241f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag @@ -15,24 +15,28 @@ struct SSBO0 uint values0[1]; }; -inline void callee2(thread float4& gl_FragCoord, device SSBO1& v_7) +static inline __attribute__((always_inline)) +void callee2(thread float4& gl_FragCoord, device SSBO1& v_7) { int _37 = int(gl_FragCoord.x); v_7.values1[_37]++; } -inline void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& v_9) +static inline __attribute__((always_inline)) +void callee(thread float4& gl_FragCoord, device SSBO1& v_7, device SSBO0& v_9) { int _45 = int(gl_FragCoord.x); v_9.values0[_45]++; callee2(gl_FragCoord, v_7); } -inline void _29() +static inline __attribute__((always_inline)) +void _29() { } -inline void _31() +static inline __attribute__((always_inline)) +void _31() { } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag index 78b33afde..9d71a91e4 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag @@ -6,7 +6,8 @@ using namespace metal; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/empty-struct-composite.asm.vert b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/empty-struct-composite.asm.vert index e9cd6a540..95b61a40d 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/empty-struct-composite.asm.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/empty-struct-composite.asm.vert @@ -5,12 +5,9 @@ using namespace metal; struct Test { - int empty_struct_member; }; - vertex void main0() { - Test _14 = Test{ 0 }; - Test t = _14; + Test t = Test{ }; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/op-load-forced-temporary-array.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/op-load-forced-temporary-array.asm.frag index 47e4fe716..18d98993e 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/op-load-forced-temporary-array.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/asm/vert/op-load-forced-temporary-array.asm.frag @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + constant float _21 = {}; struct main0_out @@ -13,7 +54,7 @@ struct main0_out vertex main0_out main0() { main0_out out = {}; - float _23[2]; + spvUnsafeArray _23; for (int _25 = 0; _25 < 2; ) { _23[_25] = 0.0; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/array-copy-threadgroup-memory.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/array-copy-threadgroup-memory.comp index 85a06afaa..24ae08e7b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/array-copy-threadgroup-memory.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/array-copy-threadgroup-memory.comp @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(8u, 1u, 1u); template @@ -65,15 +104,15 @@ kernel void main0(uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) { threadgroup float shared_group[8][8]; threadgroup float shared_group_alt[8][8]; - float blob[8]; + spvUnsafeArray blob; for (int i = 0; i < 8; i++) { blob[i] = float(i); } - spvArrayCopyFromStackToThreadGroup1(shared_group[gl_LocalInvocationIndex], blob); + spvArrayCopyFromStackToThreadGroup1(shared_group[gl_LocalInvocationIndex], blob.elements); threadgroup_barrier(mem_flags::mem_threadgroup); - float copied_blob[8]; - spvArrayCopyFromThreadGroupToStack1(copied_blob, shared_group[gl_LocalInvocationIndex ^ 1u]); + spvUnsafeArray copied_blob; + spvArrayCopyFromThreadGroupToStack1(copied_blob.elements, shared_group[gl_LocalInvocationIndex ^ 1u]); spvArrayCopyFromThreadGroupToThreadGroup1(shared_group_alt[gl_LocalInvocationIndex], shared_group[gl_LocalInvocationIndex]); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/glsl.std450.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/glsl.std450.comp index 83ac061a7..e357c64c8 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/glsl.std450.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/comp/glsl.std450.comp @@ -70,20 +70,23 @@ inline T sign(T x) } // Returns the determinant of a 2x2 matrix. -inline float spvDet2x2(float a1, float a2, float b1, float b2) +static inline __attribute__((always_inline)) +float spvDet2x2(float a1, float a2, float b1, float b2) { return a1 * b2 - b1 * a2; } // Returns the determinant of a 3x3 matrix. -inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) +static inline __attribute__((always_inline)) +float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) { return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3); } // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float4x4 spvInverse4x4(float4x4 m) +static inline __attribute__((always_inline)) +float4x4 spvInverse4x4(float4x4 m) { float4x4 adj; // The adjoint matrix (inverse after dividing by determinant) @@ -118,7 +121,8 @@ inline float4x4 spvInverse4x4(float4x4 m) // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float3x3 spvInverse3x3(float3x3 m) +static inline __attribute__((always_inline)) +float3x3 spvInverse3x3(float3x3 m) { float3x3 adj; // The adjoint matrix (inverse after dividing by determinant) @@ -145,7 +149,8 @@ inline float3x3 spvInverse3x3(float3x3 m) // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float2x2 spvInverse2x2(float2x2 m) +static inline __attribute__((always_inline)) +float2x2 spvInverse2x2(float2x2 m) { float2x2 adj; // The adjoint matrix (inverse after dividing by determinant) diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/pixel-interlock-simple-callstack.msl2.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/pixel-interlock-simple-callstack.msl2.frag index 716ba251f..cb01950d2 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/pixel-interlock-simple-callstack.msl2.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/pixel-interlock-simple-callstack.msl2.frag @@ -15,13 +15,15 @@ struct SSBO0 uint values0[1]; }; -inline void callee2(device SSBO1& v_14, thread float4& gl_FragCoord) +static inline __attribute__((always_inline)) +void callee2(device SSBO1& v_14, thread float4& gl_FragCoord) { int _25 = int(gl_FragCoord.x); v_14.values1[_25]++; } -inline void callee(device SSBO1& v_14, thread float4& gl_FragCoord, device SSBO0& v_35) +static inline __attribute__((always_inline)) +void callee(device SSBO1& v_14, thread float4& gl_FragCoord, device SSBO0& v_35) { int _38 = int(gl_FragCoord.x); v_35.values0[_38]++; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-int.swizzle.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-int.swizzle.frag index d1c52aef4..ff4b8a919 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-int.swizzle.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-int.swizzle.frag @@ -6,7 +6,8 @@ using namespace metal; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-leaf.swizzle.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-leaf.swizzle.frag index 4666702b4..730728c1a 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-leaf.swizzle.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-leaf.swizzle.frag @@ -6,7 +6,8 @@ using namespace metal; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } @@ -131,7 +132,8 @@ inline vec spvGatherCompareSwizzle(const thread Tex& t, sampler s, uint return t.gather_compare(s, spvForward(params)...); } -inline float4 doSwizzle(thread texture1d tex1d, thread const sampler tex1dSmplr, constant uint& tex1dSwzl, thread texture2d tex2d, thread const sampler tex2dSmplr, constant uint& tex2dSwzl, thread texture3d tex3d, thread const sampler tex3dSmplr, constant uint& tex3dSwzl, thread texturecube texCube, thread const sampler texCubeSmplr, constant uint& texCubeSwzl, thread texture2d_array tex2dArray, thread const sampler tex2dArraySmplr, constant uint& tex2dArraySwzl, thread texturecube_array texCubeArray, thread const sampler texCubeArraySmplr, constant uint& texCubeArraySwzl, thread depth2d depth2d, thread const sampler depth2dSmplr, constant uint& depth2dSwzl, thread depthcube depthCube, thread const sampler depthCubeSmplr, constant uint& depthCubeSwzl, thread depth2d_array depth2dArray, thread const sampler depth2dArraySmplr, constant uint& depth2dArraySwzl, thread depthcube_array depthCubeArray, thread const sampler depthCubeArraySmplr, constant uint& depthCubeArraySwzl, thread texture2d texBuffer) +static inline __attribute__((always_inline)) +float4 doSwizzle(thread texture1d tex1d, thread const sampler tex1dSmplr, constant uint& tex1dSwzl, thread texture2d tex2d, thread const sampler tex2dSmplr, constant uint& tex2dSwzl, thread texture3d tex3d, thread const sampler tex3dSmplr, constant uint& tex3dSwzl, thread texturecube texCube, thread const sampler texCubeSmplr, constant uint& texCubeSwzl, thread texture2d_array tex2dArray, thread const sampler tex2dArraySmplr, constant uint& tex2dArraySwzl, thread texturecube_array texCubeArray, thread const sampler texCubeArraySmplr, constant uint& texCubeArraySwzl, thread depth2d depth2d, thread const sampler depth2dSmplr, constant uint& depth2dSwzl, thread depthcube depthCube, thread const sampler depthCubeSmplr, constant uint& depthCubeSwzl, thread depth2d_array depth2dArray, thread const sampler depth2dArraySmplr, constant uint& depth2dArraySwzl, thread depthcube_array depthCubeArray, thread const sampler depthCubeArraySmplr, constant uint& depthCubeArraySwzl, thread texture2d texBuffer) { float4 c = spvTextureSwizzle(tex1d.sample(tex1dSmplr, 0.0), tex1dSwzl); c = spvTextureSwizzle(tex2d.sample(tex2dSmplr, float2(0.0)), tex2dSwzl); diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-uint.swizzle.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-uint.swizzle.frag index 1063b8ab3..0ec278f97 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-uint.swizzle.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access-uint.swizzle.frag @@ -6,7 +6,8 @@ using namespace metal; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access.swizzle.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access.swizzle.frag index 389b3a68a..c31d5d7dc 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access.swizzle.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/frag/texture-access.swizzle.frag @@ -6,7 +6,8 @@ using namespace metal; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/array-of-vec3.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/array-of-vec3.comp new file mode 100644 index 000000000..0dd52ab36 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/array-of-vec3.comp @@ -0,0 +1,17 @@ +#include +#include + +using namespace metal; + +struct SSBO +{ + packed_float3 v[16]; +}; + +constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); + +kernel void main0(device SSBO& _13 [[buffer(0)]]) +{ + _13.v[1] = float3(_13.v[0]); +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/array-of-vec4.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/array-of-vec4.comp new file mode 100644 index 000000000..025cd4254 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/array-of-vec4.comp @@ -0,0 +1,17 @@ +#include +#include + +using namespace metal; + +struct SSBO +{ + float4 v[16]; +}; + +constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); + +kernel void main0(device SSBO& _13 [[buffer(0)]]) +{ + _13.v[1] = _13.v[0]; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-scalar.comp index bc392f3da..d1bdd47f5 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-scalar.comp @@ -19,46 +19,54 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x2 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std140.comp index e378317eb..1e23ce372 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std140.comp @@ -19,52 +19,60 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x2 loaded = float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy); v_29.col_major1[0].xy = loaded[0]; v_29.col_major1[1].xy = loaded[1]; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x2 loaded = transpose(float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)); v_41.row_major0[0].xy = float2(loaded[0][0], loaded[1][0]); v_41.row_major0[1].xy = float2(loaded[0][1], loaded[1][1]); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0[0].xy = float2x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy)[0]; v_29.col_major0[1].xy = float2x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy)[1]; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0[0].xy = float2(float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[0][0], float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[1][0]); v_41.row_major0[1].xy = float2(float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[0][1], float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[1][1]); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].xy = float2(float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[0][0], float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[1][0]); v_29.col_major0[1].xy = float2(float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[0][1], float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[1][1]); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0[0].xy = float2x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy)[0]; v_41.row_major0[1].xy = float2x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy)[1]; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std430.comp index bc392f3da..d1bdd47f5 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x2-std430.comp @@ -19,46 +19,54 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x2 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-scalar.comp index e49ca8d91..cf3214924 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-scalar.comp @@ -21,42 +21,49 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x3 loaded = float2x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1])); v_29.col_major1[0] = loaded[0]; v_29.col_major1[1] = loaded[1]; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0[0] = float2x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]))[0]; v_29.col_major0[1] = float2x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]))[1]; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(float2x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]))); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0] = float3(v_41.row_major0[0][0], v_41.row_major0[1][0], v_41.row_major0[2][0]); v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1][0]; @@ -64,7 +71,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1][2]; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0][1u] = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0][1u]; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std140.comp index 3ef891d85..c94069fed 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std140.comp @@ -19,13 +19,15 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x3 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x3 loaded = transpose(float3x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy)); v_41.row_major0[0].xy = float2(loaded[0][0], loaded[1][0]); @@ -33,31 +35,36 @@ inline void load_store_to_variable_row_major(device SSBORow& v_41) v_41.row_major0[2].xy = float2(loaded[0][2], loaded[1][2]); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0[0].xy = float2(v_29.col_major0[0][0], v_29.col_major0[1][0]); v_41.row_major0[1].xy = float2(v_29.col_major0[0][1], v_29.col_major0[1][1]); v_41.row_major0[2].xy = float2(v_29.col_major0[0][2], v_29.col_major0[1][2]); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(float3x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy)); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0[0].xy = float3x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy)[0]; v_41.row_major0[1].xy = float3x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy)[1]; v_41.row_major0[2].xy = float3x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy)[2]; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -65,7 +72,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1].z; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std430.comp index 6b6e1ea7c..6263c058e 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x3-std430.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x3 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -59,7 +66,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1].z; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-scalar.comp index e4725e0fb..cea5620ab 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-scalar.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std140.comp index 05e5492ce..222704834 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std140.comp @@ -19,13 +19,15 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x4 loaded = transpose(float4x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy, v_41.row_major0[3].xy)); v_41.row_major0[0].xy = float2(loaded[0][0], loaded[1][0]); @@ -34,12 +36,14 @@ inline void load_store_to_variable_row_major(device SSBORow& v_41) v_41.row_major0[3].xy = float2(loaded[0][3], loaded[1][3]); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0[0].xy = float2(v_29.col_major0[0][0], v_29.col_major0[1][0]); v_41.row_major0[1].xy = float2(v_29.col_major0[0][1], v_29.col_major0[1][1]); @@ -47,12 +51,14 @@ inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_ v_41.row_major0[3].xy = float2(v_29.col_major0[0][3], v_29.col_major0[1][3]); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(float4x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy, v_41.row_major0[3].xy)); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0[0].xy = float4x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy, v_41.row_major1[3].xy)[0]; v_41.row_major0[1].xy = float4x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy, v_41.row_major1[3].xy)[1]; @@ -60,7 +66,8 @@ inline void copy_row_major_to_row_major(device SSBORow& v_41) v_41.row_major0[3].xy = float4x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy, v_41.row_major1[3].xy)[3]; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -69,7 +76,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std430.comp index e4725e0fb..cea5620ab 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-2x4-std430.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float2x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float2x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-scalar.comp index 621071878..4cbd0bd2a 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-scalar.comp @@ -21,49 +21,57 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x2 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x2 loaded = transpose(float2x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]))); v_41.row_major0[0] = float3(loaded[0][0], loaded[1][0], loaded[2][0]); v_41.row_major0[1] = float3(loaded[0][1], loaded[1][1], loaded[2][1]); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0[0] = float3(v_29.col_major0[0][0], v_29.col_major0[1][0], v_29.col_major0[2][0]); v_41.row_major0[1] = float3(v_29.col_major0[0][1], v_29.col_major0[1][1], v_29.col_major0[2][1]); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(float2x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]))); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0[0] = float2x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]))[0]; v_41.row_major0[1] = float2x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]))[1]; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std140.comp index 96a781487..5a74c0728 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std140.comp @@ -19,7 +19,8 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x2 loaded = float3x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy); v_29.col_major1[0].xy = loaded[0]; @@ -27,44 +28,51 @@ inline void load_store_to_variable_col_major(device SSBOCol& v_29) v_29.col_major1[2].xy = loaded[2]; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0[0].xy = float3x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy)[0]; v_29.col_major0[1].xy = float3x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy)[1]; v_29.col_major0[2].xy = float3x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy)[2]; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(float3x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy)); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].xy = float2(v_41.row_major0[0][0], v_41.row_major0[1][0]); v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_29.col_major0[2].xy = float2(v_41.row_major0[0][2], v_41.row_major0[1][2]); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std430.comp index 8a4d00bf2..77a419c4d 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x2-std430.comp @@ -19,46 +19,54 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x2 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-scalar.comp index 1ada47bd3..8701e96ea 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-scalar.comp @@ -22,7 +22,8 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x3 loaded = float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2])); v_29.col_major1[0] = loaded[0]; @@ -30,7 +31,8 @@ inline void load_store_to_variable_col_major(device SSBOCol& v_29) v_29.col_major1[2] = loaded[2]; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x3 loaded = transpose(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))); v_41.row_major0[0] = float3(loaded[0][0], loaded[1][0], loaded[2][0]); @@ -38,35 +40,40 @@ inline void load_store_to_variable_row_major(device SSBORow& v_41) v_41.row_major0[2] = float3(loaded[0][2], loaded[1][2], loaded[2][2]); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0[0] = float3x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]))[0]; v_29.col_major0[1] = float3x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]))[1]; v_29.col_major0[2] = float3x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]))[2]; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0[0] = float3(float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[0][0], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[1][0], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[2][0]); v_41.row_major0[1] = float3(float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[0][1], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[1][1], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[2][1]); v_41.row_major0[2] = float3(float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[0][2], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[1][2], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[2][2]); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0] = float3(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[0][0], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[1][0], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[2][0]); v_29.col_major0[1] = float3(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[0][1], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[1][1], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[2][1]); v_29.col_major0[2] = float3(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[0][2], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[1][2], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[2][2]); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0[0] = float3x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]))[0]; v_41.row_major0[1] = float3x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]))[1]; v_41.row_major0[2] = float3x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]))[2]; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1][0]; @@ -74,7 +81,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1][2]; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0][1u] = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0][1u]; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std140.comp index 44f50f788..2551c023c 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std140.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x3 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -59,7 +66,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1].z; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std430.comp index 44f50f788..2551c023c 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x3-std430.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x3 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -59,7 +66,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1].z; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-scalar.comp index 155c485b4..32dafdd08 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-scalar.comp @@ -21,13 +21,15 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x4 loaded = transpose(float4x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]), float3(v_41.row_major0[3]))); v_41.row_major0[0] = float3(loaded[0][0], loaded[1][0], loaded[2][0]); @@ -36,12 +38,14 @@ inline void load_store_to_variable_row_major(device SSBORow& v_41) v_41.row_major0[3] = float3(loaded[0][3], loaded[1][3], loaded[2][3]); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0[0] = float3(v_29.col_major0[0][0], v_29.col_major0[1][0], v_29.col_major0[2][0]); v_41.row_major0[1] = float3(v_29.col_major0[0][1], v_29.col_major0[1][1], v_29.col_major0[2][1]); @@ -49,12 +53,14 @@ inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_ v_41.row_major0[3] = float3(v_29.col_major0[0][3], v_29.col_major0[1][3], v_29.col_major0[2][3]); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(float4x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]), float3(v_41.row_major0[3]))); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0[0] = float4x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]), float3(v_41.row_major1[3]))[0]; v_41.row_major0[1] = float4x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]), float3(v_41.row_major1[3]))[1]; @@ -62,7 +68,8 @@ inline void copy_row_major_to_row_major(device SSBORow& v_41) v_41.row_major0[3] = float4x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]), float3(v_41.row_major1[3]))[3]; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -71,7 +78,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std140.comp index a07848897..e58cab089 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std140.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std430.comp index a07848897..e58cab089 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-3x4-std430.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float3x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float3x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-scalar.comp index 94befba2f..f7ca92978 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-scalar.comp @@ -19,46 +19,54 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x2 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std140.comp index f09d11816..e5cca638e 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std140.comp @@ -19,7 +19,8 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x2 loaded = float4x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy, v_29.col_major0[3].xy); v_29.col_major1[0].xy = loaded[0]; @@ -28,13 +29,15 @@ inline void load_store_to_variable_col_major(device SSBOCol& v_29) v_29.col_major1[3].xy = loaded[3]; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0[0].xy = float4x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy, v_29.col_major1[3].xy)[0]; v_29.col_major0[1].xy = float4x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy, v_29.col_major1[3].xy)[1]; @@ -42,12 +45,14 @@ inline void copy_col_major_to_col_major(device SSBOCol& v_29) v_29.col_major0[3].xy = float4x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy, v_29.col_major1[3].xy)[3]; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(float4x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy, v_29.col_major0[3].xy)); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].xy = float2(v_41.row_major0[0][0], v_41.row_major0[1][0]); v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); @@ -55,19 +60,22 @@ inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_ v_29.col_major0[3].xy = float2(v_41.row_major0[0][3], v_41.row_major0[1][3]); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std430.comp index 94befba2f..f7ca92978 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x2-std430.comp @@ -19,46 +19,54 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x2 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x2 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; v_41.row_major0[1][1] = v_29.col_major0[1].y; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-scalar.comp index 4edf68ed8..065525350 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-scalar.comp @@ -21,7 +21,8 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x3 loaded = float4x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]), float3(v_29.col_major0[3])); v_29.col_major1[0] = loaded[0]; @@ -30,13 +31,15 @@ inline void load_store_to_variable_col_major(device SSBOCol& v_29) v_29.col_major1[3] = loaded[3]; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0[0] = float4x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]), float3(v_29.col_major1[3]))[0]; v_29.col_major0[1] = float4x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]), float3(v_29.col_major1[3]))[1]; @@ -44,12 +47,14 @@ inline void copy_col_major_to_col_major(device SSBOCol& v_29) v_29.col_major0[3] = float4x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]), float3(v_29.col_major1[3]))[3]; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(float4x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]), float3(v_29.col_major0[3]))); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0] = float3(v_41.row_major0[0][0], v_41.row_major0[1][0], v_41.row_major0[2][0]); v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); @@ -57,12 +62,14 @@ inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_ v_29.col_major0[3] = float3(v_41.row_major0[0][3], v_41.row_major0[1][3], v_41.row_major0[2][3]); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1][0]; @@ -70,7 +77,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1][2]; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0][1u] = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0][1u]; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std140.comp index e19d043f0..34420a46b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std140.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x3 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -59,7 +66,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1].z; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std430.comp index e19d043f0..34420a46b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x3-std430.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x3 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x3 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -59,7 +66,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[2][1] = v_29.col_major0[1].z; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-scalar.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-scalar.comp index ff72744a0..c36369a6b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-scalar.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-scalar.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std140.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std140.comp index ff72744a0..c36369a6b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std140.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std140.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std430.comp b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std430.comp index ff72744a0..c36369a6b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std430.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/packing/matrix-4x4-std430.comp @@ -19,39 +19,46 @@ struct SSBORow constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void load_store_to_variable_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void load_store_to_variable_col_major(device SSBOCol& v_29) { float4x4 loaded = v_29.col_major0; v_29.col_major1 = loaded; } -inline void load_store_to_variable_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void load_store_to_variable_row_major(device SSBORow& v_41) { float4x4 loaded = transpose(v_41.row_major0); v_41.row_major0 = transpose(loaded); } -inline void copy_col_major_to_col_major(device SSBOCol& v_29) +static inline __attribute__((always_inline)) +void copy_col_major_to_col_major(device SSBOCol& v_29) { v_29.col_major0 = v_29.col_major1; } -inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41) { v_41.row_major0 = transpose(v_29.col_major0); } -inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0 = transpose(v_41.row_major0); } -inline void copy_row_major_to_row_major(device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_row_major_to_row_major(device SSBORow& v_41) { v_41.row_major0 = v_41.row_major1; } -inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]); v_41.row_major0[0][1] = v_29.col_major0[1].x; @@ -60,7 +67,8 @@ inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41) v_41.row_major0[3][1] = v_29.col_major0[1].w; } -inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) +static inline __attribute__((always_inline)) +void copy_elements(device SSBOCol& v_29, device SSBORow& v_41) { v_29.col_major0[0].y = v_41.row_major0[1u][0]; v_41.row_major0[1u][0] = v_29.col_major0[0].y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/functions_nested.vert b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/functions_nested.vert index 0f2b70bb0..5ef90014d 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/functions_nested.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/functions_nested.vert @@ -37,12 +37,14 @@ struct main0_out }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } -inline attr_desc fetch_desc(thread const int& location, constant VertexBuffer& v_227) +static inline __attribute__((always_inline)) +attr_desc fetch_desc(thread const int& location, constant VertexBuffer& v_227) { int attribute_flags = v_227.input_attributes[location].w; attr_desc result; @@ -55,7 +57,8 @@ inline attr_desc fetch_desc(thread const int& location, constant VertexBuffer& v return result; } -inline uint get_bits(thread const uint4& v, thread const int& swap) +static inline __attribute__((always_inline)) +uint get_bits(thread const uint4& v, thread const int& swap) { if (swap != 0) { @@ -64,7 +67,8 @@ inline uint get_bits(thread const uint4& v, thread const int& swap) return ((v.x | (v.y << uint(8))) | (v.z << uint(16))) | (v.w << uint(24)); } -inline float4 fetch_attr(thread const attr_desc& desc, thread const int& vertex_id, thread const texture2d input_stream) +static inline __attribute__((always_inline)) +float4 fetch_attr(thread const attr_desc& desc, thread const int& vertex_id, thread const texture2d input_stream) { float4 result = float4(0.0, 0.0, 0.0, 1.0); bool reverse_order = false; @@ -132,7 +136,8 @@ inline float4 fetch_attr(thread const attr_desc& desc, thread const int& vertex_ return _210; } -inline float4 read_location(thread const int& location, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d buff_in_2, thread texture2d buff_in_1) +static inline __attribute__((always_inline)) +float4 read_location(thread const int& location, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d buff_in_2, thread texture2d buff_in_1) { int param = location; attr_desc desc = fetch_desc(param, v_227); @@ -151,7 +156,8 @@ inline float4 read_location(thread const int& location, constant VertexBuffer& v } } -inline void vs_adjust(thread float4& dst_reg0, thread float4& dst_reg1, thread float4& dst_reg7, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d buff_in_2, thread texture2d buff_in_1, constant VertexConstantsBuffer& v_309) +static inline __attribute__((always_inline)) +void vs_adjust(thread float4& dst_reg0, thread float4& dst_reg1, thread float4& dst_reg7, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d buff_in_2, thread texture2d buff_in_1, constant VertexConstantsBuffer& v_309) { int param = 3; float4 in_diff_color = read_location(param, v_227, gl_VertexIndex, buff_in_2, buff_in_1); diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/pass-array-by-value.vert b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/pass-array-by-value.vert index 5fc73a3a3..f6e3efbec 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/pass-array-by-value.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vert/pass-array-by-value.vert @@ -1,11 +1,50 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; -constant float4 _68[4] = { float4(0.0), float4(1.0), float4(2.0), float4(3.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _68 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(2.0), float4(3.0) }); struct main0_out { @@ -18,84 +57,31 @@ struct main0_in int Index2 [[attribute(1)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) +static inline __attribute__((always_inline)) +float4 consume_constant_arrays2(spvUnsafeArray positions, spvUnsafeArray positions2, thread int& Index1, thread int& Index2) { - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -inline float4 consume_constant_arrays2(thread const float4 (&positions)[4], thread const float4 (&positions2)[4], thread int& Index1, thread int& Index2) -{ - float4 indexable[4]; - spvArrayCopyFromStackToStack1(indexable, positions); - float4 indexable_1[4]; - spvArrayCopyFromStackToStack1(indexable_1, positions2); + spvUnsafeArray indexable; + indexable = positions; + spvUnsafeArray indexable_1; + indexable_1 = positions2; return indexable[Index1] + indexable_1[Index2]; } -inline float4 consume_constant_arrays(thread const float4 (&positions)[4], thread const float4 (&positions2)[4], thread int& Index1, thread int& Index2) +static inline __attribute__((always_inline)) +float4 consume_constant_arrays(spvUnsafeArray positions, spvUnsafeArray positions2, thread int& Index1, thread int& Index2) { return consume_constant_arrays2(positions, positions2, Index1, Index2); } vertex main0_out main0(main0_in in [[stage_in]]) { - float4 _68_array_copy[4] = { float4(0.0), float4(1.0), float4(2.0), float4(3.0) }; main0_out out = {}; - float4 LUT2[4]; + spvUnsafeArray LUT2; LUT2[0] = float4(10.0); LUT2[1] = float4(11.0); LUT2[2] = float4(12.0); LUT2[3] = float4(13.0); - out.gl_Position = consume_constant_arrays(_68_array_copy, LUT2, in.Index1, in.Index2); + out.gl_Position = consume_constant_arrays(_68, LUT2, in.Index1, in.Index2); return out; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vulkan/frag/texture-access-function.swizzle.vk.frag b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vulkan/frag/texture-access-function.swizzle.vk.frag index 0fcca3af8..d4f70e0e1 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vulkan/frag/texture-access-function.swizzle.vk.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl-no-opt/vulkan/frag/texture-access-function.swizzle.vk.frag @@ -11,7 +11,8 @@ struct main0_out }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } @@ -136,7 +137,8 @@ inline vec spvGatherCompareSwizzle(const thread Tex& t, sampler s, uint return t.gather_compare(s, spvForward(params)...); } -inline float4 do_samples(thread const texture1d t1, thread const sampler t1Smplr, constant uint& t1Swzl, thread const texture2d t2, constant uint& t2Swzl, thread const texture3d t3, thread const sampler t3Smplr, constant uint& t3Swzl, thread const texturecube tc, constant uint& tcSwzl, thread const texture2d_array t2a, thread const sampler t2aSmplr, constant uint& t2aSwzl, thread const texturecube_array tca, thread const sampler tcaSmplr, constant uint& tcaSwzl, thread const texture2d tb, thread const depth2d d2, thread const sampler d2Smplr, constant uint& d2Swzl, thread const depthcube dc, thread const sampler dcSmplr, constant uint& dcSwzl, thread const depth2d_array d2a, constant uint& d2aSwzl, thread const depthcube_array dca, thread const sampler dcaSmplr, constant uint& dcaSwzl, thread sampler defaultSampler, thread sampler shadowSampler) +static inline __attribute__((always_inline)) +float4 do_samples(thread const texture1d t1, thread const sampler t1Smplr, constant uint& t1Swzl, thread const texture2d t2, constant uint& t2Swzl, thread const texture3d t3, thread const sampler t3Smplr, constant uint& t3Swzl, thread const texturecube tc, constant uint& tcSwzl, thread const texture2d_array t2a, thread const sampler t2aSmplr, constant uint& t2aSwzl, thread const texturecube_array tca, thread const sampler tcaSmplr, constant uint& tcaSwzl, thread const texture2d tb, thread const depth2d d2, thread const sampler d2Smplr, constant uint& d2Swzl, thread const depthcube dc, thread const sampler dcSmplr, constant uint& dcSwzl, thread const depth2d_array d2a, constant uint& d2aSwzl, thread const depthcube_array dca, thread const sampler dcaSmplr, constant uint& dcaSwzl, thread sampler defaultSampler, thread sampler shadowSampler) { float4 c = spvTextureSwizzle(t1.sample(t1Smplr, 0.0), t1Swzl); c = spvTextureSwizzle(t2.sample(defaultSampler, float2(0.0)), t2Swzl); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp index ca9ba1544..e250770dc 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp @@ -13,7 +13,8 @@ struct u0_counters }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-increment.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-increment.asm.comp index b8d5b3cca..22c104f93 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-increment.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/atomic-increment.asm.comp @@ -13,7 +13,8 @@ struct u0_counters }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp index 54323859c..57d2205a4 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp @@ -11,7 +11,8 @@ struct cb5_struct }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write.asm.comp index c4a0476c3..8c9e23aa0 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/buffer-write.asm.comp @@ -11,7 +11,8 @@ struct cb }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/global-parameter-name-alias.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/global-parameter-name-alias.asm.comp index 0c0d8b599..ec1b2a2da 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/global-parameter-name-alias.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/global-parameter-name-alias.asm.comp @@ -10,13 +10,15 @@ struct ssbo uint _data[1]; }; -inline void Load(thread const uint& size, const device ssbo& ssbo_1) +static inline __attribute__((always_inline)) +void Load(thread const uint& size, const device ssbo& ssbo_1) { int byteAddrTemp = int(size >> uint(2)); uint4 data = uint4(ssbo_1._data[byteAddrTemp], ssbo_1._data[byteAddrTemp + 1], ssbo_1._data[byteAddrTemp + 2], ssbo_1._data[byteAddrTemp + 3]); } -inline void _main(thread const uint3& id, const device ssbo& ssbo_1) +static inline __attribute__((always_inline)) +void _main(thread const uint3& id, const device ssbo& ssbo_1) { uint param = 4u; Load(param, ssbo_1); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/image-load-store-short-vector.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/image-load-store-short-vector.asm.comp index 4770033bc..fca572e36 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/image-load-store-short-vector.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/image-load-store-short-vector.asm.comp @@ -5,7 +5,8 @@ using namespace metal; -inline void _main(thread const uint3& id, thread texture2d TargetTexture) +static inline __attribute__((always_inline)) +void _main(thread const uint3& id, thread texture2d TargetTexture) { float2 loaded = TargetTexture.read(uint2(id.xy)).xy; float2 storeTemp = loaded + float2(1.0); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/struct-resource-name-aliasing.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/struct-resource-name-aliasing.asm.comp index 8ea934730..fa7d26982 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/struct-resource-name-aliasing.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/struct-resource-name-aliasing.asm.comp @@ -10,7 +10,8 @@ struct bufA uint _data[1]; }; -inline void _main(device bufA& bufA_1, device bufA& bufB) +static inline __attribute__((always_inline)) +void _main(device bufA& bufA_1, device bufA& bufB) { bufA_1._data[0] = 0u; bufB._data[0] = 0u; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp index 7855c4c82..4bf34ff4b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp @@ -17,12 +17,14 @@ struct bar int d; }; -inline device foo* select_buffer(device foo& a, constant bar& cb) +static inline __attribute__((always_inline)) +device foo* select_buffer(device foo& a, constant bar& cb) { return (cb.d != 0) ? &a : nullptr; } -inline thread uint3* select_input(thread uint3& gl_GlobalInvocationID, thread uint3& gl_LocalInvocationID, constant bar& cb) +static inline __attribute__((always_inline)) +thread uint3* select_input(thread uint3& gl_GlobalInvocationID, thread uint3& gl_LocalInvocationID, constant bar& cb) { return (cb.d != 0) ? &gl_GlobalInvocationID : &gl_LocalInvocationID; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-store-forwarding.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-store-forwarding.asm.comp index 11a39ad23..00c490c77 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-store-forwarding.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/variable-pointers-store-forwarding.asm.comp @@ -15,7 +15,8 @@ struct bar int b; }; -inline device int* _24(device foo& a, device bar& b, thread uint3& gl_GlobalInvocationID) +static inline __attribute__((always_inline)) +device int* _24(device foo& a, device bar& b, thread uint3& gl_GlobalInvocationID) { return (gl_GlobalInvocationID.x != 0u) ? &a.a : &b.b; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp index e4573f37a..93e14e861 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp @@ -12,7 +12,8 @@ struct cb1_struct constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(16u, 16u, 1u); -inline int2 get_texcoord(thread const int2& base, thread const int2& index, thread uint3& gl_LocalInvocationID) +static inline __attribute__((always_inline)) +int2 get_texcoord(thread const int2& base, thread const int2& index, thread uint3& gl_LocalInvocationID) { return (base * int3(gl_LocalInvocationID).xy) + index; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/empty-struct.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/empty-struct.asm.frag index 61d49d783..e30c5864b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/empty-struct.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/empty-struct.asm.frag @@ -7,24 +7,23 @@ using namespace metal; struct EmptyStructTest { - int empty_struct_member; }; - -inline float GetValue(thread const EmptyStructTest& self) +static inline __attribute__((always_inline)) +float GetValue(thread const EmptyStructTest& self) { return 0.0; } -inline float GetValue_1(EmptyStructTest self) +static inline __attribute__((always_inline)) +float GetValue_1(EmptyStructTest self) { return 0.0; } fragment void main0() { - EmptyStructTest _23 = EmptyStructTest{ 0 }; EmptyStructTest emptyStruct; float value = GetValue(emptyStruct); - value = GetValue_1(_23); + value = GetValue_1(EmptyStructTest{ }); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag index ec5534515..e926bc5f3 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag @@ -28,7 +28,8 @@ struct main0_out float4 _entryPointOutput [[color(0)]]; }; -inline float4 _main(thread const float4& pos, constant buf& v_11) +static inline __attribute__((always_inline)) +float4 _main(thread const float4& pos, constant buf& v_11) { int _46 = int(pos.x) % 16; Foo foo; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/function-overload-alias.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/function-overload-alias.asm.frag index 13e359680..40fe5c5d8 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/function-overload-alias.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/function-overload-alias.asm.frag @@ -10,22 +10,26 @@ struct main0_out float4 FragColor [[color(0)]]; }; -inline float4 foo(thread const float4& foo_1) +static inline __attribute__((always_inline)) +float4 foo(thread const float4& foo_1) { return foo_1 + float4(1.0); } -inline float4 foo(thread const float3& foo_1) +static inline __attribute__((always_inline)) +float4 foo(thread const float3& foo_1) { return foo_1.xyzz + float4(1.0); } -inline float4 foo_1(thread const float4& foo_2) +static inline __attribute__((always_inline)) +float4 foo_1(thread const float4& foo_2) { return foo_2 + float4(2.0); } -inline float4 foo(thread const float2& foo_2) +static inline __attribute__((always_inline)) +float4 foo(thread const float2& foo_2) { return foo_2.xyxy + float4(2.0); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/line-directive.line.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/line-directive.line.asm.frag index b44b83d03..38fbd27ba 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/line-directive.line.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/line-directive.line.asm.frag @@ -16,7 +16,8 @@ struct main0_in }; #line 6 "test.frag" -inline void func(thread float& FragColor, thread float& vColor) +static inline __attribute__((always_inline)) +void func(thread float& FragColor, thread float& vColor) { #line 8 "test.frag" FragColor = 1.0; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag index 428a9bf24..41193536e 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag @@ -1,13 +1,52 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; -constant float _46[16] = { 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }; -constant float4 _76[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; -constant float4 _90[4] = { float4(20.0), float4(30.0), float4(50.0), float4(60.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _46 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _76 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); +constant spvUnsafeArray _90 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); struct main0_out { @@ -19,64 +58,10 @@ struct main0_in int index [[user(locn0)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - fragment main0_out main0(main0_in in [[stage_in]]) { - float4 foobar[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; - float4 baz[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; + spvUnsafeArray foobar = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); + spvUnsafeArray baz = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); main0_out out = {}; out.FragColor = _46[in.index]; if (in.index < 10) @@ -100,7 +85,7 @@ fragment main0_out main0(main0_in in [[stage_in]]) foobar[1].z = 20.0; } out.FragColor += foobar[in.index & 3].z; - spvArrayCopyFromConstantToStack1(baz, _90); + baz = _90; out.FragColor += baz[in.index & 3].z; return out; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/op-constant-null.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/op-constant-null.asm.frag index 9d5d7fb1d..f8104f816 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/op-constant-null.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/op-constant-null.asm.frag @@ -1,15 +1,56 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct D { float4 a; float b; }; -constant float4 _14[4] = { float4(0.0), float4(0.0), float4(0.0), float4(0.0) }; +constant spvUnsafeArray _14 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); struct main0_out { diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/pass-by-value.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/pass-by-value.asm.frag index 1935c3f81..46648f6d3 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/pass-by-value.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/pass-by-value.asm.frag @@ -15,7 +15,8 @@ struct main0_out float FragColor [[color(0)]]; }; -inline float add_value(float v, float w) +static inline __attribute__((always_inline)) +float add_value(float v, float w) { return v + w; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/single-function-private-lut.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/single-function-private-lut.asm.frag index 127f18181..54325051f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/single-function-private-lut.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/single-function-private-lut.asm.frag @@ -1,17 +1,54 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct myType { float data; }; -constant myType _21[5] = { myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 } }; - struct main0_out { float4 o_color [[color(0)]]; @@ -24,62 +61,10 @@ inline Tx mod(Tx x, Ty y) return x - y * floor(x / y); } -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - fragment main0_out main0(float4 gl_FragCoord [[position]]) { + spvUnsafeArray _21 = spvUnsafeArray({ myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 }, myType{ 1.0 }, myType{ 0.0 } }); + main0_out out = {}; float2 uv = gl_FragCoord.xy; int index = int(mod(uv.x, 4.0)); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag index 1bafc6953..d59013daa 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/storage-class-output-initializer.asm.frag @@ -1,9 +1,50 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; -constant float4 _20[2] = { float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _20 = spvUnsafeArray({ float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }); struct main0_out { @@ -15,7 +56,7 @@ struct main0_out fragment main0_out main0() { main0_out out = {}; - float4 FragColors[2] = { float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }; + spvUnsafeArray FragColors = spvUnsafeArray({ float4(1.0, 2.0, 3.0, 4.0), float4(10.0) }); out.FragColor = float4(5.0); out.FragColors_0 = FragColors[0]; out.FragColors_1 = FragColors[1]; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/texture-atomics.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/texture-atomics.asm.frag new file mode 100644 index 000000000..ab5be6498 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/texture-atomics.asm.frag @@ -0,0 +1,121 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + spvUnsafeArray _m0; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _107 = _103 + 1u; + if (all(CulledObjectBoxBounds._m0[_107].xy > _96.xy) && all(CulledObjectBoxBounds._m0[_103].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[_160] - (float3(0.5) * (CulledObjectBoxBounds._m0[_103].xyz + CulledObjectBoxBounds._m0[_107].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[_103 + 2u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 3u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 4u].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/texture-atomics.asm.graphics-robust-access.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/texture-atomics.asm.graphics-robust-access.frag new file mode 100644 index 000000000..ab5be6498 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/texture-atomics.asm.graphics-robust-access.frag @@ -0,0 +1,121 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + spvUnsafeArray _m0; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _107 = _103 + 1u; + if (all(CulledObjectBoxBounds._m0[_107].xy > _96.xy) && all(CulledObjectBoxBounds._m0[_103].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[_160] - (float3(0.5) * (CulledObjectBoxBounds._m0[_103].xyz + CulledObjectBoxBounds._m0[_107].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[_103 + 2u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 3u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 4u].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/unknown-depth-state.asm.frag b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/unknown-depth-state.asm.frag index 8bc8d36f2..01a0e5a73 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/unknown-depth-state.asm.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/frag/unknown-depth-state.asm.frag @@ -15,12 +15,14 @@ struct main0_in float3 vUV [[user(locn0)]]; }; -inline float sample_combined(thread float3& vUV, thread depth2d uShadow, thread const sampler uShadowSmplr) +static inline __attribute__((always_inline)) +float sample_combined(thread float3& vUV, thread depth2d uShadow, thread const sampler uShadowSmplr) { return uShadow.sample_compare(uShadowSmplr, vUV.xy, vUV.z); } -inline float sample_separate(thread float3& vUV, thread depth2d uTexture, thread sampler uSampler) +static inline __attribute__((always_inline)) +float sample_separate(thread float3& vUV, thread depth2d uTexture, thread sampler uSampler) { return uTexture.sample_compare(uSampler, vUV.xy, vUV.z); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc b/3rdparty/spirv-cross/reference/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc index ebe723de6..2c83e9e42 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/tesc/tess-fixed-input-array-builtin-array.invalid.asm.tesc @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct VertexOutput { float4 pos; @@ -19,7 +58,7 @@ struct HSOut struct HSConstantOut { - float EdgeTess[3]; + spvUnsafeArray EdgeTess; float InsideTess; }; @@ -45,61 +84,8 @@ struct main0_in float4 gl_Position [[attribute(1)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -inline HSOut _hs_main(thread const VertexOutput (&p)[3], thread const uint& i) +static inline __attribute__((always_inline)) +HSOut _hs_main(thread const spvUnsafeArray (&p), thread const uint& i) { HSOut _output; _output.pos = p[i].pos; @@ -107,7 +93,8 @@ inline HSOut _hs_main(thread const VertexOutput (&p)[3], thread const uint& i) return _output; } -inline HSConstantOut PatchHS(thread const VertexOutput (&_patch)[3]) +static inline __attribute__((always_inline)) +HSConstantOut PatchHS(thread const spvUnsafeArray (&_patch)) { HSConstantOut _output; _output.EdgeTess[0] = (float2(1.0) + _patch[0].uv).x; @@ -125,7 +112,7 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - VertexOutput p[3]; + spvUnsafeArray p; p[0].pos = gl_in[0].gl_Position; p[0].uv = gl_in[0].VertexOutput_uv; p[1].pos = gl_in[1].gl_Position; @@ -133,17 +120,17 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ p[2].pos = gl_in[2].gl_Position; p[2].uv = gl_in[2].VertexOutput_uv; uint i = gl_InvocationID; - VertexOutput param[3]; - spvArrayCopyFromStackToStack1(param, p); + spvUnsafeArray param; + param = p; uint param_1 = i; HSOut flattenTemp = _hs_main(param, param_1); gl_out[gl_InvocationID].gl_Position = flattenTemp.pos; gl_out[gl_InvocationID]._entryPointOutput.uv = flattenTemp.uv; - threadgroup_barrier(mem_flags::mem_device); + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); if (int(gl_InvocationID) == 0) { - VertexOutput param_2[3]; - spvArrayCopyFromStackToStack1(param_2, p); + spvUnsafeArray param_2; + param_2 = p; HSConstantOut _patchConstantResult = PatchHS(param_2); spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(_patchConstantResult.EdgeTess[0]); spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(_patchConstantResult.EdgeTess[1]); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/extract-transposed-matrix-from-struct.asm.vert b/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/extract-transposed-matrix-from-struct.asm.vert index 455735d01..b94687a52 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/extract-transposed-matrix-from-struct.asm.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/extract-transposed-matrix-from-struct.asm.vert @@ -39,7 +39,8 @@ struct main0_in float3 PosL [[attribute(0)]]; }; -inline V2F _VS(thread const float3& PosL, thread const uint& instanceID, const device gInstanceData& gInstanceData_1) +static inline __attribute__((always_inline)) +V2F _VS(thread const float3& PosL, thread const uint& instanceID, const device gInstanceData& gInstanceData_1) { InstanceData instData; instData.MATRIX_MVP = transpose(gInstanceData_1._data[instanceID].MATRIX_MVP); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert b/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert index 798a44043..d74c43b3f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert @@ -10,7 +10,8 @@ struct main0_out float4 gl_Position [[position, invariant]]; }; -inline float4 _main() +static inline __attribute__((always_inline)) +float4 _main() { return float4(1.0); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/uint-vertex-id-instance-id.asm.vert b/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/uint-vertex-id-instance-id.asm.vert index 231336df4..30df905e6 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/uint-vertex-id-instance-id.asm.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/asm/vert/uint-vertex-id-instance-id.asm.vert @@ -10,7 +10,8 @@ struct main0_out float4 gl_Position [[position]]; }; -inline float4 _main(thread const uint& vid, thread const uint& iid) +static inline __attribute__((always_inline)) +float4 _main(thread const uint& vid, thread const uint& iid) { return float4(float(vid + iid)); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/access-private-workgroup-in-function.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/access-private-workgroup-in-function.comp index 7449b2986..85185e6df 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/access-private-workgroup-in-function.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/access-private-workgroup-in-function.comp @@ -7,12 +7,14 @@ using namespace metal; constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline void set_f(thread int& f) +static inline __attribute__((always_inline)) +void set_f(thread int& f) { f = 40; } -inline void set_shared_u(threadgroup int& u) +static inline __attribute__((always_inline)) +void set_shared_u(threadgroup int& u) { u = 50; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.comp index fa3aca1a0..9ac8c827e 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.comp @@ -18,7 +18,8 @@ struct SSBO1 constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline uint get_size(device SSBO& v_14, constant uint& v_14BufferSize, device SSBO1* (&ssbos)[2], constant uint* ssbosBufferSize) +static inline __attribute__((always_inline)) +uint get_size(device SSBO& v_14, constant uint& v_14BufferSize, device SSBO1* (&ssbos)[2], constant uint* ssbosBufferSize) { return uint(int((v_14BufferSize - 16) / 16) + int((ssbosBufferSize[1] - 0) / 4)); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.msl2.argument.discrete.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.msl2.argument.discrete.comp index bbd4cbf32..aa1f4424d 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.msl2.argument.discrete.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/array-length.msl2.argument.discrete.comp @@ -41,7 +41,8 @@ struct spvDescriptorSetBuffer1 constant uint* spvBufferSizeConstants [[id(2)]]; }; -inline uint get_size(device SSBO& v_16, constant uint& v_16BufferSize, device SSBO1* constant (&ssbos)[2], constant uint* ssbosBufferSize, device SSBO2& v_38, constant uint& v_38BufferSize, device SSBO3* (&ssbos2)[2], constant uint* ssbos2BufferSize) +static inline __attribute__((always_inline)) +uint get_size(device SSBO& v_16, constant uint& v_16BufferSize, device SSBO1* constant (&ssbos)[2], constant uint* ssbosBufferSize, device SSBO2& v_38, constant uint& v_38BufferSize, device SSBO3* (&ssbos2)[2], constant uint* ssbos2BufferSize) { uint len = uint(int((v_16BufferSize - 16) / 16)); len += uint(int((ssbosBufferSize[1] - 0) / 4)); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/barriers.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/barriers.comp index 8c9cfb5d1..82813906f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/barriers.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/barriers.comp @@ -7,57 +7,68 @@ using namespace metal; constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(4u, 1u, 1u); -inline void barrier_shared() +static inline __attribute__((always_inline)) +void barrier_shared() { threadgroup_barrier(mem_flags::mem_threadgroup); } -inline void full_barrier() +static inline __attribute__((always_inline)) +void full_barrier() { threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture); } -inline void image_barrier() +static inline __attribute__((always_inline)) +void image_barrier() { threadgroup_barrier(mem_flags::mem_texture); } -inline void buffer_barrier() +static inline __attribute__((always_inline)) +void buffer_barrier() { threadgroup_barrier(mem_flags::mem_device); } -inline void group_barrier() +static inline __attribute__((always_inline)) +void group_barrier() { threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture); } -inline void barrier_shared_exec() +static inline __attribute__((always_inline)) +void barrier_shared_exec() { threadgroup_barrier(mem_flags::mem_threadgroup); } -inline void full_barrier_exec() +static inline __attribute__((always_inline)) +void full_barrier_exec() { threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture); } -inline void image_barrier_exec() +static inline __attribute__((always_inline)) +void image_barrier_exec() { threadgroup_barrier(mem_flags::mem_texture); } -inline void buffer_barrier_exec() +static inline __attribute__((always_inline)) +void buffer_barrier_exec() { threadgroup_barrier(mem_flags::mem_device); } -inline void group_barrier_exec() +static inline __attribute__((always_inline)) +void group_barrier_exec() { threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture); } -inline void exec_barrier() +static inline __attribute__((always_inline)) +void exec_barrier() { threadgroup_barrier(mem_flags::mem_threadgroup); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/cfg-preserve-parameter.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/cfg-preserve-parameter.comp index 91fe5384d..ce1bef3f8 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/cfg-preserve-parameter.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/cfg-preserve-parameter.comp @@ -5,7 +5,8 @@ using namespace metal; -inline void out_test_0(thread const int& cond, thread int& i) +static inline __attribute__((always_inline)) +void out_test_0(thread const int& cond, thread int& i) { if (cond == 0) { @@ -17,7 +18,8 @@ inline void out_test_0(thread const int& cond, thread int& i) } } -inline void out_test_1(thread const int& cond, thread int& i) +static inline __attribute__((always_inline)) +void out_test_1(thread const int& cond, thread int& i) { switch (cond) { @@ -34,7 +36,8 @@ inline void out_test_1(thread const int& cond, thread int& i) } } -inline void inout_test_0(thread const int& cond, thread int& i) +static inline __attribute__((always_inline)) +void inout_test_0(thread const int& cond, thread int& i) { if (cond == 0) { @@ -42,7 +45,8 @@ inline void inout_test_0(thread const int& cond, thread int& i) } } -inline void inout_test_1(thread const int& cond, thread int& i) +static inline __attribute__((always_inline)) +void inout_test_1(thread const int& cond, thread int& i) { switch (cond) { diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-composite-constant-array.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-composite-constant-array.comp new file mode 100644 index 000000000..2f5549f5f --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-composite-constant-array.comp @@ -0,0 +1,65 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct SSBO +{ + float4x4 a; + uint index; +}; + +constant spvUnsafeArray _32 = spvUnsafeArray({ float4x4(float4(1.0, 0.0, 0.0, 0.0), float4(0.0, 1.0, 0.0, 0.0), float4(0.0, 0.0, 1.0, 0.0), float4(0.0, 0.0, 0.0, 1.0)), float4x4(float4(2.0, 0.0, 0.0, 0.0), float4(0.0, 2.0, 0.0, 0.0), float4(0.0, 0.0, 2.0, 0.0), float4(0.0, 0.0, 0.0, 2.0)) }); + +static inline __attribute__((always_inline)) +void write_global(device SSBO& v_14) +{ + v_14.a = _32[v_14.index]; +} + +kernel void main0(device SSBO& v_14 [[buffer(0)]]) +{ + write_global(v_14); +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-type-alias.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-type-alias.comp index ad429cbf7..fc0d57500 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-type-alias.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/complex-type-alias.comp @@ -44,7 +44,8 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(8u, 8u, 1u); -inline void Zero(thread Foo0& v) +static inline __attribute__((always_inline)) +void Zero(thread Foo0& v) { v.a = 0.0; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-array-initialization.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-array-initialization.comp index d4051beda..c6c17b1f3 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-array-initialization.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-array-initialization.comp @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Data { float a; @@ -27,73 +66,20 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(2u, 1u, 1u); -constant Data _25[2] = { Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } }; +constant spvUnsafeArray _25 = spvUnsafeArray({ Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } }); -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -inline Data combine(thread const Data& a, thread const Data& b) +static inline __attribute__((always_inline)) +Data combine(thread const Data& a, thread const Data& b) { return Data{ a.a + b.a, a.b + b.b }; } kernel void main0(device SSBO& _53 [[buffer(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - Data data[2] = { Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } }; - Data _31[2] = { Data{ X, 2.0 }, Data{ 3.0, 5.0 } }; - Data data2[2]; - spvArrayCopyFromStackToStack1(data2, _31); + spvUnsafeArray data = spvUnsafeArray({ Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } }); + spvUnsafeArray _31 = spvUnsafeArray({ Data{ X, 2.0 }, Data{ 3.0, 5.0 } }); + spvUnsafeArray data2; + data2 = _31; Data param = data[gl_LocalInvocationID.x]; Data param_1 = data2[gl_LocalInvocationID.x]; Data _73 = combine(param, param_1); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-construct.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-construct.comp index 8d6bf982b..aada82fc9 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-construct.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/composite-construct.comp @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct SSBO0 { float4 as[1]; @@ -23,67 +62,13 @@ struct Composite constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -constant float4 _43[2] = { float4(20.0), float4(40.0) }; - -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} +constant spvUnsafeArray _43 = spvUnsafeArray({ float4(20.0), float4(40.0) }); kernel void main0(device SSBO0& _16 [[buffer(0)]], device SSBO1& _32 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) { - float4 _37[2] = { _16.as[gl_GlobalInvocationID.x], _32.bs[gl_GlobalInvocationID.x] }; - float4 values[2]; - spvArrayCopyFromStackToStack1(values, _37); + spvUnsafeArray _37 = spvUnsafeArray({ _16.as[gl_GlobalInvocationID.x], _32.bs[gl_GlobalInvocationID.x] }); + spvUnsafeArray values; + values = _37; Composite c = Composite{ values[0], _43[1] }; _16.as[0] = values[gl_LocalInvocationIndex]; _32.bs[1] = c.b; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/copy-array-of-arrays.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/copy-array-of-arrays.comp index 5f8b03303..21fb9b367 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/copy-array-of-arrays.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/copy-array-of-arrays.comp @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct BUF { int a; @@ -14,189 +53,27 @@ struct BUF constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -constant float _16[2] = { 1.0, 2.0 }; -constant float _19[2] = { 3.0, 4.0 }; -constant float _20[2][2] = { { 1.0, 2.0 }, { 3.0, 4.0 } }; -constant float _21[2][2][2] = { { { 1.0, 2.0 }, { 3.0, 4.0 } }, { { 1.0, 2.0 }, { 3.0, 4.0 } } }; - -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToStack2(thread T (&dst)[A][B], constant T (&src)[A][B]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromConstantToStack1(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup2(threadgroup T (&dst)[A][B], constant T (&src)[A][B]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromConstantToThreadGroup1(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromStackToStack2(thread T (&dst)[A][B], thread const T (&src)[A][B]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromStackToStack1(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup2(threadgroup T (&dst)[A][B], thread const T (&src)[A][B]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromStackToThreadGroup1(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack2(thread T (&dst)[A][B], threadgroup const T (&src)[A][B]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromThreadGroupToStack1(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup2(threadgroup T (&dst)[A][B], threadgroup const T (&src)[A][B]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromThreadGroupToThreadGroup1(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromConstantToStack3(thread T (&dst)[A][B][C], constant T (&src)[A][B][C]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromConstantToStack2(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup3(threadgroup T (&dst)[A][B][C], constant T (&src)[A][B][C]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromConstantToThreadGroup2(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromStackToStack3(thread T (&dst)[A][B][C], thread const T (&src)[A][B][C]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromStackToStack2(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup3(threadgroup T (&dst)[A][B][C], thread const T (&src)[A][B][C]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromStackToThreadGroup2(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack3(thread T (&dst)[A][B][C], threadgroup const T (&src)[A][B][C]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromThreadGroupToStack2(dst[i], src[i]); - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup3(threadgroup T (&dst)[A][B][C], threadgroup const T (&src)[A][B][C]) -{ - for (uint i = 0; i < A; i++) - { - spvArrayCopyFromThreadGroupToThreadGroup2(dst[i], src[i]); - } -} +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 2.0 }); +constant spvUnsafeArray _19 = spvUnsafeArray({ 3.0, 4.0 }); +constant spvUnsafeArray, 2> _20 = spvUnsafeArray, 2>({ spvUnsafeArray({ 1.0, 2.0 }), spvUnsafeArray({ 3.0, 4.0 }) }); +constant spvUnsafeArray, 2>, 2> _21 = spvUnsafeArray, 2>, 2>({ spvUnsafeArray, 2>({ spvUnsafeArray({ 1.0, 2.0 }), spvUnsafeArray({ 3.0, 4.0 }) }), spvUnsafeArray, 2>({ spvUnsafeArray({ 1.0, 2.0 }), spvUnsafeArray({ 3.0, 4.0 }) }) }); kernel void main0(device BUF& o [[buffer(0)]]) { - float c[2][2][2]; - spvArrayCopyFromConstantToStack3(c, _21); + spvUnsafeArray, 2>, 2> c; + c = _21; o.a = int(c[1][1][1]); - float _43[2] = { o.b, o.c }; - float _48[2] = { o.b, o.b }; - float _49[2][2] = { { _43[0], _43[1] }, { _48[0], _48[1] } }; - float _54[2] = { o.c, o.c }; - float _59[2] = { o.c, o.b }; - float _60[2][2] = { { _54[0], _54[1] }, { _59[0], _59[1] } }; - float _61[2][2][2] = { { { _49[0][0], _49[0][1] }, { _49[1][0], _49[1][1] } }, { { _60[0][0], _60[0][1] }, { _60[1][0], _60[1][1] } } }; - float d[2][2][2]; - spvArrayCopyFromStackToStack3(d, _61); - float e[2][2][2]; - spvArrayCopyFromStackToStack3(e, d); + spvUnsafeArray _43 = spvUnsafeArray({ o.b, o.c }); + spvUnsafeArray _48 = spvUnsafeArray({ o.b, o.b }); + spvUnsafeArray, 2> _49 = spvUnsafeArray, 2>({ _43, _48 }); + spvUnsafeArray _54 = spvUnsafeArray({ o.c, o.c }); + spvUnsafeArray _59 = spvUnsafeArray({ o.c, o.b }); + spvUnsafeArray, 2> _60 = spvUnsafeArray, 2>({ _54, _59 }); + spvUnsafeArray, 2>, 2> _61 = spvUnsafeArray, 2>, 2>({ _49, _60 }); + spvUnsafeArray, 2>, 2> d; + d = _61; + spvUnsafeArray, 2>, 2> e; + e = d; o.b = e[1][0][1]; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/functions.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/functions.comp index 947077879..b10726087 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/functions.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/functions.comp @@ -5,7 +5,8 @@ using namespace metal; -inline void myfunc(threadgroup int (&foo)[1337]) +static inline __attribute__((always_inline)) +void myfunc(threadgroup int (&foo)[1337]) { foo[0] = 13; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/global-invocation-id-writable-ssbo-in-function.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/global-invocation-id-writable-ssbo-in-function.comp index f398ef671..dbc588635 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/global-invocation-id-writable-ssbo-in-function.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/global-invocation-id-writable-ssbo-in-function.comp @@ -18,7 +18,8 @@ inline Tx mod(Tx x, Ty y) return x - y * floor(x / y); } -inline float getB(device myBlock& myStorage, thread uint3& gl_GlobalInvocationID) +static inline __attribute__((always_inline)) +float getB(device myBlock& myStorage, thread uint3& gl_GlobalInvocationID) { return myStorage.b[gl_GlobalInvocationID.x]; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/int64.invalid.msl22.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/int64.invalid.msl22.comp index dd0143438..d5bbbb47f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/int64.invalid.msl22.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/int64.invalid.msl22.comp @@ -1,14 +1,55 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct M0 { long v; - long2 b[2]; + spvUnsafeArray b; ulong c; - ulong d[5]; + spvUnsafeArray d; }; struct SSBO0_Type @@ -25,14 +66,14 @@ struct SSBO1_Type struct SSBO2_Type { - long a[4]; - long2 b[4]; + spvUnsafeArray a; + spvUnsafeArray b; }; struct SSBO3_Type { - long a[4]; - long2 b[4]; + spvUnsafeArray a; + spvUnsafeArray b; }; struct SSBO diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/inverse.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/inverse.comp index a4ef60c42..33aed468f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/inverse.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/inverse.comp @@ -22,20 +22,23 @@ struct MatrixIn constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); // Returns the determinant of a 2x2 matrix. -inline float spvDet2x2(float a1, float a2, float b1, float b2) +static inline __attribute__((always_inline)) +float spvDet2x2(float a1, float a2, float b1, float b2) { return a1 * b2 - b1 * a2; } // Returns the determinant of a 3x3 matrix. -inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) +static inline __attribute__((always_inline)) +float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) { return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3); } // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float4x4 spvInverse4x4(float4x4 m) +static inline __attribute__((always_inline)) +float4x4 spvInverse4x4(float4x4 m) { float4x4 adj; // The adjoint matrix (inverse after dividing by determinant) @@ -70,7 +73,8 @@ inline float4x4 spvInverse4x4(float4x4 m) // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float3x3 spvInverse3x3(float3x3 m) +static inline __attribute__((always_inline)) +float3x3 spvInverse3x3(float3x3 m) { float3x3 adj; // The adjoint matrix (inverse after dividing by determinant) @@ -97,7 +101,8 @@ inline float3x3 spvInverse3x3(float3x3 m) // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float2x2 spvInverse2x2(float2x2 m) +static inline __attribute__((always_inline)) +float2x2 spvInverse2x2(float2x2 m) { float2x2 adj; // The adjoint matrix (inverse after dividing by determinant) diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/shared-array-of-arrays.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/shared-array-of-arrays.comp index 510297802..8b5323689 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/shared-array-of-arrays.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/shared-array-of-arrays.comp @@ -12,7 +12,8 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(4u, 4u, 1u); -inline void work(threadgroup float (&foo)[4][4], thread uint3& gl_LocalInvocationID, thread uint& gl_LocalInvocationIndex, device SSBO& v_67, thread uint3& gl_GlobalInvocationID) +static inline __attribute__((always_inline)) +void work(threadgroup float (&foo)[4][4], thread uint3& gl_LocalInvocationID, thread uint& gl_LocalInvocationIndex, device SSBO& v_67, thread uint3& gl_GlobalInvocationID) { foo[gl_LocalInvocationID.x][gl_LocalInvocationID.y] = float(gl_LocalInvocationIndex); threadgroup_barrier(mem_flags::mem_threadgroup); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/spec-constant-work-group-size.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/spec-constant-work-group-size.comp index bb796ab95..de30edec1 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/spec-constant-work-group-size.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/spec-constant-work-group-size.comp @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + #ifndef SPIRV_CROSS_CONSTANT_ID_1 #define SPIRV_CROSS_CONSTANT_ID_1 2 #endif @@ -27,7 +68,7 @@ constant int _32 = (1 - a); kernel void main0(device SSBO& _17 [[buffer(0)]]) { - int spec_const_array_size[b]; + spvUnsafeArray spec_const_array_size; spec_const_array_size[a] = a; _17.v[_30] = b + spec_const_array_size[_32]; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/storage-buffer-std140-vector-array.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/storage-buffer-std140-vector-array.comp index 0cafa5f38..b8e086b64 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/storage-buffer-std140-vector-array.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/storage-buffer-std140-vector-array.comp @@ -1,14 +1,55 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Sub { - float f[2]; - float2 f2[2]; - float3 f3[2]; - float4 f4[2]; + spvUnsafeArray f; + spvUnsafeArray f2; + spvUnsafeArray f3; + spvUnsafeArray f4; }; struct Sub_1 diff --git a/3rdparty/spirv-cross/reference/shaders-msl/comp/type-alias.comp b/3rdparty/spirv-cross/reference/shaders-msl/comp/type-alias.comp index e419efb2c..e3ac03166 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/comp/type-alias.comp +++ b/3rdparty/spirv-cross/reference/shaders-msl/comp/type-alias.comp @@ -42,12 +42,14 @@ struct SSBO2 constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -inline float4 overload(thread const S0& s0) +static inline __attribute__((always_inline)) +float4 overload(thread const S0& s0) { return s0.a; } -inline float4 overload(thread const S1& s1) +static inline __attribute__((always_inline)) +float4 overload(thread const S1& s1) { return s1.a; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc b/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc index a5e30b6de..01fceeb6c 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc +++ b/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/arrayed-output.desktop.sso.tesc @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float3 vVertex; @@ -10,7 +51,7 @@ struct main0_out struct main0_patchOut { - float3 vPatch[2]; + spvUnsafeArray vPatch; }; struct main0_in @@ -28,7 +69,7 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ if (gl_InvocationID >= 4) return; gl_out[gl_InvocationID].vVertex = gl_in[gl_InvocationID].vInput + gl_in[gl_InvocationID ^ 1].vInput; - threadgroup_barrier(mem_flags::mem_device); + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); if (gl_InvocationID == 0) { patchOut.vPatch[0] = float3(10.0); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/basic.desktop.sso.tesc b/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/basic.desktop.sso.tesc index 3da718142..054b4e741 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/basic.desktop.sso.tesc +++ b/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/basic.desktop.sso.tesc @@ -20,7 +20,8 @@ struct main0_in float4 gl_Position [[attribute(0)]]; }; -inline void set_position(device main0_out* thread & gl_out, thread uint& gl_InvocationID, threadgroup main0_in* thread & gl_in) +static inline __attribute__((always_inline)) +void set_position(device main0_out* thread & gl_out, thread uint& gl_InvocationID, threadgroup main0_in* thread & gl_in) { gl_out[gl_InvocationID].gl_Position = gl_in[0].gl_Position + gl_in[1].gl_Position; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc b/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc index cd4d8d80e..e7e184a98 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc +++ b/3rdparty/spirv-cross/reference/shaders-msl/desktop-only/tesc/struct-copy.desktop.sso.tesc @@ -28,10 +28,8 @@ kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_ threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 4) return; - Boo vInput_24; - vInput_24.a = gl_in[gl_InvocationID].Boo_a; - vInput_24.b = gl_in[gl_InvocationID].Boo_b; - gl_out[gl_InvocationID].vVertex = vInput_24; + Boo _25 = Boo{ gl_in[gl_InvocationID].Boo_a, gl_in[gl_InvocationID].Boo_b }; + gl_out[gl_InvocationID].vVertex = _25; spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(1.0); spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(2.0); spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2] = half(3.0); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/argument-buffers.msl2.argument.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/argument-buffers.msl2.argument.frag index 7092dfdbd..b7005ff98 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/argument-buffers.msl2.argument.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/argument-buffers.msl2.argument.frag @@ -62,7 +62,8 @@ struct main0_in float2 vUV [[user(locn0)]]; }; -inline float4 sample_in_function2(thread texture2d uTexture, thread const sampler uTextureSmplr, thread float2& vUV, thread const array, 4> uTexture2, thread const array uSampler, thread const array, 2> uTextures, thread const array uTexturesSmplr, device SSBO& v_60, const device SSBOs* constant (&ssbos)[2], constant Push& registers) +static inline __attribute__((always_inline)) +float4 sample_in_function2(thread texture2d uTexture, thread const sampler uTextureSmplr, thread float2& vUV, thread const array, 4> uTexture2, thread const array uSampler, thread const array, 2> uTextures, thread const array uTexturesSmplr, device SSBO& v_60, const device SSBOs* constant (&ssbos)[2], constant Push& registers) { float4 ret = uTexture.sample(uTextureSmplr, vUV); ret += uTexture2[2].sample(uSampler[1], vUV); @@ -73,7 +74,8 @@ inline float4 sample_in_function2(thread texture2d uTexture, thread const return ret; } -inline float4 sample_in_function(thread texture2d uTexture, thread const sampler uTextureSmplr, thread float2& vUV, thread const array, 4> uTexture2, thread const array uSampler, thread const array, 2> uTextures, thread const array uTexturesSmplr, device SSBO& v_60, const device SSBOs* constant (&ssbos)[2], constant Push& registers, constant UBO& v_90, constant UBOs* constant (&ubos)[4]) +static inline __attribute__((always_inline)) +float4 sample_in_function(thread texture2d uTexture, thread const sampler uTextureSmplr, thread float2& vUV, thread const array, 4> uTexture2, thread const array uSampler, thread const array, 2> uTextures, thread const array uTexturesSmplr, device SSBO& v_60, const device SSBOs* constant (&ssbos)[2], constant Push& registers, constant UBO& v_90, constant UBOs* constant (&ubos)[4]) { float4 ret = sample_in_function2(uTexture, uTextureSmplr, vUV, uTexture2, uSampler, uTextures, uTexturesSmplr, v_60, ssbos, registers); ret += v_90.ubo; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-lut-no-loop-variable.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-lut-no-loop-variable.frag index 87158849b..cdedd73a7 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-lut-no-loop-variable.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-lut-no-loop-variable.frag @@ -1,9 +1,50 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; -constant float _17[5] = { 1.0, 2.0, 3.0, 4.0, 5.0 }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _17 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 5.0 }); struct main0_out { diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-array-lut.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-array-lut.frag new file mode 100644 index 000000000..ba553824e --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-array-lut.frag @@ -0,0 +1,68 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _17 = spvUnsafeArray({ 1.0, 2.0, 3.0 }); +constant spvUnsafeArray _21 = spvUnsafeArray({ 4.0, 5.0, 6.0 }); +constant spvUnsafeArray, 2> _22 = spvUnsafeArray, 2>({ spvUnsafeArray({ 1.0, 2.0, 3.0 }), spvUnsafeArray({ 4.0, 5.0, 6.0 }) }); + +struct main0_out +{ + float vOutput [[color(0)]]; +}; + +struct main0_in +{ + int vIndex1 [[user(locn0)]]; + int vIndex2 [[user(locn1)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]]) +{ + main0_out out = {}; + out.vOutput = _22[in.vIndex1][in.vIndex2]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.argument.discrete.swizzle.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.argument.discrete.swizzle.frag index e06824407..833ddec01 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.argument.discrete.swizzle.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.argument.discrete.swizzle.frag @@ -82,17 +82,20 @@ inline T spvTextureSwizzle(T x, uint s) return spvTextureSwizzle(vec(x, 0, 0, 1), s).x; } -inline float4 sample_in_func_1(thread const array, 4> uSampler0, thread const array uSampler0Smplr, constant uint* uSampler0Swzl, thread float2& vUV) +static inline __attribute__((always_inline)) +float4 sample_in_func_1(thread const array, 4> uSampler0, thread const array uSampler0Smplr, constant uint* uSampler0Swzl, thread float2& vUV) { return spvTextureSwizzle(uSampler0[2].sample(uSampler0Smplr[2], vUV), uSampler0Swzl[2]); } -inline float4 sample_in_func_2(thread float2& vUV, thread texture2d uSampler1, thread const sampler uSampler1Smplr, constant uint& uSampler1Swzl) +static inline __attribute__((always_inline)) +float4 sample_in_func_2(thread float2& vUV, thread texture2d uSampler1, thread const sampler uSampler1Smplr, constant uint& uSampler1Swzl) { return spvTextureSwizzle(uSampler1.sample(uSampler1Smplr, vUV), uSampler1Swzl); } -inline float4 sample_single_in_func(thread const texture2d s, thread const sampler sSmplr, constant uint& sSwzl, thread float2& vUV) +static inline __attribute__((always_inline)) +float4 sample_single_in_func(thread const texture2d s, thread const sampler sSmplr, constant uint& sSwzl, thread float2& vUV) { return spvTextureSwizzle(s.sample(sSmplr, vUV), sSwzl); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.swizzle.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.swizzle.frag index 19d030063..64b361ec9 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.swizzle.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/array-of-texture-swizzle.msl2.swizzle.frag @@ -75,12 +75,14 @@ inline T spvTextureSwizzle(T x, uint s) return spvTextureSwizzle(vec(x, 0, 0, 1), s).x; } -inline float4 sample_in_func(thread const array, 4> uSampler, thread const array uSamplerSmplr, constant uint* uSamplerSwzl, thread float2& vUV) +static inline __attribute__((always_inline)) +float4 sample_in_func(thread const array, 4> uSampler, thread const array uSamplerSmplr, constant uint* uSamplerSwzl, thread float2& vUV) { return spvTextureSwizzle(uSampler[2].sample(uSamplerSmplr[2], vUV), uSamplerSwzl[2]); } -inline float4 sample_single_in_func(thread const texture2d s, thread const sampler sSmplr, constant uint& sSwzl, thread float2& vUV) +static inline __attribute__((always_inline)) +float4 sample_single_in_func(thread const texture2d s, thread const sampler sSmplr, constant uint& sSwzl, thread float2& vUV) { return spvTextureSwizzle(s.sample(sSmplr, vUV), sSwzl); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/buffer-read-write.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/buffer-read-write.frag index 36b1a1809..166d4311b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/buffer-read-write.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/buffer-read-write.frag @@ -11,7 +11,8 @@ struct main0_out }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-array.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-array.frag index 0950d23d9..990860762 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-array.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-array.frag @@ -1,21 +1,60 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Foobar { float a; float b; }; -constant float4 _37[3] = { float4(1.0), float4(2.0), float4(3.0) }; -constant float4 _49[2] = { float4(1.0), float4(2.0) }; -constant float4 _54[2] = { float4(8.0), float4(10.0) }; -constant float4 _55[2][2] = { { float4(1.0), float4(2.0) }, { float4(8.0), float4(10.0) } }; -constant Foobar _75[2] = { Foobar{ 10.0, 40.0 }, Foobar{ 90.0, 70.0 } }; +constant spvUnsafeArray _37 = spvUnsafeArray({ float4(1.0), float4(2.0), float4(3.0) }); +constant spvUnsafeArray _49 = spvUnsafeArray({ float4(1.0), float4(2.0) }); +constant spvUnsafeArray _54 = spvUnsafeArray({ float4(8.0), float4(10.0) }); +constant spvUnsafeArray, 2> _55 = spvUnsafeArray, 2>({ spvUnsafeArray({ float4(1.0), float4(2.0) }), spvUnsafeArray({ float4(8.0), float4(10.0) }) }); +constant spvUnsafeArray _75 = spvUnsafeArray({ Foobar{ 10.0, 40.0 }, Foobar{ 90.0, 70.0 } }); struct main0_out { @@ -27,7 +66,8 @@ struct main0_in int index [[user(locn0)]]; }; -inline float4 resolve(thread const Foobar& f) +static inline __attribute__((always_inline)) +float4 resolve(thread const Foobar& f) { return float4(f.a + f.b); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-composites.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-composites.frag index ccaac97bc..e0fa980fb 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-composites.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/constant-composites.frag @@ -1,18 +1,56 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Foo { float a; float b; }; -constant float _16[4] = { 1.0, 4.0, 3.0, 2.0 }; -constant Foo _28[2] = { Foo{ 10.0, 20.0 }, Foo{ 30.0, 40.0 } }; +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 4.0, 3.0, 2.0 }); struct main0_out { @@ -24,62 +62,10 @@ struct main0_in int line [[user(locn0)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - fragment main0_out main0(main0_in in [[stage_in]]) { + spvUnsafeArray _28 = spvUnsafeArray({ Foo{ 10.0, 20.0 }, Foo{ 30.0, 40.0 } }); + main0_out out = {}; out.FragColor = float4(_16[in.line]); out.FragColor += float4(_28[in.line].a * _28[1 - in.line].a); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/flush_params.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/flush_params.frag index ef3b688b4..905a179bc 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/flush_params.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/flush_params.frag @@ -15,12 +15,14 @@ struct main0_out float4 FragColor [[color(0)]]; }; -inline void foo2(thread Structy& f) +static inline __attribute__((always_inline)) +void foo2(thread Structy& f) { f.c = float4(10.0); } -inline Structy foo() +static inline __attribute__((always_inline)) +Structy foo() { Structy param; foo2(param); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/fp16.desktop.invalid.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/fp16.desktop.invalid.frag index 4791a0bb8..2814a12f1 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/fp16.desktop.invalid.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/fp16.desktop.invalid.frag @@ -40,17 +40,20 @@ inline T degrees(T r) return r * T(57.2957795131); } -inline half2x2 test_mat2(thread const half2& a, thread const half2& b, thread const half2& c, thread const half2& d) +static inline __attribute__((always_inline)) +half2x2 test_mat2(thread const half2& a, thread const half2& b, thread const half2& c, thread const half2& d) { return half2x2(half2(a), half2(b)) * half2x2(half2(c), half2(d)); } -inline half3x3 test_mat3(thread const half3& a, thread const half3& b, thread const half3& c, thread const half3& d, thread const half3& e, thread const half3& f) +static inline __attribute__((always_inline)) +half3x3 test_mat3(thread const half3& a, thread const half3& b, thread const half3& c, thread const half3& d, thread const half3& e, thread const half3& f) { return half3x3(half3(a), half3(b), half3(c)) * half3x3(half3(d), half3(e), half3(f)); } -inline void test_constants() +static inline __attribute__((always_inline)) +void test_constants() { half a = half(1.0); half b = half(1.5); @@ -62,12 +65,14 @@ inline void test_constants() half h = half(9.5367431640625e-07); } -inline half test_result() +static inline __attribute__((always_inline)) +half test_result() { return half(1.0); } -inline void test_conversions() +static inline __attribute__((always_inline)) +void test_conversions() { half one = test_result(); int a = int(one); @@ -80,7 +85,8 @@ inline void test_conversions() half d2 = half(d); } -inline void test_builtins(thread half4& v4, thread half3& v3, thread half& v1) +static inline __attribute__((always_inline)) +void test_builtins(thread half4& v4, thread half3& v3, thread half& v1) { half4 res = radians(v4); res = degrees(v4); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/fragment-component-padding.pad-fragment.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/fragment-component-padding.pad-fragment.frag index 58bafc9e5..7c2925264 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/fragment-component-padding.pad-fragment.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/fragment-component-padding.pad-fragment.frag @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 FragColors_0 [[color(0)]]; @@ -18,7 +57,8 @@ struct main0_in float3 vColor [[user(locn0)]]; }; -inline void set_globals(thread float (&FragColors)[2], thread float3& vColor, thread float2& FragColor2, thread float3& FragColor3) +static inline __attribute__((always_inline)) +void set_globals(thread spvUnsafeArray (&FragColors), thread float3& vColor, thread float2& FragColor2, thread float3& FragColor3) { FragColors[0] = vColor.x; FragColors[1] = vColor.y; @@ -29,7 +69,7 @@ inline void set_globals(thread float (&FragColors)[2], thread float3& vColor, th fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float FragColors[2] = {}; + spvUnsafeArray FragColors = {}; float2 FragColor2 = {}; float3 FragColor3 = {}; set_globals(FragColors, in.vColor, FragColor2, FragColor3); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/helper-invocation.msl21.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/helper-invocation.msl21.frag index bc2b17c7f..97d69e19d 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/helper-invocation.msl21.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/helper-invocation.msl21.frag @@ -15,7 +15,8 @@ struct main0_in float2 vUV [[user(locn0)]]; }; -inline float4 foo(thread bool& gl_HelperInvocation, thread texture2d uSampler, thread const sampler uSamplerSmplr, thread float2& vUV) +static inline __attribute__((always_inline)) +float4 foo(thread bool& gl_HelperInvocation, thread texture2d uSampler, thread const sampler uSamplerSmplr, thread float2& vUV) { float4 color; if (!gl_HelperInvocation) diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/huge-argument-buffer.device-argument-buffer.argument.msl2.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/huge-argument-buffer.device-argument-buffer.argument.msl2.frag index e5259c8f5..0e35c2485 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/huge-argument-buffer.device-argument-buffer.argument.msl2.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/huge-argument-buffer.device-argument-buffer.argument.msl2.frag @@ -37,12 +37,14 @@ struct main0_in float2 vUV [[user(locn0)]]; }; -inline float4 samp_array(thread const array, 10000> uSamplers, thread const array uSamplersSmplr, thread float2& vUV, constant UBO* const device (&vs)[10000]) +static inline __attribute__((always_inline)) +float4 samp_array(thread const array, 10000> uSamplers, thread const array uSamplersSmplr, thread float2& vUV, constant UBO* const device (&vs)[10000]) { return uSamplers[9999].sample(uSamplersSmplr[9999], vUV) + vs[5000]->v; } -inline float4 samp_single(thread float2& vUV, thread texture2d uSampler, thread const sampler uSamplerSmplr) +static inline __attribute__((always_inline)) +float4 samp_single(thread float2& vUV, thread texture2d uSampler, thread const sampler uSamplerSmplr) { return uSampler.sample(uSamplerSmplr, vUV); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/image-query-lod.msl22.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/image-query-lod.msl22.frag index 430744274..6e7991f28 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/image-query-lod.msl22.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/image-query-lod.msl22.frag @@ -15,7 +15,8 @@ struct main0_in float3 vUV [[user(locn0)]]; }; -inline void from_function(thread float2& FragColor, thread texture2d uSampler2D, thread const sampler uSampler2DSmplr, thread float3& vUV, thread texture3d uSampler3D, thread const sampler uSampler3DSmplr, thread texturecube uSamplerCube, thread const sampler uSamplerCubeSmplr, thread texture2d uTexture2D, thread sampler uSampler, thread texture3d uTexture3D, thread texturecube uTextureCube) +static inline __attribute__((always_inline)) +void from_function(thread float2& FragColor, thread texture2d uSampler2D, thread const sampler uSampler2DSmplr, thread float3& vUV, thread texture3d uSampler3D, thread const sampler uSampler3DSmplr, thread texturecube uSamplerCube, thread const sampler uSamplerCubeSmplr, thread texture2d uTexture2D, thread sampler uSampler, thread texture3d uTexture3D, thread texturecube uTextureCube) { float2 _22; _22.x = uSampler2D.calculate_clamped_lod(uSampler2DSmplr, vUV.xy); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment-ms.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment-ms.frag index 80dd6d665..6f5c2b94c 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment-ms.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment-ms.frag @@ -10,7 +10,8 @@ struct main0_out float4 FragColor [[color(0)]]; }; -inline float4 load_subpasses(thread const texture2d_ms uInput, thread uint& gl_SampleID, thread float4& gl_FragCoord) +static inline __attribute__((always_inline)) +float4 load_subpasses(thread const texture2d_ms uInput, thread uint& gl_SampleID, thread float4& gl_FragCoord) { return uInput.read(uint2(gl_FragCoord.xy), gl_SampleID); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment.frag index 722472269..d43b0adc4 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/input-attachment.frag @@ -10,7 +10,8 @@ struct main0_out float4 FragColor [[color(0)]]; }; -inline float4 load_subpasses(thread const texture2d uInput, thread float4& gl_FragCoord) +static inline __attribute__((always_inline)) +float4 load_subpasses(thread const texture2d uInput, thread float4& gl_FragCoord) { return uInput.read(uint2(gl_FragCoord.xy), 0); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/lut-promotion.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/lut-promotion.frag index 1af7f872b..b1e0e7311 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/lut-promotion.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/lut-promotion.frag @@ -1,13 +1,52 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; -constant float _16[16] = { 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }; -constant float4 _60[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; -constant float4 _104[4] = { float4(20.0), float4(30.0), float4(50.0), float4(60.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _60 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); +constant spvUnsafeArray _104 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); struct main0_out { @@ -19,60 +58,6 @@ struct main0_in int index [[user(locn0)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; @@ -93,14 +78,14 @@ fragment main0_out main0(main0_in in [[stage_in]]) { out.FragColor += _60[in.index & 1].x; } - float4 foobar[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; + spvUnsafeArray foobar = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); if (in.index > 30) { foobar[1].z = 20.0; } out.FragColor += foobar[in.index & 3].z; - float4 baz[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) }; - spvArrayCopyFromConstantToStack1(baz, _104); + spvUnsafeArray baz = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); + baz = _104; out.FragColor += baz[in.index & 3].z; return out; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/mrt-array.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/mrt-array.frag index 1cd06a292..2746ad639 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/mrt-array.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/mrt-array.frag @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 FragColor_0 [[color(0)]]; @@ -26,12 +65,14 @@ inline Tx mod(Tx x, Ty y) return x - y * floor(x / y); } -inline void write_deeper_in_function(thread float4 (&FragColor)[4], thread float4& vA, thread float4& vB) +static inline __attribute__((always_inline)) +void write_deeper_in_function(thread spvUnsafeArray (&FragColor), thread float4& vA, thread float4& vB) { FragColor[3] = vA * vB; } -inline void write_in_function(thread float4 (&FragColor)[4], thread float4& vA, thread float4& vB) +static inline __attribute__((always_inline)) +void write_in_function(thread spvUnsafeArray (&FragColor), thread float4& vA, thread float4& vB) { FragColor[2] = vA - vB; write_deeper_in_function(FragColor, vA, vB); @@ -40,7 +81,7 @@ inline void write_in_function(thread float4 (&FragColor)[4], thread float4& vA, fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float4 FragColor[4] = {}; + spvUnsafeArray FragColor = {}; FragColor[0] = mod(in.vA, in.vB); FragColor[1] = in.vA + in.vB; write_in_function(FragColor, in.vA, in.vB); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/packing-test-3.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/packing-test-3.frag index 172186188..cfb0ceae2 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/packing-test-3.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/packing-test-3.frag @@ -32,7 +32,8 @@ struct main0_out float4 _entryPointOutput [[color(0)]]; }; -inline float4 _main(thread const VertexOutput& IN, constant CB0& v_26) +static inline __attribute__((always_inline)) +float4 _main(thread const VertexOutput& IN, constant CB0& v_26) { TestStruct st; st.position = float3(v_26.CB0[1].position); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/private-variable-prototype-declaration.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/private-variable-prototype-declaration.frag index c5462ee31..7c11a937a 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/private-variable-prototype-declaration.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/private-variable-prototype-declaration.frag @@ -15,12 +15,14 @@ struct main0_out float3 FragColor [[color(0)]]; }; -inline void someFunction(thread AStruct& s) +static inline __attribute__((always_inline)) +void someFunction(thread AStruct& s) { s.foobar = float4(1.0); } -inline void otherFunction(thread float3& global_variable) +static inline __attribute__((always_inline)) +void otherFunction(thread float3& global_variable) { global_variable = float3(1.0); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/readonly-ssbo.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/readonly-ssbo.frag index 439f14c17..7d73da79b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/readonly-ssbo.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/readonly-ssbo.frag @@ -15,7 +15,8 @@ struct main0_out float4 FragColor [[color(0)]]; }; -inline float4 read_from_function(const device SSBO& v_13) +static inline __attribute__((always_inline)) +float4 read_from_function(const device SSBO& v_13) { return v_13.v; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag new file mode 100644 index 000000000..a093d3f48 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag @@ -0,0 +1,43 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" + +#include +#include + +using namespace metal; + +struct main0_out +{ + float FragColor [[color(0)]]; +}; + +struct main0_in +{ + float3 vUV [[user(locn0)]]; +}; + +static inline __attribute__((always_inline)) +float sample_normal2(thread const depth2d tex, thread sampler uSampler, thread float3& vUV) +{ + return float4(tex.sample(uSampler, vUV.xy)).x; +} + +static inline __attribute__((always_inline)) +float sample_normal(thread const depth2d tex, thread sampler uSampler, thread float3& vUV) +{ + return sample_normal2(tex, uSampler, vUV); +} + +static inline __attribute__((always_inline)) +float sample_comp(thread const depth2d tex, thread float3& vUV, thread sampler uSamplerShadow) +{ + return tex.sample_compare(uSamplerShadow, vUV.xy, vUV.z); +} + +fragment main0_out main0(main0_in in [[stage_in]], depth2d uTexture [[texture(0)]], sampler uSampler [[sampler(0)]], sampler uSamplerShadow [[sampler(1)]]) +{ + main0_out out = {}; + out.FragColor = sample_normal(uTexture, uSampler, in.vUV); + out.FragColor += sample_comp(uTexture, in.vUV, uSamplerShadow); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-separate-image-sampler.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-separate-image-sampler.frag index ce87db5ab..d285941d7 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-separate-image-sampler.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-depth-separate-image-sampler.frag @@ -10,12 +10,14 @@ struct main0_out float FragColor [[color(0)]]; }; -inline float sample_depth_from_function(thread const depth2d uT, thread const sampler uS) +static inline __attribute__((always_inline)) +float sample_depth_from_function(thread const depth2d uT, thread const sampler uS) { return uT.sample_compare(uS, float3(0.5).xy, float3(0.5).z); } -inline float sample_color_from_function(thread const texture2d uT, thread const sampler uS) +static inline __attribute__((always_inline)) +float sample_color_from_function(thread const texture2d uT, thread const sampler uS) { return uT.sample(uS, float2(0.5)).x; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-position-func.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-position-func.frag index e95d5bfb0..025f874d2 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-position-func.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/sample-position-func.frag @@ -15,7 +15,8 @@ struct main0_in int index [[user(locn0)]]; }; -inline float4 getColor(thread const int& i, thread float2& gl_SamplePosition) +static inline __attribute__((always_inline)) +float4 getColor(thread const int& i, thread float2& gl_SamplePosition) { return float4(gl_SamplePosition, float(i), 1.0); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler-image-arrays.msl2.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler-image-arrays.msl2.frag index a500dfeb2..dec6d051a 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler-image-arrays.msl2.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler-image-arrays.msl2.frag @@ -16,17 +16,20 @@ struct main0_in int vIndex [[user(locn1)]]; }; -inline float4 sample_from_global(thread int& vIndex, thread float2& vTex, thread const array, 4> uSampler, thread const array uSamplerSmplr) +static inline __attribute__((always_inline)) +float4 sample_from_global(thread int& vIndex, thread float2& vTex, thread const array, 4> uSampler, thread const array uSamplerSmplr) { return uSampler[vIndex].sample(uSamplerSmplr[vIndex], (vTex + float2(0.100000001490116119384765625))); } -inline float4 sample_from_argument(thread const array, 4> samplers, thread const array samplersSmplr, thread int& vIndex, thread float2& vTex) +static inline __attribute__((always_inline)) +float4 sample_from_argument(thread const array, 4> samplers, thread const array samplersSmplr, thread int& vIndex, thread float2& vTex) { return samplers[vIndex].sample(samplersSmplr[vIndex], (vTex + float2(0.20000000298023223876953125))); } -inline float4 sample_single_from_argument(thread const texture2d samp, thread const sampler sampSmplr, thread float2& vTex) +static inline __attribute__((always_inline)) +float4 sample_single_from_argument(thread const texture2d samp, thread const sampler sampSmplr, thread float2& vTex) { return samp.sample(sampSmplr, (vTex + float2(0.300000011920928955078125))); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler.frag index 86917ea08..6484161b6 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/sampler.frag @@ -16,7 +16,8 @@ struct main0_in float2 vTex [[user(locn1)]]; }; -inline float4 sample_texture(thread const texture2d tex, thread const sampler texSmplr, thread const float2& uv) +static inline __attribute__((always_inline)) +float4 sample_texture(thread const texture2d tex, thread const sampler texSmplr, thread const float2& uv) { return tex.sample(texSmplr, uv); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/separate-image-sampler-argument.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/separate-image-sampler-argument.frag index 7f7e0bd17..d196243d4 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/separate-image-sampler-argument.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/separate-image-sampler-argument.frag @@ -10,7 +10,8 @@ struct main0_out float4 FragColor [[color(0)]]; }; -inline float4 samp(thread const texture2d t, thread const sampler s) +static inline __attribute__((always_inline)) +float4 samp(thread const texture2d t, thread const sampler s) { return t.sample(s, float2(0.5)); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/shader-arithmetic-8bit.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/shader-arithmetic-8bit.frag index 2ac4897b5..e9694aa19 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/shader-arithmetic-8bit.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/shader-arithmetic-8bit.frag @@ -34,7 +34,8 @@ struct main0_in int4 vColor [[user(locn0)]]; }; -inline void packing_int8(device SSBO& ssbo) +static inline __attribute__((always_inline)) +void packing_int8(device SSBO& ssbo) { short i16 = short(10); int i32 = 20; @@ -48,7 +49,8 @@ inline void packing_int8(device SSBO& ssbo) ssbo.i8[3] = i8_4.w; } -inline void packing_uint8(device SSBO& ssbo) +static inline __attribute__((always_inline)) +void packing_uint8(device SSBO& ssbo) { ushort u16 = ushort(10); uint u32 = 20u; @@ -62,7 +64,8 @@ inline void packing_uint8(device SSBO& ssbo) ssbo.u8[3] = u8_4.w; } -inline void compute_int8(device SSBO& ssbo, thread int4& vColor, constant Push& registers, constant UBO& ubo, thread int4& FragColorInt) +static inline __attribute__((always_inline)) +void compute_int8(device SSBO& ssbo, thread int4& vColor, constant Push& registers, constant UBO& ubo, thread int4& FragColorInt) { char4 tmp = char4(vColor); tmp += char4(registers.i8); @@ -74,7 +77,8 @@ inline void compute_int8(device SSBO& ssbo, thread int4& vColor, constant Push& FragColorInt = int4(tmp); } -inline void compute_uint8(device SSBO& ssbo, thread int4& vColor, constant Push& registers, constant UBO& ubo, thread uint4& FragColorUint) +static inline __attribute__((always_inline)) +void compute_uint8(device SSBO& ssbo, thread int4& vColor, constant Push& registers, constant UBO& ubo, thread uint4& FragColorUint) { uchar4 tmp = uchar4(char4(vColor)); tmp += uchar4(registers.u8); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/shadow-compare-global-alias.invalid.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/shadow-compare-global-alias.invalid.frag index fa0a10b0a..8f7b8ece4 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/shadow-compare-global-alias.invalid.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/shadow-compare-global-alias.invalid.frag @@ -15,22 +15,26 @@ struct main0_in float3 vUV [[user(locn0)]]; }; -inline float Samp(thread const float3& uv, thread depth2d uTex, thread sampler uSamp) +static inline __attribute__((always_inline)) +float Samp(thread const float3& uv, thread depth2d uTex, thread sampler uSamp) { return uTex.sample_compare(uSamp, uv.xy, uv.z); } -inline float Samp2(thread const float3& uv, thread depth2d uSampler, thread const sampler uSamplerSmplr, thread float3& vUV) +static inline __attribute__((always_inline)) +float Samp2(thread const float3& uv, thread depth2d uSampler, thread const sampler uSamplerSmplr, thread float3& vUV) { return uSampler.sample_compare(uSamplerSmplr, vUV.xy, vUV.z); } -inline float Samp3(thread const depth2d uT, thread const sampler uS, thread const float3& uv, thread float3& vUV) +static inline __attribute__((always_inline)) +float Samp3(thread const depth2d uT, thread const sampler uS, thread const float3& uv, thread float3& vUV) { return uT.sample_compare(uS, vUV.xy, vUV.z); } -inline float Samp4(thread const depth2d uS, thread const sampler uSSmplr, thread const float3& uv, thread float3& vUV) +static inline __attribute__((always_inline)) +float Samp4(thread const depth2d uS, thread const sampler uSSmplr, thread const float3& uv, thread float3& vUV) { return uS.sample_compare(uSSmplr, vUV.xy, vUV.z); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/stencil-export.msl21.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/stencil-export.msl21.frag index a4f11c896..f3629e18b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/stencil-export.msl21.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/stencil-export.msl21.frag @@ -12,7 +12,8 @@ struct main0_out uint gl_FragStencilRefARB [[stencil]]; }; -inline void update_stencil(thread uint& gl_FragStencilRefARB) +static inline __attribute__((always_inline)) +void update_stencil(thread uint& gl_FragStencilRefARB) { gl_FragStencilRefARB = uint(int(gl_FragStencilRefARB) + 10); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/texture-cube-array.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/texture-cube-array.frag new file mode 100644 index 000000000..9f1832ec0 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/texture-cube-array.frag @@ -0,0 +1,25 @@ +#include +#include + +using namespace metal; + +struct main0_out +{ + float4 FragColor [[color(0)]]; +}; + +struct main0_in +{ + float4 vUV [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], texturecube cubeSampler [[texture(0)]], texturecube_array cubeArraySampler [[texture(1)]], texture2d_array texArraySampler [[texture(2)]], sampler cubeSamplerSmplr [[sampler(0)]], sampler cubeArraySamplerSmplr [[sampler(1)]], sampler texArraySamplerSmplr [[sampler(2)]]) +{ + main0_out out = {}; + float4 a = cubeSampler.sample(cubeSamplerSmplr, in.vUV.xyz); + float4 b = cubeArraySampler.sample(cubeArraySamplerSmplr, in.vUV.xyz, uint(round(in.vUV.w))); + float4 c = texArraySampler.sample(texArraySamplerSmplr, in.vUV.xyz.xy, uint(round(in.vUV.xyz.z))); + out.FragColor = (a + b) + c; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag new file mode 100644 index 000000000..3c4d0adb5 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag @@ -0,0 +1,61 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" + +#include +#include + +using namespace metal; + +struct main0_out +{ + float4 FragColor [[color(0)]]; +}; + +struct main0_in +{ + float4 vUV [[user(locn0)]]; +}; + +static inline __attribute__((always_inline)) +float3 spvCubemapTo2DArrayFace(float3 P) +{ + float3 Coords = abs(P.xyz); + float CubeFace = 0; + float ProjectionAxis = 0; + float u = 0; + float v = 0; + if (Coords.x >= Coords.y && Coords.x >= Coords.z) + { + CubeFace = P.x >= 0 ? 0 : 1; + ProjectionAxis = Coords.x; + u = P.x >= 0 ? -P.z : P.z; + v = -P.y; + } + else if (Coords.y >= Coords.x && Coords.y >= Coords.z) + { + CubeFace = P.y >= 0 ? 2 : 3; + ProjectionAxis = Coords.y; + u = P.x; + v = P.y >= 0 ? P.z : -P.z; + } + else + { + CubeFace = P.z >= 0 ? 4 : 5; + ProjectionAxis = Coords.z; + u = P.z >= 0 ? P.x : -P.x; + v = -P.y; + } + u = 0.5 * (u/ProjectionAxis + 1); + v = 0.5 * (v/ProjectionAxis + 1); + return float3(u, v, CubeFace); +} + +fragment main0_out main0(main0_in in [[stage_in]], texturecube cubeSampler [[texture(0)]], texture2d_array cubeArraySampler [[texture(1)]], texture2d_array texArraySampler [[texture(2)]], sampler cubeSamplerSmplr [[sampler(0)]], sampler cubeArraySamplerSmplr [[sampler(1)]], sampler texArraySamplerSmplr [[sampler(2)]]) +{ + main0_out out = {}; + float4 a = cubeSampler.sample(cubeSamplerSmplr, in.vUV.xyz); + float4 b = cubeArraySampler.sample(cubeArraySamplerSmplr, spvCubemapTo2DArrayFace(in.vUV.xyz).xy, uint(spvCubemapTo2DArrayFace(in.vUV.xyz).z) + (uint(round(in.vUV.w)) * 6u)); + float4 c = texArraySampler.sample(texArraySamplerSmplr, in.vUV.xyz.xy, uint(round(in.vUV.xyz.z))); + out.FragColor = (a + b) + c; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/frag/write-depth-in-function.frag b/3rdparty/spirv-cross/reference/shaders-msl/frag/write-depth-in-function.frag index eab4ef4c5..c3ab221fc 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/frag/write-depth-in-function.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/frag/write-depth-in-function.frag @@ -11,7 +11,8 @@ struct main0_out float gl_FragDepth [[depth(any)]]; }; -inline void set_output_depth(thread float& gl_FragDepth) +static inline __attribute__((always_inline)) +void set_output_depth(thread float& gl_FragDepth) { gl_FragDepth = 0.20000000298023223876953125; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array-of-matrix.tesc b/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array-of-matrix.tesc new file mode 100644 index 000000000..46d4b4ad5 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array-of-matrix.tesc @@ -0,0 +1,73 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4x4 vOutputs; +}; + +struct main0_in +{ + float4 vInputs_0 [[attribute(0)]]; + float4 vInputs_1 [[attribute(1)]]; + float4 vInputs_2 [[attribute(2)]]; + float4 vInputs_3 [[attribute(3)]]; +}; + +kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 4) + return; + spvUnsafeArray _16 = spvUnsafeArray({ float4x4(gl_in[0].vInputs_0, gl_in[0].vInputs_1, gl_in[0].vInputs_2, gl_in[0].vInputs_3), float4x4(gl_in[1].vInputs_0, gl_in[1].vInputs_1, gl_in[1].vInputs_2, gl_in[1].vInputs_3), float4x4(gl_in[2].vInputs_0, gl_in[2].vInputs_1, gl_in[2].vInputs_2, gl_in[2].vInputs_3), float4x4(gl_in[3].vInputs_0, gl_in[3].vInputs_1, gl_in[3].vInputs_2, gl_in[3].vInputs_3), float4x4(gl_in[4].vInputs_0, gl_in[4].vInputs_1, gl_in[4].vInputs_2, gl_in[4].vInputs_3), float4x4(gl_in[5].vInputs_0, gl_in[5].vInputs_1, gl_in[5].vInputs_2, gl_in[5].vInputs_3), float4x4(gl_in[6].vInputs_0, gl_in[6].vInputs_1, gl_in[6].vInputs_2, gl_in[6].vInputs_3), float4x4(gl_in[7].vInputs_0, gl_in[7].vInputs_1, gl_in[7].vInputs_2, gl_in[7].vInputs_3), float4x4(gl_in[8].vInputs_0, gl_in[8].vInputs_1, gl_in[8].vInputs_2, gl_in[8].vInputs_3), float4x4(gl_in[9].vInputs_0, gl_in[9].vInputs_1, gl_in[9].vInputs_2, gl_in[9].vInputs_3), float4x4(gl_in[10].vInputs_0, gl_in[10].vInputs_1, gl_in[10].vInputs_2, gl_in[10].vInputs_3), float4x4(gl_in[11].vInputs_0, gl_in[11].vInputs_1, gl_in[11].vInputs_2, gl_in[11].vInputs_3), float4x4(gl_in[12].vInputs_0, gl_in[12].vInputs_1, gl_in[12].vInputs_2, gl_in[12].vInputs_3), float4x4(gl_in[13].vInputs_0, gl_in[13].vInputs_1, gl_in[13].vInputs_2, gl_in[13].vInputs_3), float4x4(gl_in[14].vInputs_0, gl_in[14].vInputs_1, gl_in[14].vInputs_2, gl_in[14].vInputs_3), float4x4(gl_in[15].vInputs_0, gl_in[15].vInputs_1, gl_in[15].vInputs_2, gl_in[15].vInputs_3), float4x4(gl_in[16].vInputs_0, gl_in[16].vInputs_1, gl_in[16].vInputs_2, gl_in[16].vInputs_3), float4x4(gl_in[17].vInputs_0, gl_in[17].vInputs_1, gl_in[17].vInputs_2, gl_in[17].vInputs_3), float4x4(gl_in[18].vInputs_0, gl_in[18].vInputs_1, gl_in[18].vInputs_2, gl_in[18].vInputs_3), float4x4(gl_in[19].vInputs_0, gl_in[19].vInputs_1, gl_in[19].vInputs_2, gl_in[19].vInputs_3), float4x4(gl_in[20].vInputs_0, gl_in[20].vInputs_1, gl_in[20].vInputs_2, gl_in[20].vInputs_3), float4x4(gl_in[21].vInputs_0, gl_in[21].vInputs_1, gl_in[21].vInputs_2, gl_in[21].vInputs_3), float4x4(gl_in[22].vInputs_0, gl_in[22].vInputs_1, gl_in[22].vInputs_2, gl_in[22].vInputs_3), float4x4(gl_in[23].vInputs_0, gl_in[23].vInputs_1, gl_in[23].vInputs_2, gl_in[23].vInputs_3), float4x4(gl_in[24].vInputs_0, gl_in[24].vInputs_1, gl_in[24].vInputs_2, gl_in[24].vInputs_3), float4x4(gl_in[25].vInputs_0, gl_in[25].vInputs_1, gl_in[25].vInputs_2, gl_in[25].vInputs_3), float4x4(gl_in[26].vInputs_0, gl_in[26].vInputs_1, gl_in[26].vInputs_2, gl_in[26].vInputs_3), float4x4(gl_in[27].vInputs_0, gl_in[27].vInputs_1, gl_in[27].vInputs_2, gl_in[27].vInputs_3), float4x4(gl_in[28].vInputs_0, gl_in[28].vInputs_1, gl_in[28].vInputs_2, gl_in[28].vInputs_3), float4x4(gl_in[29].vInputs_0, gl_in[29].vInputs_1, gl_in[29].vInputs_2, gl_in[29].vInputs_3), float4x4(gl_in[30].vInputs_0, gl_in[30].vInputs_1, gl_in[30].vInputs_2, gl_in[30].vInputs_3), float4x4(gl_in[31].vInputs_0, gl_in[31].vInputs_1, gl_in[31].vInputs_2, gl_in[31].vInputs_3) }); + spvUnsafeArray tmp; + tmp = _16; + gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID]; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array-of-struct.tesc b/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array-of-struct.tesc new file mode 100644 index 000000000..91d3521df --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array-of-struct.tesc @@ -0,0 +1,86 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct VertexData +{ + float4x4 a; + spvUnsafeArray b; + float4 c; +}; + +struct main0_out +{ + float4 vOutputs; +}; + +struct main0_in +{ + float4 VertexData_a_0 [[attribute(0)]]; + float4 VertexData_a_1 [[attribute(1)]]; + float4 VertexData_a_2 [[attribute(2)]]; + float4 VertexData_a_3 [[attribute(3)]]; + float4 VertexData_b_0 [[attribute(4)]]; + float4 VertexData_b_1 [[attribute(5)]]; + float4 VertexData_c [[attribute(6)]]; +}; + +kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 4) + return; + spvUnsafeArray _19 = spvUnsafeArray({ VertexData{ float4x4(gl_in[0].VertexData_a_0, gl_in[0].VertexData_a_1, gl_in[0].VertexData_a_2, gl_in[0].VertexData_a_3), spvUnsafeArray({ gl_in[0].VertexData_b_0, gl_in[0].VertexData_b_1 }), gl_in[0].VertexData_c }, VertexData{ float4x4(gl_in[1].VertexData_a_0, gl_in[1].VertexData_a_1, gl_in[1].VertexData_a_2, gl_in[1].VertexData_a_3), spvUnsafeArray({ gl_in[1].VertexData_b_0, gl_in[1].VertexData_b_1 }), gl_in[1].VertexData_c }, VertexData{ float4x4(gl_in[2].VertexData_a_0, gl_in[2].VertexData_a_1, gl_in[2].VertexData_a_2, gl_in[2].VertexData_a_3), spvUnsafeArray({ gl_in[2].VertexData_b_0, gl_in[2].VertexData_b_1 }), gl_in[2].VertexData_c }, VertexData{ float4x4(gl_in[3].VertexData_a_0, gl_in[3].VertexData_a_1, gl_in[3].VertexData_a_2, gl_in[3].VertexData_a_3), spvUnsafeArray({ gl_in[3].VertexData_b_0, gl_in[3].VertexData_b_1 }), gl_in[3].VertexData_c }, VertexData{ float4x4(gl_in[4].VertexData_a_0, gl_in[4].VertexData_a_1, gl_in[4].VertexData_a_2, gl_in[4].VertexData_a_3), spvUnsafeArray({ gl_in[4].VertexData_b_0, gl_in[4].VertexData_b_1 }), gl_in[4].VertexData_c }, VertexData{ float4x4(gl_in[5].VertexData_a_0, gl_in[5].VertexData_a_1, gl_in[5].VertexData_a_2, gl_in[5].VertexData_a_3), spvUnsafeArray({ gl_in[5].VertexData_b_0, gl_in[5].VertexData_b_1 }), gl_in[5].VertexData_c }, VertexData{ float4x4(gl_in[6].VertexData_a_0, gl_in[6].VertexData_a_1, gl_in[6].VertexData_a_2, gl_in[6].VertexData_a_3), spvUnsafeArray({ gl_in[6].VertexData_b_0, gl_in[6].VertexData_b_1 }), gl_in[6].VertexData_c }, VertexData{ float4x4(gl_in[7].VertexData_a_0, gl_in[7].VertexData_a_1, gl_in[7].VertexData_a_2, gl_in[7].VertexData_a_3), spvUnsafeArray({ gl_in[7].VertexData_b_0, gl_in[7].VertexData_b_1 }), gl_in[7].VertexData_c }, VertexData{ float4x4(gl_in[8].VertexData_a_0, gl_in[8].VertexData_a_1, gl_in[8].VertexData_a_2, gl_in[8].VertexData_a_3), spvUnsafeArray({ gl_in[8].VertexData_b_0, gl_in[8].VertexData_b_1 }), gl_in[8].VertexData_c }, VertexData{ float4x4(gl_in[9].VertexData_a_0, gl_in[9].VertexData_a_1, gl_in[9].VertexData_a_2, gl_in[9].VertexData_a_3), spvUnsafeArray({ gl_in[9].VertexData_b_0, gl_in[9].VertexData_b_1 }), gl_in[9].VertexData_c }, VertexData{ float4x4(gl_in[10].VertexData_a_0, gl_in[10].VertexData_a_1, gl_in[10].VertexData_a_2, gl_in[10].VertexData_a_3), spvUnsafeArray({ gl_in[10].VertexData_b_0, gl_in[10].VertexData_b_1 }), gl_in[10].VertexData_c }, VertexData{ float4x4(gl_in[11].VertexData_a_0, gl_in[11].VertexData_a_1, gl_in[11].VertexData_a_2, gl_in[11].VertexData_a_3), spvUnsafeArray({ gl_in[11].VertexData_b_0, gl_in[11].VertexData_b_1 }), gl_in[11].VertexData_c }, VertexData{ float4x4(gl_in[12].VertexData_a_0, gl_in[12].VertexData_a_1, gl_in[12].VertexData_a_2, gl_in[12].VertexData_a_3), spvUnsafeArray({ gl_in[12].VertexData_b_0, gl_in[12].VertexData_b_1 }), gl_in[12].VertexData_c }, VertexData{ float4x4(gl_in[13].VertexData_a_0, gl_in[13].VertexData_a_1, gl_in[13].VertexData_a_2, gl_in[13].VertexData_a_3), spvUnsafeArray({ gl_in[13].VertexData_b_0, gl_in[13].VertexData_b_1 }), gl_in[13].VertexData_c }, VertexData{ float4x4(gl_in[14].VertexData_a_0, gl_in[14].VertexData_a_1, gl_in[14].VertexData_a_2, gl_in[14].VertexData_a_3), spvUnsafeArray({ gl_in[14].VertexData_b_0, gl_in[14].VertexData_b_1 }), gl_in[14].VertexData_c }, VertexData{ float4x4(gl_in[15].VertexData_a_0, gl_in[15].VertexData_a_1, gl_in[15].VertexData_a_2, gl_in[15].VertexData_a_3), spvUnsafeArray({ gl_in[15].VertexData_b_0, gl_in[15].VertexData_b_1 }), gl_in[15].VertexData_c }, VertexData{ float4x4(gl_in[16].VertexData_a_0, gl_in[16].VertexData_a_1, gl_in[16].VertexData_a_2, gl_in[16].VertexData_a_3), spvUnsafeArray({ gl_in[16].VertexData_b_0, gl_in[16].VertexData_b_1 }), gl_in[16].VertexData_c }, VertexData{ float4x4(gl_in[17].VertexData_a_0, gl_in[17].VertexData_a_1, gl_in[17].VertexData_a_2, gl_in[17].VertexData_a_3), spvUnsafeArray({ gl_in[17].VertexData_b_0, gl_in[17].VertexData_b_1 }), gl_in[17].VertexData_c }, VertexData{ float4x4(gl_in[18].VertexData_a_0, gl_in[18].VertexData_a_1, gl_in[18].VertexData_a_2, gl_in[18].VertexData_a_3), spvUnsafeArray({ gl_in[18].VertexData_b_0, gl_in[18].VertexData_b_1 }), gl_in[18].VertexData_c }, VertexData{ float4x4(gl_in[19].VertexData_a_0, gl_in[19].VertexData_a_1, gl_in[19].VertexData_a_2, gl_in[19].VertexData_a_3), spvUnsafeArray({ gl_in[19].VertexData_b_0, gl_in[19].VertexData_b_1 }), gl_in[19].VertexData_c }, VertexData{ float4x4(gl_in[20].VertexData_a_0, gl_in[20].VertexData_a_1, gl_in[20].VertexData_a_2, gl_in[20].VertexData_a_3), spvUnsafeArray({ gl_in[20].VertexData_b_0, gl_in[20].VertexData_b_1 }), gl_in[20].VertexData_c }, VertexData{ float4x4(gl_in[21].VertexData_a_0, gl_in[21].VertexData_a_1, gl_in[21].VertexData_a_2, gl_in[21].VertexData_a_3), spvUnsafeArray({ gl_in[21].VertexData_b_0, gl_in[21].VertexData_b_1 }), gl_in[21].VertexData_c }, VertexData{ float4x4(gl_in[22].VertexData_a_0, gl_in[22].VertexData_a_1, gl_in[22].VertexData_a_2, gl_in[22].VertexData_a_3), spvUnsafeArray({ gl_in[22].VertexData_b_0, gl_in[22].VertexData_b_1 }), gl_in[22].VertexData_c }, VertexData{ float4x4(gl_in[23].VertexData_a_0, gl_in[23].VertexData_a_1, gl_in[23].VertexData_a_2, gl_in[23].VertexData_a_3), spvUnsafeArray({ gl_in[23].VertexData_b_0, gl_in[23].VertexData_b_1 }), gl_in[23].VertexData_c }, VertexData{ float4x4(gl_in[24].VertexData_a_0, gl_in[24].VertexData_a_1, gl_in[24].VertexData_a_2, gl_in[24].VertexData_a_3), spvUnsafeArray({ gl_in[24].VertexData_b_0, gl_in[24].VertexData_b_1 }), gl_in[24].VertexData_c }, VertexData{ float4x4(gl_in[25].VertexData_a_0, gl_in[25].VertexData_a_1, gl_in[25].VertexData_a_2, gl_in[25].VertexData_a_3), spvUnsafeArray({ gl_in[25].VertexData_b_0, gl_in[25].VertexData_b_1 }), gl_in[25].VertexData_c }, VertexData{ float4x4(gl_in[26].VertexData_a_0, gl_in[26].VertexData_a_1, gl_in[26].VertexData_a_2, gl_in[26].VertexData_a_3), spvUnsafeArray({ gl_in[26].VertexData_b_0, gl_in[26].VertexData_b_1 }), gl_in[26].VertexData_c }, VertexData{ float4x4(gl_in[27].VertexData_a_0, gl_in[27].VertexData_a_1, gl_in[27].VertexData_a_2, gl_in[27].VertexData_a_3), spvUnsafeArray({ gl_in[27].VertexData_b_0, gl_in[27].VertexData_b_1 }), gl_in[27].VertexData_c }, VertexData{ float4x4(gl_in[28].VertexData_a_0, gl_in[28].VertexData_a_1, gl_in[28].VertexData_a_2, gl_in[28].VertexData_a_3), spvUnsafeArray({ gl_in[28].VertexData_b_0, gl_in[28].VertexData_b_1 }), gl_in[28].VertexData_c }, VertexData{ float4x4(gl_in[29].VertexData_a_0, gl_in[29].VertexData_a_1, gl_in[29].VertexData_a_2, gl_in[29].VertexData_a_3), spvUnsafeArray({ gl_in[29].VertexData_b_0, gl_in[29].VertexData_b_1 }), gl_in[29].VertexData_c }, VertexData{ float4x4(gl_in[30].VertexData_a_0, gl_in[30].VertexData_a_1, gl_in[30].VertexData_a_2, gl_in[30].VertexData_a_3), spvUnsafeArray({ gl_in[30].VertexData_b_0, gl_in[30].VertexData_b_1 }), gl_in[30].VertexData_c }, VertexData{ float4x4(gl_in[31].VertexData_a_0, gl_in[31].VertexData_a_1, gl_in[31].VertexData_a_2, gl_in[31].VertexData_a_3), spvUnsafeArray({ gl_in[31].VertexData_b_0, gl_in[31].VertexData_b_1 }), gl_in[31].VertexData_c } }); + spvUnsafeArray tmp; + tmp = _19; + int _27 = gl_InvocationID ^ 1; + VertexData _30 = VertexData{ float4x4(gl_in[_27].VertexData_a_0, gl_in[_27].VertexData_a_1, gl_in[_27].VertexData_a_2, gl_in[_27].VertexData_a_3), spvUnsafeArray({ gl_in[_27].VertexData_b_0, gl_in[_27].VertexData_b_1 }), gl_in[_27].VertexData_c }; + VertexData tmp_single = _30; + gl_out[gl_InvocationID].vOutputs = ((tmp[gl_InvocationID].a[1] + tmp[gl_InvocationID].b[1]) + tmp[gl_InvocationID].c) + tmp_single.c; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array.tesc b/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array.tesc new file mode 100644 index 000000000..d04571ae3 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/tesc/load-control-point-array.tesc @@ -0,0 +1,70 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4 vOutputs; +}; + +struct main0_in +{ + float4 vInputs [[attribute(0)]]; +}; + +kernel void main0(main0_in in [[stage_in]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 4) + return; + spvUnsafeArray _15 = spvUnsafeArray({ gl_in[0].vInputs, gl_in[1].vInputs, gl_in[2].vInputs, gl_in[3].vInputs, gl_in[4].vInputs, gl_in[5].vInputs, gl_in[6].vInputs, gl_in[7].vInputs, gl_in[8].vInputs, gl_in[9].vInputs, gl_in[10].vInputs, gl_in[11].vInputs, gl_in[12].vInputs, gl_in[13].vInputs, gl_in[14].vInputs, gl_in[15].vInputs, gl_in[16].vInputs, gl_in[17].vInputs, gl_in[18].vInputs, gl_in[19].vInputs, gl_in[20].vInputs, gl_in[21].vInputs, gl_in[22].vInputs, gl_in[23].vInputs, gl_in[24].vInputs, gl_in[25].vInputs, gl_in[26].vInputs, gl_in[27].vInputs, gl_in[28].vInputs, gl_in[29].vInputs, gl_in[30].vInputs, gl_in[31].vInputs }); + spvUnsafeArray tmp; + tmp = _15; + gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID]; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tesc/water_tess.tesc b/3rdparty/spirv-cross/reference/shaders-msl/tesc/water_tess.tesc index 596abe130..d74f5752f 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tesc/water_tess.tesc +++ b/3rdparty/spirv-cross/reference/shaders-msl/tesc/water_tess.tesc @@ -26,7 +26,8 @@ struct main0_in float2 vPatchPosBase [[attribute(0)]]; }; -inline bool frustum_cull(thread const float2& p0, constant UBO& v_41) +static inline __attribute__((always_inline)) +bool frustum_cull(thread const float2& p0, constant UBO& v_41) { float2 min_xz = (p0 - float2(10.0)) * v_41.uScale.xy; float2 max_xz = ((p0 + v_41.uPatchSize) + float2(10.0)) * v_41.uScale.xy; @@ -49,7 +50,8 @@ inline bool frustum_cull(thread const float2& p0, constant UBO& v_41) return !_215; } -inline float lod_factor(thread const float2& pos_, constant UBO& v_41) +static inline __attribute__((always_inline)) +float lod_factor(thread const float2& pos_, constant UBO& v_41) { float2 pos = pos_ * v_41.uScale.xy; float3 dist_to_cam = v_41.uCamPos - float3(pos.x, 0.0, pos.y); @@ -57,17 +59,20 @@ inline float lod_factor(thread const float2& pos_, constant UBO& v_41) return fast::clamp(level, 0.0, v_41.uMaxTessLevel.x); } -inline float4 tess_level(thread const float4& lod, constant UBO& v_41) +static inline __attribute__((always_inline)) +float4 tess_level(thread const float4& lod, constant UBO& v_41) { return exp2(-lod) * v_41.uMaxTessLevel.y; } -inline float tess_level(thread const float& lod, constant UBO& v_41) +static inline __attribute__((always_inline)) +float tess_level(thread const float& lod, constant UBO& v_41) { return v_41.uMaxTessLevel.y * exp2(-lod); } -inline void compute_tess_levels(thread const float2& p0, constant UBO& v_41, device float2& vOutPatchPosBase, device float4& vPatchLods, device half (&gl_TessLevelOuter)[4], device half (&gl_TessLevelInner)[2]) +static inline __attribute__((always_inline)) +void compute_tess_levels(thread const float2& p0, constant UBO& v_41, device float2& vOutPatchPosBase, device float4& vPatchLods, device half (&gl_TessLevelOuter)[4], device half (&gl_TessLevelInner)[2]) { vOutPatchPosBase = p0; float2 param = p0 + (float2(-0.5) * v_41.uPatchSize); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/input-array.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/input-array.tese index 33ac58419..f6cfa2fb9 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tese/input-array.tese +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/input-array.tese @@ -21,7 +21,8 @@ struct main0_patchIn patch_control_point gl_in; }; -inline void set_position(thread float4& gl_Position, thread patch_control_point& gl_in, thread float2& gl_TessCoord) +static inline __attribute__((always_inline)) +void set_position(thread float4& gl_Position, thread patch_control_point& gl_in, thread float2& gl_TessCoord) { gl_Position = (gl_in[0].Floats * gl_TessCoord.x) + (gl_in[1].Floats2 * gl_TessCoord.y); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/input-types.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/input-types.tese index 6091434fc..af6db4626 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tese/input-types.tese +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/input-types.tese @@ -47,7 +47,8 @@ struct main0_patchIn patch_control_point gl_in; }; -inline void set_from_function(thread float4& gl_Position, thread patch_control_point& gl_in, thread PatchBlock& patch_block, thread float4& vColors, thread Foo& vFoo) +static inline __attribute__((always_inline)) +void set_from_function(thread float4& gl_Position, thread patch_control_point& gl_in, thread PatchBlock& patch_block, thread float4& vColors, thread Foo& vFoo) { gl_Position = gl_in[0].Block_a; gl_Position += gl_in[0].Block_b; @@ -61,16 +62,12 @@ inline void set_from_function(thread float4& gl_Position, thread patch_control_p Foo foo = vFoo; gl_Position += foo.a; gl_Position += foo.b; - Foo vFoos_105; - vFoos_105.a = gl_in[0].Foo_a; - vFoos_105.b = gl_in[0].Foo_b; - foo = vFoos_105; + Foo _106 = Foo{ gl_in[0].Foo_a, gl_in[0].Foo_b }; + foo = _106; gl_Position += foo.a; gl_Position += foo.b; - Foo vFoos_119; - vFoos_119.a = gl_in[1].Foo_a; - vFoos_119.b = gl_in[1].Foo_b; - foo = vFoos_119; + Foo _120 = Foo{ gl_in[1].Foo_a, gl_in[1].Foo_b }; + foo = _120; gl_Position += foo.a; gl_Position += foo.b; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/load-control-point-array-of-matrix.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/load-control-point-array-of-matrix.tese new file mode 100644 index 000000000..162874abd --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/load-control-point-array-of-matrix.tese @@ -0,0 +1,84 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 vInputs_0 [[attribute(0)]]; + float4 vInputs_1 [[attribute(1)]]; + float4 vInputs_2 [[attribute(2)]]; + float4 vInputs_3 [[attribute(3)]]; +}; + +struct main0_patchIn +{ + float4 vBoo_0 [[attribute(4)]]; + float4 vBoo_1 [[attribute(5)]]; + float4 vBoo_2 [[attribute(6)]]; + float4 vBoo_3 [[attribute(7)]]; + int vIndex [[attribute(8)]]; + patch_control_point gl_in; +}; + +[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]]) +{ + main0_out out = {}; + spvUnsafeArray vBoo = {}; + vBoo[0] = patchIn.vBoo_0; + vBoo[1] = patchIn.vBoo_1; + vBoo[2] = patchIn.vBoo_2; + vBoo[3] = patchIn.vBoo_3; + spvUnsafeArray _16 = spvUnsafeArray({ float4x4(patchIn.gl_in[0].vInputs_0, patchIn.gl_in[0].vInputs_1, patchIn.gl_in[0].vInputs_2, patchIn.gl_in[0].vInputs_3), float4x4(patchIn.gl_in[1].vInputs_0, patchIn.gl_in[1].vInputs_1, patchIn.gl_in[1].vInputs_2, patchIn.gl_in[1].vInputs_3), float4x4(patchIn.gl_in[2].vInputs_0, patchIn.gl_in[2].vInputs_1, patchIn.gl_in[2].vInputs_2, patchIn.gl_in[2].vInputs_3), float4x4(patchIn.gl_in[3].vInputs_0, patchIn.gl_in[3].vInputs_1, patchIn.gl_in[3].vInputs_2, patchIn.gl_in[3].vInputs_3), float4x4(patchIn.gl_in[4].vInputs_0, patchIn.gl_in[4].vInputs_1, patchIn.gl_in[4].vInputs_2, patchIn.gl_in[4].vInputs_3), float4x4(patchIn.gl_in[5].vInputs_0, patchIn.gl_in[5].vInputs_1, patchIn.gl_in[5].vInputs_2, patchIn.gl_in[5].vInputs_3), float4x4(patchIn.gl_in[6].vInputs_0, patchIn.gl_in[6].vInputs_1, patchIn.gl_in[6].vInputs_2, patchIn.gl_in[6].vInputs_3), float4x4(patchIn.gl_in[7].vInputs_0, patchIn.gl_in[7].vInputs_1, patchIn.gl_in[7].vInputs_2, patchIn.gl_in[7].vInputs_3), float4x4(patchIn.gl_in[8].vInputs_0, patchIn.gl_in[8].vInputs_1, patchIn.gl_in[8].vInputs_2, patchIn.gl_in[8].vInputs_3), float4x4(patchIn.gl_in[9].vInputs_0, patchIn.gl_in[9].vInputs_1, patchIn.gl_in[9].vInputs_2, patchIn.gl_in[9].vInputs_3), float4x4(patchIn.gl_in[10].vInputs_0, patchIn.gl_in[10].vInputs_1, patchIn.gl_in[10].vInputs_2, patchIn.gl_in[10].vInputs_3), float4x4(patchIn.gl_in[11].vInputs_0, patchIn.gl_in[11].vInputs_1, patchIn.gl_in[11].vInputs_2, patchIn.gl_in[11].vInputs_3), float4x4(patchIn.gl_in[12].vInputs_0, patchIn.gl_in[12].vInputs_1, patchIn.gl_in[12].vInputs_2, patchIn.gl_in[12].vInputs_3), float4x4(patchIn.gl_in[13].vInputs_0, patchIn.gl_in[13].vInputs_1, patchIn.gl_in[13].vInputs_2, patchIn.gl_in[13].vInputs_3), float4x4(patchIn.gl_in[14].vInputs_0, patchIn.gl_in[14].vInputs_1, patchIn.gl_in[14].vInputs_2, patchIn.gl_in[14].vInputs_3), float4x4(patchIn.gl_in[15].vInputs_0, patchIn.gl_in[15].vInputs_1, patchIn.gl_in[15].vInputs_2, patchIn.gl_in[15].vInputs_3), float4x4(patchIn.gl_in[16].vInputs_0, patchIn.gl_in[16].vInputs_1, patchIn.gl_in[16].vInputs_2, patchIn.gl_in[16].vInputs_3), float4x4(patchIn.gl_in[17].vInputs_0, patchIn.gl_in[17].vInputs_1, patchIn.gl_in[17].vInputs_2, patchIn.gl_in[17].vInputs_3), float4x4(patchIn.gl_in[18].vInputs_0, patchIn.gl_in[18].vInputs_1, patchIn.gl_in[18].vInputs_2, patchIn.gl_in[18].vInputs_3), float4x4(patchIn.gl_in[19].vInputs_0, patchIn.gl_in[19].vInputs_1, patchIn.gl_in[19].vInputs_2, patchIn.gl_in[19].vInputs_3), float4x4(patchIn.gl_in[20].vInputs_0, patchIn.gl_in[20].vInputs_1, patchIn.gl_in[20].vInputs_2, patchIn.gl_in[20].vInputs_3), float4x4(patchIn.gl_in[21].vInputs_0, patchIn.gl_in[21].vInputs_1, patchIn.gl_in[21].vInputs_2, patchIn.gl_in[21].vInputs_3), float4x4(patchIn.gl_in[22].vInputs_0, patchIn.gl_in[22].vInputs_1, patchIn.gl_in[22].vInputs_2, patchIn.gl_in[22].vInputs_3), float4x4(patchIn.gl_in[23].vInputs_0, patchIn.gl_in[23].vInputs_1, patchIn.gl_in[23].vInputs_2, patchIn.gl_in[23].vInputs_3), float4x4(patchIn.gl_in[24].vInputs_0, patchIn.gl_in[24].vInputs_1, patchIn.gl_in[24].vInputs_2, patchIn.gl_in[24].vInputs_3), float4x4(patchIn.gl_in[25].vInputs_0, patchIn.gl_in[25].vInputs_1, patchIn.gl_in[25].vInputs_2, patchIn.gl_in[25].vInputs_3), float4x4(patchIn.gl_in[26].vInputs_0, patchIn.gl_in[26].vInputs_1, patchIn.gl_in[26].vInputs_2, patchIn.gl_in[26].vInputs_3), float4x4(patchIn.gl_in[27].vInputs_0, patchIn.gl_in[27].vInputs_1, patchIn.gl_in[27].vInputs_2, patchIn.gl_in[27].vInputs_3), float4x4(patchIn.gl_in[28].vInputs_0, patchIn.gl_in[28].vInputs_1, patchIn.gl_in[28].vInputs_2, patchIn.gl_in[28].vInputs_3), float4x4(patchIn.gl_in[29].vInputs_0, patchIn.gl_in[29].vInputs_1, patchIn.gl_in[29].vInputs_2, patchIn.gl_in[29].vInputs_3), float4x4(patchIn.gl_in[30].vInputs_0, patchIn.gl_in[30].vInputs_1, patchIn.gl_in[30].vInputs_2, patchIn.gl_in[30].vInputs_3), float4x4(patchIn.gl_in[31].vInputs_0, patchIn.gl_in[31].vInputs_1, patchIn.gl_in[31].vInputs_2, patchIn.gl_in[31].vInputs_3) }); + spvUnsafeArray tmp; + tmp = _16; + out.gl_Position = (tmp[0][patchIn.vIndex] + tmp[1][patchIn.vIndex]) + vBoo[patchIn.vIndex]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/load-control-point-array.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/load-control-point-array.tese new file mode 100644 index 000000000..09c19cb47 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/load-control-point-array.tese @@ -0,0 +1,81 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct main0_out +{ + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 vInputs [[attribute(0)]]; +}; + +struct main0_patchIn +{ + float4 vBoo_0 [[attribute(1)]]; + float4 vBoo_1 [[attribute(2)]]; + float4 vBoo_2 [[attribute(3)]]; + float4 vBoo_3 [[attribute(4)]]; + int vIndex [[attribute(5)]]; + patch_control_point gl_in; +}; + +[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]]) +{ + main0_out out = {}; + spvUnsafeArray vBoo = {}; + vBoo[0] = patchIn.vBoo_0; + vBoo[1] = patchIn.vBoo_1; + vBoo[2] = patchIn.vBoo_2; + vBoo[3] = patchIn.vBoo_3; + spvUnsafeArray _15 = spvUnsafeArray({ patchIn.gl_in[0].vInputs, patchIn.gl_in[1].vInputs, patchIn.gl_in[2].vInputs, patchIn.gl_in[3].vInputs, patchIn.gl_in[4].vInputs, patchIn.gl_in[5].vInputs, patchIn.gl_in[6].vInputs, patchIn.gl_in[7].vInputs, patchIn.gl_in[8].vInputs, patchIn.gl_in[9].vInputs, patchIn.gl_in[10].vInputs, patchIn.gl_in[11].vInputs, patchIn.gl_in[12].vInputs, patchIn.gl_in[13].vInputs, patchIn.gl_in[14].vInputs, patchIn.gl_in[15].vInputs, patchIn.gl_in[16].vInputs, patchIn.gl_in[17].vInputs, patchIn.gl_in[18].vInputs, patchIn.gl_in[19].vInputs, patchIn.gl_in[20].vInputs, patchIn.gl_in[21].vInputs, patchIn.gl_in[22].vInputs, patchIn.gl_in[23].vInputs, patchIn.gl_in[24].vInputs, patchIn.gl_in[25].vInputs, patchIn.gl_in[26].vInputs, patchIn.gl_in[27].vInputs, patchIn.gl_in[28].vInputs, patchIn.gl_in[29].vInputs, patchIn.gl_in[30].vInputs, patchIn.gl_in[31].vInputs }); + spvUnsafeArray tmp; + tmp = _15; + out.gl_Position = (tmp[0] + tmp[1]) + vBoo[patchIn.vIndex]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/quad.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/quad.tese index 9c4f2e271..40273582c 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tese/quad.tese +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/quad.tese @@ -16,7 +16,8 @@ struct main0_patchIn float4 gl_TessLevelOuter [[attribute(1)]]; }; -inline void set_position(thread float4& gl_Position, thread float2& gl_TessCoord, thread float2& gl_TessLevelInner, thread float4& gl_TessLevelOuter) +static inline __attribute__((always_inline)) +void set_position(thread float4& gl_Position, thread float2& gl_TessCoord, thread float2& gl_TessLevelInner, thread float4& gl_TessLevelOuter) { gl_Position = float4(((gl_TessCoord.x * gl_TessLevelInner.x) * gl_TessLevelOuter.x) + (((1.0 - gl_TessCoord.x) * gl_TessLevelInner.x) * gl_TessLevelOuter.z), ((gl_TessCoord.y * gl_TessLevelInner.y) * gl_TessLevelOuter.y) + (((1.0 - gl_TessCoord.y) * gl_TessLevelInner.y) * gl_TessLevelOuter.w), 0.0, 1.0); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/set-from-function.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/set-from-function.tese index f629878d3..30bb720c0 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tese/set-from-function.tese +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/set-from-function.tese @@ -37,7 +37,8 @@ struct main0_patchIn patch_control_point gl_in; }; -inline void set_from_function(thread float4& gl_Position, thread patch_control_point& gl_in, thread float4& vColors, thread Foo& vFoo) +static inline __attribute__((always_inline)) +void set_from_function(thread float4& gl_Position, thread patch_control_point& gl_in, thread float4& vColors, thread Foo& vFoo) { gl_Position = gl_in[0].Block_a; gl_Position += gl_in[0].Block_b; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/triangle-tess-level.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/triangle-tess-level.tese index 975e62985..6930e1479 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tese/triangle-tess-level.tese +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/triangle-tess-level.tese @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 gl_Position [[position]]; @@ -16,8 +57,8 @@ struct main0_patchIn [[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], float3 gl_TessCoord [[position_in_patch]]) { main0_out out = {}; - float gl_TessLevelInner[2] = {}; - float gl_TessLevelOuter[4] = {}; + spvUnsafeArray gl_TessLevelInner = {}; + spvUnsafeArray gl_TessLevelOuter = {}; gl_TessLevelInner[0] = patchIn.gl_TessLevel.w; gl_TessLevelOuter[0] = patchIn.gl_TessLevel.x; gl_TessLevelOuter[1] = patchIn.gl_TessLevel.y; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/tese/water_tess.tese b/3rdparty/spirv-cross/reference/shaders-msl/tese/water_tess.tese index eb19dbfce..f0054562b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/tese/water_tess.tese +++ b/3rdparty/spirv-cross/reference/shaders-msl/tese/water_tess.tese @@ -28,12 +28,14 @@ struct main0_patchIn float4 vPatchLods [[attribute(1)]]; }; -inline float2 lerp_vertex(thread const float2& tess_coord, thread float2& vOutPatchPosBase, constant UBO& v_31) +static inline __attribute__((always_inline)) +float2 lerp_vertex(thread const float2& tess_coord, thread float2& vOutPatchPosBase, constant UBO& v_31) { return vOutPatchPosBase + (tess_coord * v_31.uPatchSize); } -inline float2 lod_factor(thread const float2& tess_coord, thread float4& vPatchLods) +static inline __attribute__((always_inline)) +float2 lod_factor(thread const float2& tess_coord, thread float4& vPatchLods) { float2 x = mix(vPatchLods.yx, vPatchLods.zw, float2(tess_coord.x)); float level = mix(x.x, x.y, tess_coord.y); @@ -42,7 +44,8 @@ inline float2 lod_factor(thread const float2& tess_coord, thread float4& vPatchL return float2(floor_level, fract_level); } -inline float3 sample_height_displacement(thread const float2& uv, thread const float2& off, thread const float2& lod, thread texture2d uHeightmapDisplacement, thread const sampler uHeightmapDisplacementSmplr) +static inline __attribute__((always_inline)) +float3 sample_height_displacement(thread const float2& uv, thread const float2& off, thread const float2& lod, thread texture2d uHeightmapDisplacement, thread const sampler uHeightmapDisplacementSmplr) { return mix(uHeightmapDisplacement.sample(uHeightmapDisplacementSmplr, (uv + (off * 0.5)), level(lod.x)).xyz, uHeightmapDisplacement.sample(uHeightmapDisplacementSmplr, (uv + (off * 1.0)), level(lod.x + 1.0)).xyz, float3(lod.y)); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/float-math.invariant-float-math.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/float-math.invariant-float-math.vert new file mode 100644 index 000000000..d603884cd --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/float-math.invariant-float-math.vert @@ -0,0 +1,136 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct Matrices +{ + float4x4 vpMatrix; + float4x4 wMatrix; + float4x3 wMatrix4x3; + float3x4 wMatrix3x4; +}; + +struct main0_out +{ + float3 OutNormal [[user(locn0)]]; + float4 OutWorldPos_0 [[user(locn1)]]; + float4 OutWorldPos_1 [[user(locn2)]]; + float4 OutWorldPos_2 [[user(locn3)]]; + float4 OutWorldPos_3 [[user(locn4)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float3 InPos [[attribute(0)]]; + float3 InNormal [[attribute(1)]]; +}; + +template +T spvFMul(T l, T r) +{ + return fma(l, r, T(0)); +} + +template +vec spvFMulVectorMatrix(vec v, matrix m) +{ + vec res = vec(0); + for (uint i = Rows; i > 0; --i) + { + vec tmp(0); + for (uint j = 0; j < Cols; ++j) + { + tmp[j] = m[j][i - 1]; + } + res = fma(tmp, vec(v[i - 1]), res); + } + return res; +} + +template +vec spvFMulMatrixVector(matrix m, vec v) +{ + vec res = vec(0); + for (uint i = Cols; i > 0; --i) + { + res = fma(m[i - 1], vec(v[i - 1]), res); + } + return res; +} + +template +matrix spvFMulMatrixMatrix(matrix l, matrix r) +{ + matrix res; + for (uint i = 0; i < RCols; i++) + { + vec tmp(0); + for (uint j = 0; j < LCols; j++) + { + tmp = fma(vec(r[i][j]), l[j], tmp); + } + res[i] = tmp; + } + return res; +} + +vertex main0_out main0(main0_in in [[stage_in]], constant Matrices& _22 [[buffer(0)]]) +{ + main0_out out = {}; + spvUnsafeArray OutWorldPos = {}; + out.gl_Position = spvFMulMatrixVector(spvFMulMatrixMatrix(_22.vpMatrix, _22.wMatrix), float4(in.InPos, 1.0)); + OutWorldPos[0] = spvFMulMatrixVector(_22.wMatrix, float4(in.InPos, 1.0)); + OutWorldPos[1] = spvFMulVectorMatrix(float4(in.InPos, 1.0), _22.wMatrix); + OutWorldPos[2] = spvFMulMatrixVector(_22.wMatrix3x4, in.InPos); + OutWorldPos[3] = spvFMulVectorMatrix(in.InPos, _22.wMatrix4x3); + out.OutNormal = spvFMulMatrixVector(_22.wMatrix, float4(in.InNormal, 0.0)).xyz; + out.OutWorldPos_0 = OutWorldPos[0]; + out.OutWorldPos_1 = OutWorldPos[1]; + out.OutWorldPos_2 = OutWorldPos[2]; + out.OutWorldPos_3 = OutWorldPos[3]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/float-math.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/float-math.vert new file mode 100644 index 000000000..e96fdaedc --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/float-math.vert @@ -0,0 +1,87 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct Matrices +{ + float4x4 vpMatrix; + float4x4 wMatrix; + float4x3 wMatrix4x3; + float3x4 wMatrix3x4; +}; + +struct main0_out +{ + float3 OutNormal [[user(locn0)]]; + float4 OutWorldPos_0 [[user(locn1)]]; + float4 OutWorldPos_1 [[user(locn2)]]; + float4 OutWorldPos_2 [[user(locn3)]]; + float4 OutWorldPos_3 [[user(locn4)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float3 InPos [[attribute(0)]]; + float3 InNormal [[attribute(1)]]; +}; + +vertex main0_out main0(main0_in in [[stage_in]], constant Matrices& _22 [[buffer(0)]]) +{ + main0_out out = {}; + spvUnsafeArray OutWorldPos = {}; + out.gl_Position = (_22.vpMatrix * _22.wMatrix) * float4(in.InPos, 1.0); + OutWorldPos[0] = _22.wMatrix * float4(in.InPos, 1.0); + OutWorldPos[1] = float4(in.InPos, 1.0) * _22.wMatrix; + OutWorldPos[2] = _22.wMatrix3x4 * in.InPos; + OutWorldPos[3] = in.InPos * _22.wMatrix4x3; + out.OutNormal = (_22.wMatrix * float4(in.InNormal, 0.0)).xyz; + out.OutWorldPos_0 = OutWorldPos[0]; + out.OutWorldPos_1 = OutWorldPos[1]; + out.OutWorldPos_2 = OutWorldPos[2]; + out.OutWorldPos_3 = OutWorldPos[3]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/functions.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/functions.vert index 7a598d48a..73eaa8b75 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/functions.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/functions.vert @@ -59,20 +59,23 @@ inline T spvFindSMSB(T x) } // Returns the determinant of a 2x2 matrix. -inline float spvDet2x2(float a1, float a2, float b1, float b2) +static inline __attribute__((always_inline)) +float spvDet2x2(float a1, float a2, float b1, float b2) { return a1 * b2 - b1 * a2; } // Returns the determinant of a 3x3 matrix. -inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) +static inline __attribute__((always_inline)) +float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) { return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3); } // Returns the inverse of a matrix, by using the algorithm of calculating the classical // adjoint and dividing by the determinant. The contents of the matrix are changed. -inline float4x4 spvInverse4x4(float4x4 m) +static inline __attribute__((always_inline)) +float4x4 spvInverse4x4(float4x4 m) { float4x4 adj; // The adjoint matrix (inverse after dividing by determinant) diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/in_out_array_mat.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/in_out_array_mat.vert index 71b6ab3ab..4fd1365ed 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/in_out_array_mat.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/in_out_array_mat.vert @@ -1,10 +1,49 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct UBO { float4x4 projection; @@ -38,13 +77,15 @@ struct main0_in float4 inViewMat_3 [[attribute(8)]]; }; -inline void write_deeper_in_function(thread float4x4& outTransModel, constant UBO& ubo, thread float4& color, thread float4 (&colors)[3]) +static inline __attribute__((always_inline)) +void write_deeper_in_function(thread float4x4& outTransModel, constant UBO& ubo, thread float4& color, thread spvUnsafeArray (&colors)) { outTransModel[1].y = ubo.lodBias; color = colors[2]; } -inline void write_in_function(thread float4x4& outTransModel, constant UBO& ubo, thread float4& color, thread float4 (&colors)[3], thread float3& inNormal) +static inline __attribute__((always_inline)) +void write_in_function(thread float4x4& outTransModel, constant UBO& ubo, thread float4& color, thread spvUnsafeArray (&colors), thread float3& inNormal) { outTransModel[2] = float4(inNormal, 1.0); write_deeper_in_function(outTransModel, ubo, color, colors); @@ -54,7 +95,7 @@ vertex main0_out main0(main0_in in [[stage_in]], constant UBO& ubo [[buffer(0)]] { main0_out out = {}; float4x4 outTransModel = {}; - float4 colors[3] = {}; + spvUnsafeArray colors = {}; float4x4 inViewMat = {}; colors[0] = in.colors_0; colors[1] = in.colors_1; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.frag b/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.frag index c42381d00..c160ade2d 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.frag @@ -1,13 +1,54 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Vert { float3x3 wMatrix; float4 wTmp; - float arr[4]; + spvUnsafeArray arr; }; struct main0_out diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.vert index 3d97ae6dc..69f271a83 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/interface-block-block-composites.vert @@ -1,11 +1,52 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct Vert { - float arr[3]; + spvUnsafeArray arr; float3x3 wMatrix; float4 wTmp; }; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/leaf-function.capture.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/leaf-function.capture.vert index 289d4ff55..6519e56b8 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/leaf-function.capture.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/leaf-function.capture.vert @@ -22,7 +22,8 @@ struct main0_in float3 aNormal [[attribute(1)]]; }; -inline void set_output(device float4& gl_Position, constant UBO& v_18, thread float4& aVertex, device float3& vNormal, thread float3& aNormal) +static inline __attribute__((always_inline)) +void set_output(device float4& gl_Position, constant UBO& v_18, thread float4& aVertex, device float3& vNormal, thread float3& aNormal) { gl_Position = v_18.uMVP * aVertex; vNormal = aNormal; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/read-from-row-major-array.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/read-from-row-major-array.vert index 35af2e99f..d6ade7c38 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/read-from-row-major-array.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/read-from-row-major-array.vert @@ -21,12 +21,14 @@ struct main0_in float4 a_position [[attribute(0)]]; }; -inline float compare_float(thread const float& a, thread const float& b) +static inline __attribute__((always_inline)) +float compare_float(thread const float& a, thread const float& b) { return float(abs(a - b) < 0.0500000007450580596923828125); } -inline float compare_vec3(thread const float3& a, thread const float3& b) +static inline __attribute__((always_inline)) +float compare_vec3(thread const float3& a, thread const float3& b) { float param = a.x; float param_1 = b.x; @@ -37,7 +39,8 @@ inline float compare_vec3(thread const float3& a, thread const float3& b) return (compare_float(param, param_1) * compare_float(param_2, param_3)) * compare_float(param_4, param_5); } -inline float compare_mat2x3(thread const float2x3& a, thread const float2x3& b) +static inline __attribute__((always_inline)) +float compare_mat2x3(thread const float2x3& a, thread const float2x3& b) { float3 param = a[0]; float3 param_1 = b[0]; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/resource-arrays-leaf.ios.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/resource-arrays-leaf.ios.vert index d23edacb2..8ab252f53 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/resource-arrays-leaf.ios.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/resource-arrays-leaf.ios.vert @@ -22,7 +22,8 @@ struct constant_block #endif constant int arraySize = SPIRV_CROSS_CONSTANT_ID_0; -inline void doWork(device storage_block* (&storage)[2], constant constant_block* (&constants)[4], thread const array, 3> images) +static inline __attribute__((always_inline)) +void doWork(device storage_block* (&storage)[2], constant constant_block* (&constants)[4], thread const array, 3> images) { storage[0]->baz = uint4(constants[3]->foo); storage[1]->quux = images[2].read(uint2(int2(constants[1]->bar))).xy; diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/return-array.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/return-array.vert index 0833388ac..dacb0ba30 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/return-array.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/return-array.vert @@ -1,11 +1,50 @@ #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" #include #include using namespace metal; -constant float4 _20[2] = { float4(10.0), float4(20.0) }; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +constant spvUnsafeArray _20 = spvUnsafeArray({ float4(10.0), float4(20.0) }); struct main0_out { @@ -18,81 +57,25 @@ struct main0_in float4 vInput1 [[attribute(1)]]; }; -template -inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A]) +static inline __attribute__((always_inline)) +spvUnsafeArray test() { - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } + return _20; } -template -inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A]) +static inline __attribute__((always_inline)) +spvUnsafeArray test2(thread float4& vInput0, thread float4& vInput1) { - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -template -inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A]) -{ - for (uint i = 0; i < A; i++) - { - dst[i] = src[i]; - } -} - -inline void test(thread float4 (&SPIRV_Cross_return_value)[2]) -{ - spvArrayCopyFromConstantToStack1(SPIRV_Cross_return_value, _20); -} - -inline void test2(thread float4 (&SPIRV_Cross_return_value)[2], thread float4& vInput0, thread float4& vInput1) -{ - float4 foobar[2]; + spvUnsafeArray foobar; foobar[0] = vInput0; foobar[1] = vInput1; - spvArrayCopyFromStackToStack1(SPIRV_Cross_return_value, foobar); + return foobar; } vertex main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float4 _42[2]; - test(_42); - float4 _44[2]; - test2(_44, in.vInput0, in.vInput1); - out.gl_Position = _42[0] + _44[1]; + out.gl_Position = test()[0] + test2(in.vInput0, in.vInput1)[1]; return out; } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/set_builtin_in_func.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/set_builtin_in_func.vert index 54c4cedb8..91057da2b 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/set_builtin_in_func.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/set_builtin_in_func.vert @@ -11,7 +11,8 @@ struct main0_out float gl_PointSize [[point_size]]; }; -inline void write_outblock(thread float4& gl_Position, thread float& gl_PointSize) +static inline __attribute__((always_inline)) +void write_outblock(thread float4& gl_Position, thread float& gl_PointSize) { gl_PointSize = 1.0; gl_Position = float4(gl_PointSize); diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vert/texture_buffer.vert b/3rdparty/spirv-cross/reference/shaders-msl/vert/texture_buffer.vert index 677a2f8fd..3b3d92b56 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vert/texture_buffer.vert +++ b/3rdparty/spirv-cross/reference/shaders-msl/vert/texture_buffer.vert @@ -11,7 +11,8 @@ struct main0_out }; // Returns 2D texture coords corresponding to 1D texel buffer coords -inline uint2 spvTexelBufferCoord(uint tc) +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } diff --git a/3rdparty/spirv-cross/reference/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag b/3rdparty/spirv-cross/reference/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag index 23c554940..67895e3e9 100644 --- a/3rdparty/spirv-cross/reference/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag +++ b/3rdparty/spirv-cross/reference/shaders-msl/vulkan/frag/basic.multiview.nocompat.vk.frag @@ -1,8 +1,49 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + #include #include using namespace metal; +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + struct main0_out { float4 FragColor [[color(0)]]; @@ -20,7 +61,7 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]], constant uint* spvViewMask [[buffer(24)]], texture2d uTex [[texture(0)]], sampler uTexSmplr [[sampler(0)]], uint gl_ViewIndex [[render_target_array_index]]) { main0_out out = {}; - float2 vTex[4] = {}; + spvUnsafeArray vTex = {}; vTex[0] = in.vTex_0; vTex[1] = in.vTex_1; vTex[2] = in.vTex_2; diff --git a/3rdparty/spirv-cross/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/3rdparty/spirv-cross/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag new file mode 100644 index 000000000..0d3958b5b --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -0,0 +1,31 @@ +#version 450 + +struct EmptyStructTest +{ + int empty_struct_member; +}; + +struct EmptyStruct2Test +{ + EmptyStructTest _m0; +}; + +float GetValue(EmptyStruct2Test self) +{ + return 0.0; +} + +float GetValue_1(EmptyStruct2Test self) +{ + return 0.0; +} + +void main() +{ + EmptyStructTest _25 = EmptyStructTest(0); + EmptyStruct2Test emptyStruct; + float value = GetValue(emptyStruct); + value = GetValue_1(EmptyStruct2Test(_25)); + value = GetValue_1(EmptyStruct2Test(EmptyStructTest(0))); +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/accesschain-invalid-expression.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/accesschain-invalid-expression.asm.frag new file mode 100644 index 000000000..1af8db758 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/accesschain-invalid-expression.asm.frag @@ -0,0 +1,366 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_MobileDirectionalLight +{ + float4 MobileDirectionalLight_DirectionalLightColor; + float4 MobileDirectionalLight_DirectionalLightDirectionAndShadowTransition; + float4 MobileDirectionalLight_DirectionalLightShadowSize; + float4 MobileDirectionalLight_DirectionalLightDistanceFadeMAD; + float4 MobileDirectionalLight_DirectionalLightShadowDistances; + float4x4 MobileDirectionalLight_DirectionalLightScreenToShadow[4]; +}; + +struct type_Globals +{ + int NumDynamicPointLights; + float4 LightPositionAndInvRadius[4]; + float4 LightColorAndFalloffExponent[4]; + float4 MobileReflectionParams; +}; + +constant float3 _136 = {}; +constant float4 _137 = {}; +constant float _138 = {}; +constant float3 _139 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + float2 in_var_TEXCOORD0 [[user(locn0)]]; + float4 in_var_TEXCOORD7 [[user(locn1)]]; + float4 in_var_TEXCOORD8 [[user(locn2)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_MobileDirectionalLight& MobileDirectionalLight [[buffer(1)]], constant type_Globals& _Globals [[buffer(2)]], texture2d MobileDirectionalLight_DirectionalLightShadowTexture [[texture(0)]], texture2d Material_Texture2D_0 [[texture(1)]], texture2d Material_Texture2D_1 [[texture(2)]], texturecube ReflectionCubemap [[texture(3)]], sampler MobileDirectionalLight_DirectionalLightShadowSampler [[sampler(0)]], sampler Material_Texture2D_0Sampler [[sampler(1)]], sampler Material_Texture2D_1Sampler [[sampler(2)]], sampler ReflectionCubemapSampler [[sampler(3)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + float4 _177 = float4((((gl_FragCoord.xy - View.View_ViewRectMin.xy) * View.View_ViewSizeAndInvSize.zw) - float2(0.5)) * float2(2.0, -2.0), _138, 1.0) * float4(gl_FragCoord.w); + float3 _181 = normalize(-in.in_var_TEXCOORD8.xyz); + float2 _190 = (Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (in.in_var_TEXCOORD0 * float2(10.0))).xy * float2(2.0)) - float2(1.0); + float3 _206 = normalize(float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 1.0)) * (((float4(_190, sqrt(fast::clamp(1.0 - dot(_190, _190), 0.0, 1.0)), 1.0).xyz * float3(0.300000011920928955078125, 0.300000011920928955078125, 1.0)) * float3(View.View_NormalOverrideParameter.w)) + View.View_NormalOverrideParameter.xyz)); + float _208 = dot(_206, _181); + float _219 = mix(0.4000000059604644775390625, 1.0, Material_Texture2D_1.sample(Material_Texture2D_1Sampler, (in.in_var_TEXCOORD0 * float2(20.0))).x); + float4 _223 = Material_Texture2D_1.sample(Material_Texture2D_1Sampler, (in.in_var_TEXCOORD0 * float2(5.0))); + float _224 = _177.w; + float _228 = fast::min(fast::max((_224 - 24.0) * 0.000666666659526526927947998046875, 0.0), 1.0); + float _229 = _223.y; + float4 _233 = Material_Texture2D_1.sample(Material_Texture2D_1Sampler, (in.in_var_TEXCOORD0 * float2(0.5))); + float _235 = _233.y; + float _253 = fast::clamp((fast::min(fast::max(mix(0.0, 0.5, _235) + mix(mix(0.699999988079071044921875, 1.0, _229), 1.0, _228), 0.0), 1.0) * View.View_RoughnessOverrideParameter.y) + View.View_RoughnessOverrideParameter.x, 0.119999997317790985107421875, 1.0); + float2 _257 = (float2(_253) * float2(-1.0, -0.0274999998509883880615234375)) + float2(1.0, 0.0425000004470348358154296875); + float _258 = _257.x; + float3 _270 = (fast::clamp(float3(mix(_219, 1.0 - _219, mix(_229, 1.0, _228)) * (mix(0.2949999868869781494140625, 0.660000026226043701171875, mix(_235 + mix(_229, 0.0, _228), 0.5, 0.5)) * 0.5)), float3(0.0), float3(1.0)) * float3(View.View_DiffuseOverrideParameter.w)) + View.View_DiffuseOverrideParameter.xyz; + float3 _275 = float3(((fast::min(_258 * _258, exp2((-9.27999973297119140625) * fast::max(_208, 0.0))) * _258) + _257.y) * View.View_SpecularOverrideParameter.w) + View.View_SpecularOverrideParameter.xyz; + float _276 = _275.x; + float4 _303; + int _286 = 0; + for (;;) + { + if (_286 < 2) + { + if (_224 < MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowDistances[uint(_286)]) + { + _303 = MobileDirectionalLight.MobileDirectionalLight_DirectionalLightScreenToShadow[_286] * float4(_177.xy, _224, 1.0); + break; + } + _286++; + continue; + } + else + { + _303 = float4(0.0); + break; + } + } + float _423; + if (_303.z > 0.0) + { + float2 _311 = _303.xy * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.xy; + float2 _312 = fract(_311); + float2 _313 = floor(_311); + float3 _320 = _139; + _320.x = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(-0.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _326 = _320; + _326.y = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(0.5, -0.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _332 = _326; + _332.z = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(1.5, -0.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _335 = float3(MobileDirectionalLight.MobileDirectionalLight_DirectionalLightDirectionAndShadowTransition.w); + float3 _337 = float3((fast::min(_303.z, 0.999989986419677734375) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightDirectionAndShadowTransition.w) - 1.0); + float3 _339 = fast::clamp((_332 * _335) - _337, float3(0.0), float3(1.0)); + float3 _345 = _139; + _345.x = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(-0.5, 0.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _351 = _345; + _351.y = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(0.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _357 = _351; + _357.z = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(1.5, 0.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _360 = fast::clamp((_357 * _335) - _337, float3(0.0), float3(1.0)); + float3 _366 = _139; + _366.x = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(-0.5, 1.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _372 = _366; + _372.y = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(0.5, 1.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _378 = _372; + _378.z = MobileDirectionalLight_DirectionalLightShadowTexture.sample(MobileDirectionalLight_DirectionalLightShadowSampler, ((_313 + float2(1.5)) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightShadowSize.zw), level(0.0)).x; + float3 _381 = fast::clamp((_378 * _335) - _337, float3(0.0), float3(1.0)); + float _383 = _312.x; + float _384 = 1.0 - _383; + float3 _399 = _136; + _399.x = ((_339.x * _384) + _339.y) + (_339.z * _383); + float3 _403 = _399; + _403.y = ((_360.x * _384) + _360.y) + (_360.z * _383); + float3 _407 = _403; + _407.z = ((_381.x * _384) + _381.y) + (_381.z * _383); + float _408 = _312.y; + float _420 = fast::clamp((_224 * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightDistanceFadeMAD.x) + MobileDirectionalLight.MobileDirectionalLight_DirectionalLightDistanceFadeMAD.y, 0.0, 1.0); + _423 = mix(fast::clamp(0.25 * dot(_407, float3(1.0 - _408, 1.0, _408)), 0.0, 1.0), 1.0, _420 * _420); + } + else + { + _423 = 1.0; + } + float3 _429 = normalize(_181 + MobileDirectionalLight.MobileDirectionalLight_DirectionalLightDirectionAndShadowTransition.xyz); + float _439 = (_253 * 0.25) + 0.25; + float3 _440 = cross(_206, _429); + float _442 = _253 * _253; + float _443 = fast::max(0.0, dot(_206, _429)) * _442; + float _446 = _442 / (dot(_440, _440) + (_443 * _443)); + bool _458 = float(_Globals.MobileReflectionParams.w > 0.0) != 0.0; + float4 _468 = ReflectionCubemap.sample(ReflectionCubemapSampler, ((-_181) + ((_206 * float3(_208)) * float3(2.0))), level(((_458 ? _Globals.MobileReflectionParams.w : View.View_ReflectionCubemapMaxMip) - 1.0) - (1.0 - (1.2000000476837158203125 * log2(_253))))); + float3 _481; + if (_458) + { + _481 = _468.xyz * View.View_SkyLightColor.xyz; + } + else + { + float3 _476 = _468.xyz * float3(_468.w * 16.0); + _481 = _476 * _476; + } + float3 _484 = float3(_276); + float3 _488; + _488 = ((float3(_423 * fast::max(0.0, dot(_206, MobileDirectionalLight.MobileDirectionalLight_DirectionalLightDirectionAndShadowTransition.xyz))) * MobileDirectionalLight.MobileDirectionalLight_DirectionalLightColor.xyz) * (_270 + float3(_276 * (_439 * fast::min(_446 * _446, 65504.0))))) + ((_481 * float3(fast::clamp(1.0, 0.0, 1.0))) * _484); + float3 _507; + float _509; + float _511; + float _537; + int _491 = 0; + for (;;) + { + if (_491 < _Globals.NumDynamicPointLights) + { + float3 _501 = _Globals.LightPositionAndInvRadius[_491].xyz - (in.in_var_TEXCOORD8.xyz - float3(View.View_PreViewTranslation)); + float _502 = dot(_501, _501); + float3 _505 = _501 * float3(rsqrt(_502)); + _507 = normalize(_181 + _505); + _509 = fast::max(0.0, dot(_206, _505)); + _511 = fast::max(0.0, dot(_206, _507)); + if (_Globals.LightColorAndFalloffExponent[_491].w == 0.0) + { + float _531 = _502 * (_Globals.LightPositionAndInvRadius[_491].w * _Globals.LightPositionAndInvRadius[_491].w); + float _534 = fast::clamp(1.0 - (_531 * _531), 0.0, 1.0); + _537 = (1.0 / (_502 + 1.0)) * (_534 * _534); + } + else + { + float3 _521 = _501 * float3(_Globals.LightPositionAndInvRadius[_491].w); + _537 = pow(1.0 - fast::clamp(dot(_521, _521), 0.0, 1.0), _Globals.LightColorAndFalloffExponent[_491].w); + } + float3 _544 = cross(_206, _507); + float _546 = _511 * _442; + float _549 = _442 / (dot(_544, _544) + (_546 * _546)); + _488 += fast::min(float3(65000.0), ((float3(_537 * _509) * _Globals.LightColorAndFalloffExponent[_491].xyz) * float3(0.3183098733425140380859375)) * (_270 + float3(_276 * (_439 * fast::min(_549 * _549, 65504.0))))); + _491++; + continue; + } + else + { + break; + } + } + float3 _567 = (mix(_488 + fast::max(float3(0.0), float3(0.0)), _270 + _484, float3(View.View_UnlitViewmodeMask)) * float3(in.in_var_TEXCOORD7.w)) + in.in_var_TEXCOORD7.xyz; + float4 _571 = float4(_567.x, _567.y, _567.z, _137.w); + _571.w = fast::min(in.in_var_TEXCOORD8.w, 65500.0); + out.out_var_SV_Target0 = _571; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/array-copy-error.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/array-copy-error.asm.frag new file mode 100644 index 000000000..73dc2eee1 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/array-copy-error.asm.frag @@ -0,0 +1,350 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_PrimitiveDither +{ + float PrimitiveDither_LODFactor; +}; + +struct type_PrimitiveFade +{ + float2 PrimitiveFade_FadeTimeScaleBias; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[9]; + float4 Material_ScalarExpressions[3]; +}; + +constant float _98 = {}; +constant float _103 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; + float gl_FragDepth [[depth(less)]]; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD6 [[user(locn0)]]; + float4 in_var_TEXCOORD7 [[user(locn1)]]; + float4 in_var_TEXCOORD10_centroid [[user(locn2)]]; + float4 in_var_TEXCOORD11_centroid [[user(locn3)]]; + float4 in_var_TEXCOORD0_0 [[user(locn4)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_PrimitiveDither& PrimitiveDither [[buffer(1)]], constant type_PrimitiveFade& PrimitiveFade [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture2d Material_Texture2D_0 [[texture(0)]], texture2d Material_Texture2D_3 [[texture(1)]], sampler Material_Texture2D_0Sampler [[sampler(0)]], sampler Material_Texture2D_3Sampler [[sampler(1)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + spvUnsafeArray in_var_TEXCOORD0 = {}; + in_var_TEXCOORD0[0] = in.in_var_TEXCOORD0_0; + float2 _135 = gl_FragCoord.xy - View.View_ViewRectMin.xy; + float4 _140 = float4(_103, _103, gl_FragCoord.z, 1.0) * float4(gl_FragCoord.w); + float4 _144 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0); + float3 _148 = _144.xyz / float3(_144.w); + float3 _149 = _148 - float3(View.View_PreViewTranslation); + float3 _151 = normalize(-_148); + float3 _152 = _151 * float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz); + float _170 = mix(Material.Material_ScalarExpressions[0].y, Material.Material_ScalarExpressions[0].z, fast::min(fast::max(abs(dot(_151, in.in_var_TEXCOORD11_centroid.xyz)), 0.0), 1.0)); + float _172 = 1.0 / _170; + float2 _174 = (float2(Material.Material_ScalarExpressions[0].x) * ((_152.xy * float2(-1.0)) / float2(_152.z))) * float2(_172); + float _180_copy; + float2 _183; + _183 = float2(0.0); + float _188; + float _211; + float2 _212; + float _180 = 1.0; + int _185 = 0; + float _187 = 1.0; + float _189 = 1.0; + for (;;) + { + if (float(_185) < (floor(_170) + 2.0)) + { + _188 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _183), gradient2d(dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)), dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)))).y; + if (_180 < _188) + { + float _201 = _188 - _180; + float _203 = _201 / ((_189 - _187) + _201); + _211 = (_189 * _203) + (_180 * (1.0 - _203)); + _212 = _183 - (float2(_203) * _174); + break; + } + _180_copy = _180; + _180 -= _172; + _183 += _174; + _185++; + _187 = _188; + _189 = _180_copy; + continue; + } + else + { + _211 = _98; + _212 = _183; + break; + } + } + float4 _218 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _212.xy), bias(View.View_MaterialTextureMipBias)); + float2 _229 = _135 + float2(View.View_TemporalAAParams.x); + float _237 = float((uint(_229.x) + (2u * uint(_229.y))) % 5u); + float2 _238 = _135 * float2(0.015625); + float4 _242 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float4 _254 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float3 _272 = float3(_212, (1.0 - _211) * Material.Material_ScalarExpressions[0].x); + float2 _275 = dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _276 = abs(_275); + float3 _279 = dfdx(_149); + float2 _283 = dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _284 = abs(_283); + float3 _287 = dfdy(_149); + if (PrimitiveDither.PrimitiveDither_LODFactor != 0.0) + { + if (abs(PrimitiveDither.PrimitiveDither_LODFactor) > 0.001000000047497451305389404296875) + { + float _317 = fract(cos(dot(floor(gl_FragCoord.xy), float2(347.834503173828125, 3343.28369140625))) * 1000.0); + if ((float((PrimitiveDither.PrimitiveDither_LODFactor < 0.0) ? ((PrimitiveDither.PrimitiveDither_LODFactor + 1.0) > _317) : (PrimitiveDither.PrimitiveDither_LODFactor < _317)) - 0.001000000047497451305389404296875) < 0.0) + { + discard_fragment(); + } + } + } + if ((((_218.z + ((fast::min(fast::max(1.0 - (_218.x * Material.Material_ScalarExpressions[2].y), 0.0), 1.0) + ((_237 + (_242.x * Material.Material_ScalarExpressions[2].z)) * 0.16666667163372039794921875)) + (-0.5))) * ((fast::clamp((View.View_RealTime * PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.x) + PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.y, 0.0, 1.0) + ((_237 + _254.x) * 0.16666667163372039794921875)) + (-0.5))) - 0.33329999446868896484375) < 0.0) + { + discard_fragment(); + } + float2 _351 = ((((in.in_var_TEXCOORD6.xy / float2(in.in_var_TEXCOORD6.w)) - View.View_TemporalAAJitter.xy) - ((in.in_var_TEXCOORD7.xy / float2(in.in_var_TEXCOORD7.w)) - View.View_TemporalAAJitter.zw)) * float2(0.2495000064373016357421875)) + float2(0.49999237060546875); + out.gl_FragDepth = fast::min(_140.z / (_140.w + (sqrt(dot(_272, _272)) / (fast::max(sqrt(dot(_276, _276)) / sqrt(dot(_279, _279)), sqrt(dot(_284, _284)) / sqrt(dot(_287, _287))) / abs(dot(float3x3(View.View_ViewToTranslatedWorld[0].xyz, View.View_ViewToTranslatedWorld[1].xyz, View.View_ViewToTranslatedWorld[2].xyz) * float3(0.0, 0.0, 1.0), _151))))), gl_FragCoord.z); + out.out_var_SV_Target0 = float4(_351.x, _351.y, float2(0.0).x, float2(0.0).y); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/depth-compare.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/depth-compare.asm.frag new file mode 100644 index 000000000..bdeccc2f5 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/depth-compare.asm.frag @@ -0,0 +1,314 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Globals +{ + float3 SoftTransitionScale; + float4x4 ShadowViewProjectionMatrices[6]; + float InvShadowmapResolution; + float ShadowFadeFraction; + float ShadowSharpen; + float4 LightPositionAndInvRadius; + float2 ProjectionDepthBiasParameters; + float4 PointLightDepthBiasAndProjParameters; +}; + +constant float4 _107 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +fragment main0_out main0(constant type_View& View [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d SceneTexturesStruct_SceneDepthTexture [[texture(0)]], texture2d SceneTexturesStruct_GBufferATexture [[texture(1)]], texture2d SceneTexturesStruct_GBufferBTexture [[texture(2)]], texture2d SceneTexturesStruct_GBufferDTexture [[texture(3)]], depthcube ShadowDepthCubeTexture [[texture(4)]], texture2d SSProfilesTexture [[texture(5)]], sampler SceneTexturesStruct_SceneDepthTextureSampler [[sampler(0)]], sampler SceneTexturesStruct_GBufferATextureSampler [[sampler(1)]], sampler SceneTexturesStruct_GBufferBTextureSampler [[sampler(2)]], sampler SceneTexturesStruct_GBufferDTextureSampler [[sampler(3)]], sampler ShadowDepthTextureSampler [[sampler(4)]], sampler ShadowDepthCubeTextureSampler [[sampler(5)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + float2 _114 = gl_FragCoord.xy * View.View_BufferSizeAndInvSize.zw; + float4 _118 = SceneTexturesStruct_SceneDepthTexture.sample(SceneTexturesStruct_SceneDepthTextureSampler, _114, level(0.0)); + float _119 = _118.x; + float _133 = ((_119 * View.View_InvDeviceZToWorldZTransform.x) + View.View_InvDeviceZToWorldZTransform.y) + (1.0 / ((_119 * View.View_InvDeviceZToWorldZTransform.z) - View.View_InvDeviceZToWorldZTransform.w)); + float4 _147 = View.View_ScreenToWorld * float4(((_114 - View.View_ScreenPositionScaleBias.wz) / View.View_ScreenPositionScaleBias.xy) * float2(_133), _133, 1.0); + float3 _148 = _147.xyz; + float3 _152 = _Globals.LightPositionAndInvRadius.xyz - _148; + float _158 = length(_152); + bool _160 = (_158 * _Globals.LightPositionAndInvRadius.w) < 1.0; + float _207; + if (_160) + { + float3 _165 = abs(_152); + float _166 = _165.x; + float _167 = _165.y; + float _168 = _165.z; + float _170 = fast::max(_166, fast::max(_167, _168)); + int _189; + if (_170 == _166) + { + _189 = (_166 == _152.x) ? 0 : 1; + } + else + { + int _185; + if (_170 == _167) + { + _185 = (_167 == _152.y) ? 2 : 3; + } + else + { + _185 = (_168 == _152.z) ? 4 : 5; + } + _189 = _185; + } + float4 _196 = _Globals.ShadowViewProjectionMatrices[_189] * float4(_147.xyz, 1.0); + float _198 = _196.w; + _207 = ShadowDepthCubeTexture.sample_compare(ShadowDepthCubeTextureSampler, (_152 / float3(_158)), (_196.z / _198) + ((-_Globals.PointLightDepthBiasAndProjParameters.x) / _198), level(0.0)); + } + else + { + _207 = 1.0; + } + float _213 = fast::clamp(((_207 - 0.5) * _Globals.ShadowSharpen) + 0.5, 0.0, 1.0); + float _218 = sqrt(mix(1.0, _213 * _213, _Globals.ShadowFadeFraction)); + float4 _219 = _107; + _219.z = _218; + float3 _236 = normalize((SceneTexturesStruct_GBufferATexture.sample(SceneTexturesStruct_GBufferATextureSampler, _114, level(0.0)).xyz * float3(2.0)) - float3(1.0)); + uint _240 = uint(round(SceneTexturesStruct_GBufferBTexture.sample(SceneTexturesStruct_GBufferBTextureSampler, _114, level(0.0)).w * 255.0)); + bool _248 = (_240 & 15u) == 5u; + float _448; + if (_248) + { + float4 _260 = SSProfilesTexture.read(uint2(int3(1, int(uint((select(float4(0.0), SceneTexturesStruct_GBufferDTexture.sample(SceneTexturesStruct_GBufferDTextureSampler, _114, level(0.0)), bool4(!(((_240 & 4294967280u) & 16u) != 0u))).x * 255.0) + 0.5)), 0).xy), 0); + float _263 = _260.y * 0.5; + float _274 = pow(fast::clamp(dot(-(_152 * float3(rsqrt(dot(_152, _152)))), _236), 0.0, 1.0), 1.0); + float _445; + if (_160) + { + float3 _278 = _152 / float3(_158); + float3 _280 = normalize(cross(_278, float3(0.0, 0.0, 1.0))); + float3 _284 = float3(_Globals.InvShadowmapResolution); + float3 _285 = _280 * _284; + float3 _286 = cross(_280, _278) * _284; + float3 _287 = abs(_278); + float _288 = _287.x; + float _289 = _287.y; + float _290 = _287.z; + float _292 = fast::max(_288, fast::max(_289, _290)); + int _311; + if (_292 == _288) + { + _311 = (_288 == _278.x) ? 0 : 1; + } + else + { + int _307; + if (_292 == _289) + { + _307 = (_289 == _278.y) ? 2 : 3; + } + else + { + _307 = (_290 == _278.z) ? 4 : 5; + } + _311 = _307; + } + float4 _318 = _Globals.ShadowViewProjectionMatrices[_311] * float4(_148 - (_236 * float3(_263)), 1.0); + float _323 = _260.x * (10.0 / _Globals.LightPositionAndInvRadius.w); + float _329 = (1.0 / (((_318.z / _318.w) * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w; + float _342 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, (_278 + (_286 * float3(2.5))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _364 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(2.3776409626007080078125))) + (_286 * float3(0.77254199981689453125))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _387 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(1.46946299076080322265625))) + (_286 * float3(-2.0225429534912109375))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _410 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(-1.46946299076080322265625))) + (_286 * float3(-2.02254199981689453125))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + float _433 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, ((_278 + (_285 * float3(-2.3776409626007080078125))) + (_286 * float3(0.772543013095855712890625))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; + _445 = (((((fast::clamp(abs((_342 > 0.0) ? (_342 + _263) : fast::max(0.0, (_342 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25) + (fast::clamp(abs((_364 > 0.0) ? (_364 + _263) : fast::max(0.0, (_364 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) + (fast::clamp(abs((_387 > 0.0) ? (_387 + _263) : fast::max(0.0, (_387 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) + (fast::clamp(abs((_410 > 0.0) ? (_410 + _263) : fast::max(0.0, (_410 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) + (fast::clamp(abs((_433 > 0.0) ? (_433 + _263) : fast::max(0.0, (_433 * _274) + _263)), 0.1500000059604644775390625, 5.0) + 0.25)) * 0.20000000298023223876953125; + } + else + { + _445 = 1.0; + } + _448 = 1.0 - (_445 * 0.20000000298023223876953125); + } + else + { + _448 = 1.0; + } + float4 _451 = float4(float3(1.0).x, float3(1.0).y, _219.z, float3(1.0).z); + _451.w = _248 ? sqrt(_448) : _218; + out.out_var_SV_Target0 = _451; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag new file mode 100644 index 000000000..210d4f98d --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag @@ -0,0 +1,1365 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_Globals +{ + float4 MappingPolynomial; + float3 InverseGamma; + float4 ColorMatrixR_ColorCurveCd1; + float4 ColorMatrixG_ColorCurveCd3Cm3; + float4 ColorMatrixB_ColorCurveCm2; + float4 ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3; + float4 ColorCurve_Ch1_Ch2; + float4 ColorShadow_Luma; + float4 ColorShadow_Tint1; + float4 ColorShadow_Tint2; + float FilmSlope; + float FilmToe; + float FilmShoulder; + float FilmBlackClip; + float FilmWhiteClip; + packed_float3 ColorScale; + float4 OverlayColor; + float WhiteTemp; + float WhiteTint; + float4 ColorSaturation; + float4 ColorContrast; + float4 ColorGamma; + float4 ColorGain; + float4 ColorOffset; + float4 ColorSaturationShadows; + float4 ColorContrastShadows; + float4 ColorGammaShadows; + float4 ColorGainShadows; + float4 ColorOffsetShadows; + float4 ColorSaturationMidtones; + float4 ColorContrastMidtones; + float4 ColorGammaMidtones; + float4 ColorGainMidtones; + float4 ColorOffsetMidtones; + float4 ColorSaturationHighlights; + float4 ColorContrastHighlights; + float4 ColorGammaHighlights; + float4 ColorGainHighlights; + float4 ColorOffsetHighlights; + float ColorCorrectionShadowsMax; + float ColorCorrectionHighlightsMin; + uint OutputDevice; + uint OutputGamut; + float BlueCorrection; + float ExpandGamut; +}; + +constant spvUnsafeArray _475 = spvUnsafeArray({ -4.0, -4.0, -3.1573765277862548828125, -0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875 }); +constant spvUnsafeArray _476 = spvUnsafeArray({ -0.718548238277435302734375, 2.0810306072235107421875, 3.66812419891357421875, 4.0, 4.0, 4.0 }); +constant spvUnsafeArray _479 = spvUnsafeArray({ -4.97062206268310546875, -3.0293781757354736328125, -2.1261999607086181640625, -1.5104999542236328125, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _480 = spvUnsafeArray({ 0.80891323089599609375, 1.19108676910400390625, 1.5683000087738037109375, 1.94830000400543212890625, 2.308300018310546875, 2.63840007781982421875, 2.85949993133544921875, 2.9872608184814453125, 3.0127391815185546875, 3.0127391815185546875 }); +constant spvUnsafeArray _482 = spvUnsafeArray({ -2.3010299205780029296875, -2.3010299205780029296875, -1.9312000274658203125, -1.5204999446868896484375, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _483 = spvUnsafeArray({ 0.801995217800140380859375, 1.19800484180450439453125, 1.5943000316619873046875, 1.99730002880096435546875, 2.3782999515533447265625, 2.7683999538421630859375, 3.0515000820159912109375, 3.2746293544769287109375, 3.32743072509765625, 3.32743072509765625 }); + +constant float3 _391 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + float2 in_var_TEXCOORD0 [[user(locn0), center_no_perspective]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globals [[buffer(0)]], uint gl_Layer [[render_target_array_index]]) +{ + main0_out out = {}; + float3x3 _546 = float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * float3x3(float3(1.01303005218505859375, 0.0061053098179399967193603515625, -0.014971000142395496368408203125), float3(0.0076982299797236919403076171875, 0.99816501140594482421875, -0.005032029934227466583251953125), float3(-0.0028413101099431514739990234375, 0.0046851597726345062255859375, 0.92450702190399169921875)); + float3x3 _547 = _546 * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _548 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(0.98722398281097412109375, -0.0061132698319852352142333984375, 0.01595330052077770233154296875), float3(-0.007598360069096088409423828125, 1.00186002254486083984375, 0.0053300200961530208587646484375), float3(0.003072570078074932098388671875, -0.0050959498621523380279541015625, 1.0816800594329833984375)); + float3x3 _549 = _548 * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)); + float3x3 _550 = float3x3(float3(0.952552378177642822265625, 0.0, 9.25), float3(0.3439664542675018310546875, 0.728166103363037109375, -0.07213254272937774658203125), float3(0.0, 0.0, 1.00882518291473388671875)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _551 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625)); + float3x3 _576; + for (;;) + { + if (_Globals.OutputGamut == 1u) + { + _576 = _548 * float3x3(float3(2.493396282196044921875, -0.931345880031585693359375, -0.4026944935321807861328125), float3(-0.829486787319183349609375, 1.76265966892242431640625, 0.02362460084259510040283203125), float3(0.0358506999909877777099609375, -0.076182700693607330322265625, 0.957014024257659912109375)); + break; + } + else + { + if (_Globals.OutputGamut == 2u) + { + _576 = _548 * float3x3(float3(1.71660840511322021484375, -0.3556621074676513671875, -0.253360092639923095703125), float3(-0.666682898998260498046875, 1.61647760868072509765625, 0.01576850004494190216064453125), float3(0.017642199993133544921875, -0.04277630150318145751953125, 0.94222867488861083984375)); + break; + } + else + { + if (_Globals.OutputGamut == 3u) + { + _576 = float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625)); + break; + } + else + { + if (_Globals.OutputGamut == 4u) + { + _576 = float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 1.0)); + break; + } + else + { + _576 = _549; + break; + } + } + } + } + } + float3 _577 = float4((in.in_var_TEXCOORD0 - float2(0.015625)) * float2(1.03225803375244140625), float(gl_Layer) * 0.0322580635547637939453125, 0.0).xyz; + float3 _599; + if (_Globals.OutputDevice >= 3u) + { + float3 _591 = pow(_577, float3(0.0126833133399486541748046875)); + _599 = pow(fast::max(float3(0.0), _591 - float3(0.8359375)) / (float3(18.8515625) - (float3(18.6875) * _591)), float3(6.277394771575927734375)) * float3(10000.0); + } + else + { + _599 = (exp2((_577 - float3(0.434017598628997802734375)) * float3(14.0)) * float3(0.180000007152557373046875)) - (exp2(float3(-6.0762462615966796875)) * float3(0.180000007152557373046875)); + } + float _602 = _Globals.WhiteTemp * 1.00055634975433349609375; + float _616 = (_602 <= 7000.0) ? (0.24406300485134124755859375 + ((99.1100006103515625 + ((2967800.0 - (4604438528.0 / _Globals.WhiteTemp)) / _602)) / _602)) : (0.23703999817371368408203125 + ((247.4799957275390625 + ((1901800.0 - (2005284352.0 / _Globals.WhiteTemp)) / _602)) / _602)); + float _633 = ((0.860117733478546142578125 + (0.00015411825734190642833709716796875 * _Globals.WhiteTemp)) + ((1.2864121856637211749330163002014e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 + (0.0008424202096648514270782470703125 * _Globals.WhiteTemp)) + ((7.0814513719597016461193561553955e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _644 = ((0.317398726940155029296875 + (4.25 * _Globals.WhiteTemp)) + ((4.2048167614439080352894961833954e-08 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 - (2.8974181986995972692966461181641e-05 * _Globals.WhiteTemp)) + ((1.6145605741257895715534687042236e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _649 = ((2.0 * _633) - (8.0 * _644)) + 4.0; + float2 _653 = float2((3.0 * _633) / _649, (2.0 * _644) / _649); + float2 _660 = normalize(float2(_633, _644)); + float _665 = _633 + (((-_660.y) * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _669 = _644 + ((_660.x * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _674 = ((2.0 * _665) - (8.0 * _669)) + 4.0; + float2 _680 = select(float2(_616, ((((-3.0) * _616) * _616) + (2.86999988555908203125 * _616)) - 0.2750000059604644775390625), _653, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _665) / _674, (2.0 * _669) / _674) - _653); + float _681 = _680.x; + float _682 = _680.y; + float _683 = fast::max(_682, 1.0000000133514319600180897396058e-10); + float3 _685 = _391; + _685.x = _681 / _683; + float3 _686 = _685; + _686.y = 1.0; + float3 _690 = _686; + _690.z = ((1.0 - _681) - _682) / _683; + float _691 = fast::max(0.328999996185302734375, 1.0000000133514319600180897396058e-10); + float3 _693 = _391; + _693.x = 0.3127000033855438232421875 / _691; + float3 _694 = _693; + _694.y = 1.0; + float3 _696 = _694; + _696.z = 0.3582999706268310546875 / _691; + float3 _697 = _690 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _698 = _696 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _717 = (_599 * ((float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * ((float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)) * float3x3(float3(_698.x / _697.x, 0.0, 0.0), float3(0.0, _698.y / _697.y, 0.0), float3(0.0, 0.0, _698.z / _697.z))) * float3x3(float3(0.986992895603179931640625, -0.14705429971218109130859375, 0.15996269881725311279296875), float3(0.4323053061962127685546875, 0.518360316753387451171875, 0.049291200935840606689453125), float3(-0.00852870009839534759521484375, 0.0400427989661693572998046875, 0.968486726284027099609375)))) * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)))) * _547; + float3 _745; + if (_Globals.ColorShadow_Tint2.w != 0.0) + { + float _724 = dot(_717, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float3 _727 = (_717 / float3(_724)) - float3(1.0); + _745 = mix(_717, _717 * (_549 * (float3x3(float3(0.544169127941131591796875, 0.23959259688854217529296875, 0.16669429838657379150390625), float3(0.23946559429168701171875, 0.702153027057647705078125, 0.058381401002407073974609375), float3(-0.0023439000360667705535888671875, 0.0361833982169628143310546875, 1.05521833896636962890625)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)))), float3((1.0 - exp2((-4.0) * dot(_727, _727))) * (1.0 - exp2((((-4.0) * _Globals.ExpandGamut) * _724) * _724)))); + } + else + { + _745 = _717; + } + float _746 = dot(_745, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float4 _751 = _Globals.ColorSaturationShadows * _Globals.ColorSaturation; + float4 _756 = _Globals.ColorContrastShadows * _Globals.ColorContrast; + float4 _761 = _Globals.ColorGammaShadows * _Globals.ColorGamma; + float4 _766 = _Globals.ColorGainShadows * _Globals.ColorGain; + float4 _771 = _Globals.ColorOffsetShadows + _Globals.ColorOffset; + float3 _772 = float3(_746); + float _804 = smoothstep(0.0, _Globals.ColorCorrectionShadowsMax, _746); + float4 _808 = _Globals.ColorSaturationHighlights * _Globals.ColorSaturation; + float4 _811 = _Globals.ColorContrastHighlights * _Globals.ColorContrast; + float4 _814 = _Globals.ColorGammaHighlights * _Globals.ColorGamma; + float4 _817 = _Globals.ColorGainHighlights * _Globals.ColorGain; + float4 _820 = _Globals.ColorOffsetHighlights + _Globals.ColorOffset; + float _852 = smoothstep(_Globals.ColorCorrectionHighlightsMin, 1.0, _746); + float4 _855 = _Globals.ColorSaturationMidtones * _Globals.ColorSaturation; + float4 _858 = _Globals.ColorContrastMidtones * _Globals.ColorContrast; + float4 _861 = _Globals.ColorGammaMidtones * _Globals.ColorGamma; + float4 _864 = _Globals.ColorGainMidtones * _Globals.ColorGain; + float4 _867 = _Globals.ColorOffsetMidtones + _Globals.ColorOffset; + float3 _905 = ((((pow(pow(fast::max(float3(0.0), mix(_772, _745, _751.xyz * float3(_751.w))) * float3(5.5555553436279296875), _756.xyz * float3(_756.w)) * float3(0.180000007152557373046875), float3(1.0) / (_761.xyz * float3(_761.w))) * (_766.xyz * float3(_766.w))) + (_771.xyz + float3(_771.w))) * float3(1.0 - _804)) + (((pow(pow(fast::max(float3(0.0), mix(_772, _745, _855.xyz * float3(_855.w))) * float3(5.5555553436279296875), _858.xyz * float3(_858.w)) * float3(0.180000007152557373046875), float3(1.0) / (_861.xyz * float3(_861.w))) * (_864.xyz * float3(_864.w))) + (_867.xyz + float3(_867.w))) * float3(_804 - _852))) + (((pow(pow(fast::max(float3(0.0), mix(_772, _745, _808.xyz * float3(_808.w))) * float3(5.5555553436279296875), _811.xyz * float3(_811.w)) * float3(0.180000007152557373046875), float3(1.0) / (_814.xyz * float3(_814.w))) * (_817.xyz * float3(_817.w))) + (_820.xyz + float3(_820.w))) * float3(_852)); + float3 _906 = _905 * _549; + float3 _914 = float3(_Globals.BlueCorrection); + float3 _916 = mix(_905, _905 * ((_551 * float3x3(float3(0.940437257289886474609375, -0.01830687932670116424560546875, 0.07786960899829864501953125), float3(0.008378696627914905548095703125, 0.82866001129150390625, 0.162961304187774658203125), float3(0.0005471261101774871349334716796875, -0.00088337459601461887359619140625, 1.00033628940582275390625))) * _550), _914) * _551; + float _917 = _916.x; + float _918 = _916.y; + float _920 = _916.z; + float _923 = fast::max(fast::max(_917, _918), _920); + float _928 = (fast::max(_923, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_917, _918), _920), 1.0000000133514319600180897396058e-10)) / fast::max(_923, 0.00999999977648258209228515625); + float _941 = ((_920 + _918) + _917) + (1.75 * sqrt(((_920 * (_920 - _918)) + (_918 * (_918 - _917))) + (_917 * (_917 - _920)))); + float _942 = _941 * 0.3333333432674407958984375; + float _943 = _928 - 0.4000000059604644775390625; + float _948 = fast::max(1.0 - abs(_943 * 2.5), 0.0); + float _956 = (1.0 + (float(int(sign(_943 * 5.0))) * (1.0 - (_948 * _948)))) * 0.02500000037252902984619140625; + float _969; + if (_942 <= 0.053333334624767303466796875) + { + _969 = _956; + } + else + { + float _968; + if (_942 >= 0.1599999964237213134765625) + { + _968 = 0.0; + } + else + { + _968 = _956 * ((0.23999999463558197021484375 / _941) - 0.5); + } + _969 = _968; + } + float3 _972 = _916 * float3(1.0 + _969); + float _973 = _972.x; + float _974 = _972.y; + float _976 = _972.z; + float _990; + if ((_973 == _974) && (_974 == _976)) + { + _990 = 0.0; + } + else + { + _990 = 57.2957763671875 * atan2(sqrt(3.0) * (_974 - _976), ((2.0 * _973) - _974) - _976); + } + float _995; + if (_990 < 0.0) + { + _995 = _990 + 360.0; + } + else + { + _995 = _990; + } + float _996 = fast::clamp(_995, 0.0, 360.0); + float _1001; + if (_996 > 180.0) + { + _1001 = _996 - 360.0; + } + else + { + _1001 = _996; + } + float _1005 = smoothstep(0.0, 1.0, 1.0 - abs(_1001 * 0.01481481455266475677490234375)); + float3 _1012 = _972; + _1012.x = _973 + ((((_1005 * _1005) * _928) * (0.02999999932944774627685546875 - _973)) * 0.180000007152557373046875); + float3 _1014 = fast::max(float3(0.0), _1012 * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375))); + float _1023 = (1.0 + _Globals.FilmBlackClip) - _Globals.FilmToe; + float _1026 = 1.0 + _Globals.FilmWhiteClip; + float _1029 = _1026 - _Globals.FilmShoulder; + float _1056; + if (_Globals.FilmToe > 0.800000011920928955078125) + { + _1056 = ((0.819999992847442626953125 - _Globals.FilmToe) / _Globals.FilmSlope) + (log(0.180000007152557373046875) / log(10.0)); + } + else + { + float _1035 = (0.180000007152557373046875 + _Globals.FilmBlackClip) / _1023; + _1056 = (log(0.180000007152557373046875) / log(10.0)) - ((0.5 * log(_1035 / (2.0 - _1035))) * (_1023 / _Globals.FilmSlope)); + } + float _1061 = ((1.0 - _Globals.FilmToe) / _Globals.FilmSlope) - _1056; + float _1063 = (_Globals.FilmShoulder / _Globals.FilmSlope) - _1061; + float _1065 = log(10.0); + float3 _1067 = log(mix(float3(dot(_1014, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1014, float3(0.959999978542327880859375))) / float3(_1065); + float3 _1071 = float3(_Globals.FilmSlope) * (_1067 + float3(_1061)); + float3 _1079 = float3(_1056); + float3 _1080 = _1067 - _1079; + float3 _1092 = float3(_1063); + float3 _1106 = fast::clamp(_1080 / float3(_1063 - _1056), float3(0.0), float3(1.0)); + float3 _1110 = select(_1106, float3(1.0) - _1106, bool3(_1063 < _1056)); + float3 _1115 = mix(select(_1071, float3(-_Globals.FilmBlackClip) + (float3(2.0 * _1023) / (float3(1.0) + exp(float3(((-2.0) * _Globals.FilmSlope) / _1023) * _1080))), _1067 < _1079), select(_1071, float3(_1026) - (float3(2.0 * _1029) / (float3(1.0) + exp(float3((2.0 * _Globals.FilmSlope) / _1029) * (_1067 - _1092)))), _1067 > _1092), ((float3(3.0) - (float3(2.0) * _1110)) * _1110) * _1110); + float3 _1119 = fast::max(float3(0.0), mix(float3(dot(_1115, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1115, float3(0.930000007152557373046875))); + float3 _1189; + if (_Globals.ColorShadow_Tint2.w == 0.0) + { + float3 _1131 = _391; + _1131.x = dot(_906, _Globals.ColorMatrixR_ColorCurveCd1.xyz); + float3 _1136 = _1131; + _1136.y = dot(_906, _Globals.ColorMatrixG_ColorCurveCd3Cm3.xyz); + float3 _1141 = _1136; + _1141.z = dot(_906, _Globals.ColorMatrixB_ColorCurveCm2.xyz); + float3 _1157 = fast::max(float3(0.0), _1141 * (_Globals.ColorShadow_Tint1.xyz + (_Globals.ColorShadow_Tint2.xyz * float3(1.0 / (dot(_906, _Globals.ColorShadow_Luma.xyz) + 1.0))))); + float3 _1162 = fast::max(float3(0.0), _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx - _1157); + float3 _1164 = fast::max(_1157, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz); + _1189 = ((((_1164 * _Globals.ColorCurve_Ch1_Ch2.xxx) + _Globals.ColorCurve_Ch1_Ch2.yyy) * (float3(1.0) / (_1164 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.www))) + ((fast::clamp(_1157, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz) * _Globals.ColorMatrixB_ColorCurveCm2.www) + (((_1162 * _Globals.ColorMatrixR_ColorCurveCd1.www) * (float3(1.0) / (_1162 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.yyy))) + _Globals.ColorMatrixG_ColorCurveCd3Cm3.www))) - float3(0.00200000009499490261077880859375); + } + else + { + _1189 = fast::max(float3(0.0), mix(_1119, _1119 * ((_551 * float3x3(float3(1.06317996978759765625, 0.02339559979736804962158203125, -0.08657260239124298095703125), float3(-0.010633699595928192138671875, 1.2063200473785400390625, -0.1956900060176849365234375), float3(-0.0005908869788981974124908447265625, 0.00105247995816171169281005859375, 0.999538004398345947265625))) * _550), _914) * _549); + } + float3 _1218 = pow(fast::max(float3(0.0), mix((((float3(_Globals.MappingPolynomial.x) * (_1189 * _1189)) + (float3(_Globals.MappingPolynomial.y) * _1189)) + float3(_Globals.MappingPolynomial.z)) * float3(_Globals.ColorScale), _Globals.OverlayColor.xyz, float3(_Globals.OverlayColor.w))), float3(_Globals.InverseGamma.y)); + float3 _3001; + if (_Globals.OutputDevice == 0u) + { + float _2961 = _1218.x; + float _2973; + for (;;) + { + if (_2961 < 0.00313066993840038776397705078125) + { + _2973 = _2961 * 12.9200000762939453125; + break; + } + _2973 = (pow(_2961, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _2974 = _1218.y; + float _2986; + for (;;) + { + if (_2974 < 0.00313066993840038776397705078125) + { + _2986 = _2974 * 12.9200000762939453125; + break; + } + _2986 = (pow(_2974, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _2987 = _1218.z; + float _2999; + for (;;) + { + if (_2987 < 0.00313066993840038776397705078125) + { + _2999 = _2987 * 12.9200000762939453125; + break; + } + _2999 = (pow(_2987, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + _3001 = float3(_2973, _2986, _2999); + } + else + { + float3 _2960; + if (_Globals.OutputDevice == 1u) + { + float3 _2953 = fast::max(float3(6.1035199905745685100555419921875e-05), (_1218 * _547) * _576); + _2960 = fast::min(_2953 * float3(4.5), (pow(fast::max(_2953, float3(0.017999999225139617919921875)), float3(0.449999988079071044921875)) * float3(1.09899997711181640625)) - float3(0.098999999463558197021484375)); + } + else + { + float3 _2950; + if ((_Globals.OutputDevice == 3u) || (_Globals.OutputDevice == 5u)) + { + float3 _2100 = (_906 * float3(1.5)) * (_546 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _2101 = _2100.x; + float _2102 = _2100.y; + float _2104 = _2100.z; + float _2107 = fast::max(fast::max(_2101, _2102), _2104); + float _2112 = (fast::max(_2107, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_2101, _2102), _2104), 1.0000000133514319600180897396058e-10)) / fast::max(_2107, 0.00999999977648258209228515625); + float _2125 = ((_2104 + _2102) + _2101) + (1.75 * sqrt(((_2104 * (_2104 - _2102)) + (_2102 * (_2102 - _2101))) + (_2101 * (_2101 - _2104)))); + float _2126 = _2125 * 0.3333333432674407958984375; + float _2127 = _2112 - 0.4000000059604644775390625; + float _2132 = fast::max(1.0 - abs(_2127 * 2.5), 0.0); + float _2140 = (1.0 + (float(int(sign(_2127 * 5.0))) * (1.0 - (_2132 * _2132)))) * 0.02500000037252902984619140625; + float _2153; + if (_2126 <= 0.053333334624767303466796875) + { + _2153 = _2140; + } + else + { + float _2152; + if (_2126 >= 0.1599999964237213134765625) + { + _2152 = 0.0; + } + else + { + _2152 = _2140 * ((0.23999999463558197021484375 / _2125) - 0.5); + } + _2153 = _2152; + } + float3 _2156 = _2100 * float3(1.0 + _2153); + float _2157 = _2156.x; + float _2158 = _2156.y; + float _2160 = _2156.z; + float _2174; + if ((_2157 == _2158) && (_2158 == _2160)) + { + _2174 = 0.0; + } + else + { + _2174 = 57.2957763671875 * atan2(sqrt(3.0) * (_2158 - _2160), ((2.0 * _2157) - _2158) - _2160); + } + float _2179; + if (_2174 < 0.0) + { + _2179 = _2174 + 360.0; + } + else + { + _2179 = _2174; + } + float _2180 = fast::clamp(_2179, 0.0, 360.0); + float _2185; + if (_2180 > 180.0) + { + _2185 = _2180 - 360.0; + } + else + { + _2185 = _2180; + } + float _2235; + if ((_2185 > (-67.5)) && (_2185 < 67.5)) + { + float _2192 = (_2185 - (-67.5)) * 0.0296296291053295135498046875; + int _2193 = int(_2192); + float _2195 = _2192 - float(_2193); + float _2196 = _2195 * _2195; + float _2197 = _2196 * _2195; + float _2234; + if (_2193 == 3) + { + _2234 = (((_2197 * (-0.16666667163372039794921875)) + (_2196 * 0.5)) + (_2195 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _2227; + if (_2193 == 2) + { + _2227 = ((_2197 * 0.5) + (_2196 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _2222; + if (_2193 == 1) + { + _2222 = (((_2197 * (-0.5)) + (_2196 * 0.5)) + (_2195 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _2215; + if (_2193 == 0) + { + _2215 = _2197 * 0.16666667163372039794921875; + } + else + { + _2215 = 0.0; + } + _2222 = _2215; + } + _2227 = _2222; + } + _2234 = _2227; + } + _2235 = _2234; + } + else + { + _2235 = 0.0; + } + float3 _2242 = _2156; + _2242.x = _2157 + ((((_2235 * 1.5) * _2112) * (0.02999999932944774627685546875 - _2157)) * 0.180000007152557373046875); + float3 _2245 = fast::clamp(fast::clamp(_2242, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _2248 = mix(float3(dot(_2245, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _2245, float3(0.959999978542327880859375)); + float _2249 = _2248.x; + float _2253 = 0.17999999225139617919921875 * exp2(18.0); + float _2255 = exp2(-14.0); + float _2258 = log((_2249 <= 0.0) ? _2255 : _2249) / _1065; + float _2260 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1065; + float _2327; + if (_2258 <= _2260) + { + _2327 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2267 = log(0.180000007152557373046875) / _1065; + float _2324; + if ((_2258 > _2260) && (_2258 < _2267)) + { + float _2307 = (3.0 * (_2258 - _2260)) / (_2267 - _2260); + int _2308 = int(_2307); + float _2310 = _2307 - float(_2308); + _2324 = dot(float3(_2310 * _2310, _2310, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2308], _475[_2308 + 1], _475[_2308 + 2])); + } + else + { + float _2275 = log(_2253) / _1065; + float _2303; + if ((_2258 >= _2267) && (_2258 < _2275)) + { + float _2286 = (3.0 * (_2258 - _2267)) / (_2275 - _2267); + int _2287 = int(_2286); + float _2289 = _2286 - float(_2287); + _2303 = dot(float3(_2289 * _2289, _2289, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2287], _476[_2287 + 1], _476[_2287 + 2])); + } + else + { + _2303 = log(10000.0) / _1065; + } + _2324 = _2303; + } + _2327 = _2324; + } + float3 _2329 = _391; + _2329.x = pow(10.0, _2327); + float _2330 = _2248.y; + float _2334 = log((_2330 <= 0.0) ? _2255 : _2330) / _1065; + float _2401; + if (_2334 <= _2260) + { + _2401 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2341 = log(0.180000007152557373046875) / _1065; + float _2398; + if ((_2334 > _2260) && (_2334 < _2341)) + { + float _2381 = (3.0 * (_2334 - _2260)) / (_2341 - _2260); + int _2382 = int(_2381); + float _2384 = _2381 - float(_2382); + _2398 = dot(float3(_2384 * _2384, _2384, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2382], _475[_2382 + 1], _475[_2382 + 2])); + } + else + { + float _2349 = log(_2253) / _1065; + float _2377; + if ((_2334 >= _2341) && (_2334 < _2349)) + { + float _2360 = (3.0 * (_2334 - _2341)) / (_2349 - _2341); + int _2361 = int(_2360); + float _2363 = _2360 - float(_2361); + _2377 = dot(float3(_2363 * _2363, _2363, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2361], _476[_2361 + 1], _476[_2361 + 2])); + } + else + { + _2377 = log(10000.0) / _1065; + } + _2398 = _2377; + } + _2401 = _2398; + } + float3 _2403 = _2329; + _2403.y = pow(10.0, _2401); + float _2404 = _2248.z; + float _2408 = log((_2404 <= 0.0) ? _2255 : _2404) / _1065; + float _2475; + if (_2408 <= _2260) + { + _2475 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2415 = log(0.180000007152557373046875) / _1065; + float _2472; + if ((_2408 > _2260) && (_2408 < _2415)) + { + float _2455 = (3.0 * (_2408 - _2260)) / (_2415 - _2260); + int _2456 = int(_2455); + float _2458 = _2455 - float(_2456); + _2472 = dot(float3(_2458 * _2458, _2458, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2456], _475[_2456 + 1], _475[_2456 + 2])); + } + else + { + float _2423 = log(_2253) / _1065; + float _2451; + if ((_2408 >= _2415) && (_2408 < _2423)) + { + float _2434 = (3.0 * (_2408 - _2415)) / (_2423 - _2415); + int _2435 = int(_2434); + float _2437 = _2434 - float(_2435); + _2451 = dot(float3(_2437 * _2437, _2437, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2435], _476[_2435 + 1], _476[_2435 + 2])); + } + else + { + _2451 = log(10000.0) / _1065; + } + _2472 = _2451; + } + _2475 = _2472; + } + float3 _2477 = _2403; + _2477.z = pow(10.0, _2475); + float3 _2479 = (_2477 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _2481 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _2485 = log((_2481 <= 0.0) ? _2255 : _2481) / _1065; + float _2552; + if (_2485 <= _2260) + { + _2552 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2492 = log(0.180000007152557373046875) / _1065; + float _2549; + if ((_2485 > _2260) && (_2485 < _2492)) + { + float _2532 = (3.0 * (_2485 - _2260)) / (_2492 - _2260); + int _2533 = int(_2532); + float _2535 = _2532 - float(_2533); + _2549 = dot(float3(_2535 * _2535, _2535, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2533], _475[_2533 + 1], _475[_2533 + 2])); + } + else + { + float _2500 = log(_2253) / _1065; + float _2528; + if ((_2485 >= _2492) && (_2485 < _2500)) + { + float _2511 = (3.0 * (_2485 - _2492)) / (_2500 - _2492); + int _2512 = int(_2511); + float _2514 = _2511 - float(_2512); + _2528 = dot(float3(_2514 * _2514, _2514, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2512], _476[_2512 + 1], _476[_2512 + 2])); + } + else + { + _2528 = log(10000.0) / _1065; + } + _2549 = _2528; + } + _2552 = _2549; + } + float _2555 = log(0.180000007152557373046875) / _1065; + float _2611; + if (_2555 <= _2260) + { + _2611 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2608; + if ((_2555 > _2260) && (_2555 < _2555)) + { + _2608 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[3], _475[4], _475[5])).z; + } + else + { + float _2568 = log(_2253) / _1065; + float _2596; + if ((_2555 >= _2555) && (_2555 < _2568)) + { + float _2579 = (3.0 * (_2555 - _2555)) / (_2568 - _2555); + int _2580 = int(_2579); + float _2582 = _2579 - float(_2580); + _2596 = dot(float3(_2582 * _2582, _2582, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2580], _476[_2580 + 1], _476[_2580 + 2])); + } + else + { + _2596 = log(10000.0) / _1065; + } + _2608 = _2596; + } + _2611 = _2608; + } + float _2612 = pow(10.0, _2611); + float _2614 = 0.17999999225139617919921875 * pow(2.0, 10.0); + float _2618 = log((_2614 <= 0.0) ? _2255 : _2614) / _1065; + float _2683; + if (_2618 <= _2260) + { + _2683 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _2680; + if ((_2618 > _2260) && (_2618 < _2555)) + { + float _2663 = (3.0 * (_2618 - _2260)) / (_2555 - _2260); + int _2664 = int(_2663); + float _2666 = _2663 - float(_2664); + _2680 = dot(float3(_2666 * _2666, _2666, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_2664], _475[_2664 + 1], _475[_2664 + 2])); + } + else + { + float _2631 = log(_2253) / _1065; + float _2659; + if ((_2618 >= _2555) && (_2618 < _2631)) + { + float _2642 = (3.0 * (_2618 - _2555)) / (_2631 - _2555); + int _2643 = int(_2642); + float _2645 = _2642 - float(_2643); + _2659 = dot(float3(_2645 * _2645, _2645, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_2643], _476[_2643 + 1], _476[_2643 + 2])); + } + else + { + _2659 = log(10000.0) / _1065; + } + _2680 = _2659; + } + _2683 = _2680; + } + float _2684 = pow(10.0, _2683); + float _2685 = _2479.x; + float _2689 = log((_2685 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2685) / _1065; + float _2690 = log(pow(10.0, _2552)); + float _2691 = _2690 / _1065; + float _2768; + if (_2689 <= _2691) + { + _2768 = (_2689 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1065) - ((3.0 * _2690) / _1065)); + } + else + { + float _2698 = log(_2612) / _1065; + float _2760; + if ((_2689 > _2691) && (_2689 < _2698)) + { + float _2743 = (7.0 * (_2689 - _2691)) / (_2698 - _2691); + int _2744 = int(_2743); + float _2746 = _2743 - float(_2744); + _2760 = dot(float3(_2746 * _2746, _2746, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_479[_2744], _479[_2744 + 1], _479[_2744 + 2])); + } + else + { + float _2705 = log(_2684); + float _2706 = _2705 / _1065; + float _2739; + if ((_2689 >= _2698) && (_2689 < _2706)) + { + float _2722 = (7.0 * (_2689 - _2698)) / (_2706 - _2698); + int _2723 = int(_2722); + float _2725 = _2722 - float(_2723); + _2739 = dot(float3(_2725 * _2725, _2725, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_480[_2723], _480[_2723 + 1], _480[_2723 + 2])); + } + else + { + _2739 = (_2689 * 0.0599999986588954925537109375) + ((log(1000.0) / _1065) - ((0.0599999986588954925537109375 * _2705) / _1065)); + } + _2760 = _2739; + } + _2768 = _2760; + } + float3 _2770 = _391; + _2770.x = pow(10.0, _2768); + float _2771 = _2479.y; + float _2775 = log((_2771 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2771) / _1065; + float _2852; + if (_2775 <= _2691) + { + _2852 = (_2775 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1065) - ((3.0 * _2690) / _1065)); + } + else + { + float _2782 = log(_2612) / _1065; + float _2844; + if ((_2775 > _2691) && (_2775 < _2782)) + { + float _2827 = (7.0 * (_2775 - _2691)) / (_2782 - _2691); + int _2828 = int(_2827); + float _2830 = _2827 - float(_2828); + _2844 = dot(float3(_2830 * _2830, _2830, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_479[_2828], _479[_2828 + 1], _479[_2828 + 2])); + } + else + { + float _2789 = log(_2684); + float _2790 = _2789 / _1065; + float _2823; + if ((_2775 >= _2782) && (_2775 < _2790)) + { + float _2806 = (7.0 * (_2775 - _2782)) / (_2790 - _2782); + int _2807 = int(_2806); + float _2809 = _2806 - float(_2807); + _2823 = dot(float3(_2809 * _2809, _2809, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_480[_2807], _480[_2807 + 1], _480[_2807 + 2])); + } + else + { + _2823 = (_2775 * 0.0599999986588954925537109375) + ((log(1000.0) / _1065) - ((0.0599999986588954925537109375 * _2789) / _1065)); + } + _2844 = _2823; + } + _2852 = _2844; + } + float3 _2854 = _2770; + _2854.y = pow(10.0, _2852); + float _2855 = _2479.z; + float _2859 = log((_2855 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2855) / _1065; + float _2936; + if (_2859 <= _2691) + { + _2936 = (_2859 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1065) - ((3.0 * _2690) / _1065)); + } + else + { + float _2866 = log(_2612) / _1065; + float _2928; + if ((_2859 > _2691) && (_2859 < _2866)) + { + float _2911 = (7.0 * (_2859 - _2691)) / (_2866 - _2691); + int _2912 = int(_2911); + float _2914 = _2911 - float(_2912); + _2928 = dot(float3(_2914 * _2914, _2914, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_479[_2912], _479[_2912 + 1], _479[_2912 + 2])); + } + else + { + float _2873 = log(_2684); + float _2874 = _2873 / _1065; + float _2907; + if ((_2859 >= _2866) && (_2859 < _2874)) + { + float _2890 = (7.0 * (_2859 - _2866)) / (_2874 - _2866); + int _2891 = int(_2890); + float _2893 = _2890 - float(_2891); + _2907 = dot(float3(_2893 * _2893, _2893, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_480[_2891], _480[_2891 + 1], _480[_2891 + 2])); + } + else + { + _2907 = (_2859 * 0.0599999986588954925537109375) + ((log(1000.0) / _1065) - ((0.0599999986588954925537109375 * _2873) / _1065)); + } + _2928 = _2907; + } + _2936 = _2928; + } + float3 _2938 = _2854; + _2938.z = pow(10.0, _2936); + float3 _2942 = pow(((_2938 - float3(3.5073844628641381859779357910156e-05)) * _576) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _2950 = pow((float3(0.8359375) + (float3(18.8515625) * _2942)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _2942))), float3(78.84375)); + } + else + { + float3 _2097; + if ((_Globals.OutputDevice == 4u) || (_Globals.OutputDevice == 6u)) + { + float3 _1263 = (_906 * float3(1.5)) * (_546 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _1264 = _1263.x; + float _1265 = _1263.y; + float _1267 = _1263.z; + float _1270 = fast::max(fast::max(_1264, _1265), _1267); + float _1275 = (fast::max(_1270, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_1264, _1265), _1267), 1.0000000133514319600180897396058e-10)) / fast::max(_1270, 0.00999999977648258209228515625); + float _1288 = ((_1267 + _1265) + _1264) + (1.75 * sqrt(((_1267 * (_1267 - _1265)) + (_1265 * (_1265 - _1264))) + (_1264 * (_1264 - _1267)))); + float _1289 = _1288 * 0.3333333432674407958984375; + float _1290 = _1275 - 0.4000000059604644775390625; + float _1295 = fast::max(1.0 - abs(_1290 * 2.5), 0.0); + float _1303 = (1.0 + (float(int(sign(_1290 * 5.0))) * (1.0 - (_1295 * _1295)))) * 0.02500000037252902984619140625; + float _1316; + if (_1289 <= 0.053333334624767303466796875) + { + _1316 = _1303; + } + else + { + float _1315; + if (_1289 >= 0.1599999964237213134765625) + { + _1315 = 0.0; + } + else + { + _1315 = _1303 * ((0.23999999463558197021484375 / _1288) - 0.5); + } + _1316 = _1315; + } + float3 _1319 = _1263 * float3(1.0 + _1316); + float _1320 = _1319.x; + float _1321 = _1319.y; + float _1323 = _1319.z; + float _1337; + if ((_1320 == _1321) && (_1321 == _1323)) + { + _1337 = 0.0; + } + else + { + _1337 = 57.2957763671875 * atan2(sqrt(3.0) * (_1321 - _1323), ((2.0 * _1320) - _1321) - _1323); + } + float _1342; + if (_1337 < 0.0) + { + _1342 = _1337 + 360.0; + } + else + { + _1342 = _1337; + } + float _1343 = fast::clamp(_1342, 0.0, 360.0); + float _1348; + if (_1343 > 180.0) + { + _1348 = _1343 - 360.0; + } + else + { + _1348 = _1343; + } + float _1398; + if ((_1348 > (-67.5)) && (_1348 < 67.5)) + { + float _1355 = (_1348 - (-67.5)) * 0.0296296291053295135498046875; + int _1356 = int(_1355); + float _1358 = _1355 - float(_1356); + float _1359 = _1358 * _1358; + float _1360 = _1359 * _1358; + float _1397; + if (_1356 == 3) + { + _1397 = (((_1360 * (-0.16666667163372039794921875)) + (_1359 * 0.5)) + (_1358 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _1390; + if (_1356 == 2) + { + _1390 = ((_1360 * 0.5) + (_1359 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _1385; + if (_1356 == 1) + { + _1385 = (((_1360 * (-0.5)) + (_1359 * 0.5)) + (_1358 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _1378; + if (_1356 == 0) + { + _1378 = _1360 * 0.16666667163372039794921875; + } + else + { + _1378 = 0.0; + } + _1385 = _1378; + } + _1390 = _1385; + } + _1397 = _1390; + } + _1398 = _1397; + } + else + { + _1398 = 0.0; + } + float3 _1405 = _1319; + _1405.x = _1320 + ((((_1398 * 1.5) * _1275) * (0.02999999932944774627685546875 - _1320)) * 0.180000007152557373046875); + float3 _1408 = fast::clamp(fast::clamp(_1405, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _1411 = mix(float3(dot(_1408, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1408, float3(0.959999978542327880859375)); + float _1412 = _1411.x; + float _1416 = 0.17999999225139617919921875 * exp2(18.0); + float _1418 = exp2(-14.0); + float _1421 = log((_1412 <= 0.0) ? _1418 : _1412) / _1065; + float _1423 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1065; + float _1490; + if (_1421 <= _1423) + { + _1490 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1430 = log(0.180000007152557373046875) / _1065; + float _1487; + if ((_1421 > _1423) && (_1421 < _1430)) + { + float _1470 = (3.0 * (_1421 - _1423)) / (_1430 - _1423); + int _1471 = int(_1470); + float _1473 = _1470 - float(_1471); + _1487 = dot(float3(_1473 * _1473, _1473, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1471], _475[_1471 + 1], _475[_1471 + 2])); + } + else + { + float _1438 = log(_1416) / _1065; + float _1466; + if ((_1421 >= _1430) && (_1421 < _1438)) + { + float _1449 = (3.0 * (_1421 - _1430)) / (_1438 - _1430); + int _1450 = int(_1449); + float _1452 = _1449 - float(_1450); + _1466 = dot(float3(_1452 * _1452, _1452, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1450], _476[_1450 + 1], _476[_1450 + 2])); + } + else + { + _1466 = log(10000.0) / _1065; + } + _1487 = _1466; + } + _1490 = _1487; + } + float3 _1492 = _391; + _1492.x = pow(10.0, _1490); + float _1493 = _1411.y; + float _1497 = log((_1493 <= 0.0) ? _1418 : _1493) / _1065; + float _1564; + if (_1497 <= _1423) + { + _1564 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1504 = log(0.180000007152557373046875) / _1065; + float _1561; + if ((_1497 > _1423) && (_1497 < _1504)) + { + float _1544 = (3.0 * (_1497 - _1423)) / (_1504 - _1423); + int _1545 = int(_1544); + float _1547 = _1544 - float(_1545); + _1561 = dot(float3(_1547 * _1547, _1547, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1545], _475[_1545 + 1], _475[_1545 + 2])); + } + else + { + float _1512 = log(_1416) / _1065; + float _1540; + if ((_1497 >= _1504) && (_1497 < _1512)) + { + float _1523 = (3.0 * (_1497 - _1504)) / (_1512 - _1504); + int _1524 = int(_1523); + float _1526 = _1523 - float(_1524); + _1540 = dot(float3(_1526 * _1526, _1526, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1524], _476[_1524 + 1], _476[_1524 + 2])); + } + else + { + _1540 = log(10000.0) / _1065; + } + _1561 = _1540; + } + _1564 = _1561; + } + float3 _1566 = _1492; + _1566.y = pow(10.0, _1564); + float _1567 = _1411.z; + float _1571 = log((_1567 <= 0.0) ? _1418 : _1567) / _1065; + float _1638; + if (_1571 <= _1423) + { + _1638 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1578 = log(0.180000007152557373046875) / _1065; + float _1635; + if ((_1571 > _1423) && (_1571 < _1578)) + { + float _1618 = (3.0 * (_1571 - _1423)) / (_1578 - _1423); + int _1619 = int(_1618); + float _1621 = _1618 - float(_1619); + _1635 = dot(float3(_1621 * _1621, _1621, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1619], _475[_1619 + 1], _475[_1619 + 2])); + } + else + { + float _1586 = log(_1416) / _1065; + float _1614; + if ((_1571 >= _1578) && (_1571 < _1586)) + { + float _1597 = (3.0 * (_1571 - _1578)) / (_1586 - _1578); + int _1598 = int(_1597); + float _1600 = _1597 - float(_1598); + _1614 = dot(float3(_1600 * _1600, _1600, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1598], _476[_1598 + 1], _476[_1598 + 2])); + } + else + { + _1614 = log(10000.0) / _1065; + } + _1635 = _1614; + } + _1638 = _1635; + } + float3 _1640 = _1566; + _1640.z = pow(10.0, _1638); + float3 _1642 = (_1640 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _1644 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _1648 = log((_1644 <= 0.0) ? _1418 : _1644) / _1065; + float _1715; + if (_1648 <= _1423) + { + _1715 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1655 = log(0.180000007152557373046875) / _1065; + float _1712; + if ((_1648 > _1423) && (_1648 < _1655)) + { + float _1695 = (3.0 * (_1648 - _1423)) / (_1655 - _1423); + int _1696 = int(_1695); + float _1698 = _1695 - float(_1696); + _1712 = dot(float3(_1698 * _1698, _1698, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1696], _475[_1696 + 1], _475[_1696 + 2])); + } + else + { + float _1663 = log(_1416) / _1065; + float _1691; + if ((_1648 >= _1655) && (_1648 < _1663)) + { + float _1674 = (3.0 * (_1648 - _1655)) / (_1663 - _1655); + int _1675 = int(_1674); + float _1677 = _1674 - float(_1675); + _1691 = dot(float3(_1677 * _1677, _1677, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1675], _476[_1675 + 1], _476[_1675 + 2])); + } + else + { + _1691 = log(10000.0) / _1065; + } + _1712 = _1691; + } + _1715 = _1712; + } + float _1718 = log(0.180000007152557373046875) / _1065; + float _1774; + if (_1718 <= _1423) + { + _1774 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1771; + if ((_1718 > _1423) && (_1718 < _1718)) + { + _1771 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[3], _475[4], _475[5])).z; + } + else + { + float _1731 = log(_1416) / _1065; + float _1759; + if ((_1718 >= _1718) && (_1718 < _1731)) + { + float _1742 = (3.0 * (_1718 - _1718)) / (_1731 - _1718); + int _1743 = int(_1742); + float _1745 = _1742 - float(_1743); + _1759 = dot(float3(_1745 * _1745, _1745, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1743], _476[_1743 + 1], _476[_1743 + 2])); + } + else + { + _1759 = log(10000.0) / _1065; + } + _1771 = _1759; + } + _1774 = _1771; + } + float _1775 = pow(10.0, _1774); + float _1777 = 0.17999999225139617919921875 * pow(2.0, 11.0); + float _1781 = log((_1777 <= 0.0) ? _1418 : _1777) / _1065; + float _1846; + if (_1781 <= _1423) + { + _1846 = log(9.9999997473787516355514526367188e-05) / _1065; + } + else + { + float _1843; + if ((_1781 > _1423) && (_1781 < _1718)) + { + float _1826 = (3.0 * (_1781 - _1423)) / (_1718 - _1423); + int _1827 = int(_1826); + float _1829 = _1826 - float(_1827); + _1843 = dot(float3(_1829 * _1829, _1829, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_475[_1827], _475[_1827 + 1], _475[_1827 + 2])); + } + else + { + float _1794 = log(_1416) / _1065; + float _1822; + if ((_1781 >= _1718) && (_1781 < _1794)) + { + float _1805 = (3.0 * (_1781 - _1718)) / (_1794 - _1718); + int _1806 = int(_1805); + float _1808 = _1805 - float(_1806); + _1822 = dot(float3(_1808 * _1808, _1808, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_476[_1806], _476[_1806 + 1], _476[_1806 + 2])); + } + else + { + _1822 = log(10000.0) / _1065; + } + _1843 = _1822; + } + _1846 = _1843; + } + float _1847 = pow(10.0, _1846); + float _1848 = _1642.x; + float _1852 = log((_1848 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _1848) / _1065; + float _1854 = log(pow(10.0, _1715)) / _1065; + float _1926; + if (_1852 <= _1854) + { + _1926 = log(0.004999999888241291046142578125) / _1065; + } + else + { + float _1861 = log(_1775) / _1065; + float _1923; + if ((_1852 > _1854) && (_1852 < _1861)) + { + float _1906 = (7.0 * (_1852 - _1854)) / (_1861 - _1854); + int _1907 = int(_1906); + float _1909 = _1906 - float(_1907); + _1923 = dot(float3(_1909 * _1909, _1909, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_482[_1907], _482[_1907 + 1], _482[_1907 + 2])); + } + else + { + float _1868 = log(_1847); + float _1869 = _1868 / _1065; + float _1902; + if ((_1852 >= _1861) && (_1852 < _1869)) + { + float _1885 = (7.0 * (_1852 - _1861)) / (_1869 - _1861); + int _1886 = int(_1885); + float _1888 = _1885 - float(_1886); + _1902 = dot(float3(_1888 * _1888, _1888, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_483[_1886], _483[_1886 + 1], _483[_1886 + 2])); + } + else + { + _1902 = (_1852 * 0.119999997317790985107421875) + ((log(2000.0) / _1065) - ((0.119999997317790985107421875 * _1868) / _1065)); + } + _1923 = _1902; + } + _1926 = _1923; + } + float3 _1928 = _391; + _1928.x = pow(10.0, _1926); + float _1929 = _1642.y; + float _1933 = log((_1929 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _1929) / _1065; + float _2005; + if (_1933 <= _1854) + { + _2005 = log(0.004999999888241291046142578125) / _1065; + } + else + { + float _1940 = log(_1775) / _1065; + float _2002; + if ((_1933 > _1854) && (_1933 < _1940)) + { + float _1985 = (7.0 * (_1933 - _1854)) / (_1940 - _1854); + int _1986 = int(_1985); + float _1988 = _1985 - float(_1986); + _2002 = dot(float3(_1988 * _1988, _1988, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_482[_1986], _482[_1986 + 1], _482[_1986 + 2])); + } + else + { + float _1947 = log(_1847); + float _1948 = _1947 / _1065; + float _1981; + if ((_1933 >= _1940) && (_1933 < _1948)) + { + float _1964 = (7.0 * (_1933 - _1940)) / (_1948 - _1940); + int _1965 = int(_1964); + float _1967 = _1964 - float(_1965); + _1981 = dot(float3(_1967 * _1967, _1967, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_483[_1965], _483[_1965 + 1], _483[_1965 + 2])); + } + else + { + _1981 = (_1933 * 0.119999997317790985107421875) + ((log(2000.0) / _1065) - ((0.119999997317790985107421875 * _1947) / _1065)); + } + _2002 = _1981; + } + _2005 = _2002; + } + float3 _2007 = _1928; + _2007.y = pow(10.0, _2005); + float _2008 = _1642.z; + float _2012 = log((_2008 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2008) / _1065; + float _2084; + if (_2012 <= _1854) + { + _2084 = log(0.004999999888241291046142578125) / _1065; + } + else + { + float _2019 = log(_1775) / _1065; + float _2081; + if ((_2012 > _1854) && (_2012 < _2019)) + { + float _2064 = (7.0 * (_2012 - _1854)) / (_2019 - _1854); + int _2065 = int(_2064); + float _2067 = _2064 - float(_2065); + _2081 = dot(float3(_2067 * _2067, _2067, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_482[_2065], _482[_2065 + 1], _482[_2065 + 2])); + } + else + { + float _2026 = log(_1847); + float _2027 = _2026 / _1065; + float _2060; + if ((_2012 >= _2019) && (_2012 < _2027)) + { + float _2043 = (7.0 * (_2012 - _2019)) / (_2027 - _2019); + int _2044 = int(_2043); + float _2046 = _2043 - float(_2044); + _2060 = dot(float3(_2046 * _2046, _2046, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_483[_2044], _483[_2044 + 1], _483[_2044 + 2])); + } + else + { + _2060 = (_2012 * 0.119999997317790985107421875) + ((log(2000.0) / _1065) - ((0.119999997317790985107421875 * _2026) / _1065)); + } + _2081 = _2060; + } + _2084 = _2081; + } + float3 _2086 = _2007; + _2086.z = pow(10.0, _2084); + float3 _2089 = pow((_2086 * _576) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _2097 = pow((float3(0.8359375) + (float3(18.8515625) * _2089)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _2089))), float3(78.84375)); + } + else + { + float3 _1260; + if (_Globals.OutputDevice == 7u) + { + float3 _1252 = pow(((_906 * _547) * _576) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _1260 = pow((float3(0.8359375) + (float3(18.8515625) * _1252)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _1252))), float3(78.84375)); + } + else + { + _1260 = pow((_1218 * _547) * _576, float3(_Globals.InverseGamma.z)); + } + _2097 = _1260; + } + _2950 = _2097; + } + _2960 = _2950; + } + _3001 = _2960; + } + float3 _3002 = _3001 * float3(0.95238101482391357421875); + float4 _3004 = float4(_3002.x, _3002.y, _3002.z, float4(0.0).w); + _3004.w = 0.0; + out.out_var_SV_Target0 = _3004; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag new file mode 100644 index 000000000..67fa21aad --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag @@ -0,0 +1,1414 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_Globals +{ + float4 MappingPolynomial; + float3 InverseGamma; + float4 ColorMatrixR_ColorCurveCd1; + float4 ColorMatrixG_ColorCurveCd3Cm3; + float4 ColorMatrixB_ColorCurveCm2; + float4 ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3; + float4 ColorCurve_Ch1_Ch2; + float4 ColorShadow_Luma; + float4 ColorShadow_Tint1; + float4 ColorShadow_Tint2; + float FilmSlope; + float FilmToe; + float FilmShoulder; + float FilmBlackClip; + float FilmWhiteClip; + float4 LUTWeights[5]; + float3 ColorScale; + float4 OverlayColor; + float WhiteTemp; + float WhiteTint; + float4 ColorSaturation; + float4 ColorContrast; + float4 ColorGamma; + float4 ColorGain; + float4 ColorOffset; + float4 ColorSaturationShadows; + float4 ColorContrastShadows; + float4 ColorGammaShadows; + float4 ColorGainShadows; + float4 ColorOffsetShadows; + float4 ColorSaturationMidtones; + float4 ColorContrastMidtones; + float4 ColorGammaMidtones; + float4 ColorGainMidtones; + float4 ColorOffsetMidtones; + float4 ColorSaturationHighlights; + float4 ColorContrastHighlights; + float4 ColorGammaHighlights; + float4 ColorGainHighlights; + float4 ColorOffsetHighlights; + float ColorCorrectionShadowsMax; + float ColorCorrectionHighlightsMin; + uint OutputDevice; + uint OutputGamut; + float BlueCorrection; + float ExpandGamut; +}; + +constant spvUnsafeArray _499 = spvUnsafeArray({ -4.0, -4.0, -3.1573765277862548828125, -0.485249996185302734375, 1.84773242473602294921875, 1.84773242473602294921875 }); +constant spvUnsafeArray _500 = spvUnsafeArray({ -0.718548238277435302734375, 2.0810306072235107421875, 3.66812419891357421875, 4.0, 4.0, 4.0 }); +constant spvUnsafeArray _503 = spvUnsafeArray({ -4.97062206268310546875, -3.0293781757354736328125, -2.1261999607086181640625, -1.5104999542236328125, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _504 = spvUnsafeArray({ 0.80891323089599609375, 1.19108676910400390625, 1.5683000087738037109375, 1.94830000400543212890625, 2.308300018310546875, 2.63840007781982421875, 2.85949993133544921875, 2.9872608184814453125, 3.0127391815185546875, 3.0127391815185546875 }); +constant spvUnsafeArray _506 = spvUnsafeArray({ -2.3010299205780029296875, -2.3010299205780029296875, -1.9312000274658203125, -1.5204999446868896484375, -1.0578000545501708984375, -0.4668000042438507080078125, 0.11937999725341796875, 0.7088134288787841796875, 1.2911865711212158203125, 1.2911865711212158203125 }); +constant spvUnsafeArray _507 = spvUnsafeArray({ 0.801995217800140380859375, 1.19800484180450439453125, 1.5943000316619873046875, 1.99730002880096435546875, 2.3782999515533447265625, 2.7683999538421630859375, 3.0515000820159912109375, 3.2746293544769287109375, 3.32743072509765625, 3.32743072509765625 }); + +constant float3 _523 = {}; +constant float3 _525 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + float2 in_var_TEXCOORD0 [[user(locn0), center_no_perspective]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globals [[buffer(0)]], texture2d Texture1 [[texture(0)]], sampler Texture1Sampler [[sampler(0)]], uint gl_Layer [[render_target_array_index]]) +{ + main0_out out = {}; + float3x3 _572 = float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * float3x3(float3(1.01303005218505859375, 0.0061053098179399967193603515625, -0.014971000142395496368408203125), float3(0.0076982299797236919403076171875, 0.99816501140594482421875, -0.005032029934227466583251953125), float3(-0.0028413101099431514739990234375, 0.0046851597726345062255859375, 0.92450702190399169921875)); + float3x3 _573 = _572 * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _574 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(0.98722398281097412109375, -0.0061132698319852352142333984375, 0.01595330052077770233154296875), float3(-0.007598360069096088409423828125, 1.00186002254486083984375, 0.0053300200961530208587646484375), float3(0.003072570078074932098388671875, -0.0050959498621523380279541015625, 1.0816800594329833984375)); + float3x3 _575 = _574 * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)); + float3x3 _576 = float3x3(float3(0.952552378177642822265625, 0.0, 9.25), float3(0.3439664542675018310546875, 0.728166103363037109375, -0.07213254272937774658203125), float3(0.0, 0.0, 1.00882518291473388671875)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)); + float3x3 _577 = float3x3(float3(0.662454187870025634765625, 0.1340042054653167724609375, 0.1561876833438873291015625), float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625), float3(-0.0055746496655046939849853515625, 0.0040607335977256298065185546875, 1.01033914089202880859375)) * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625)); + float3x3 _602; + for (;;) + { + if (_Globals.OutputGamut == 1u) + { + _602 = _574 * float3x3(float3(2.493396282196044921875, -0.931345880031585693359375, -0.4026944935321807861328125), float3(-0.829486787319183349609375, 1.76265966892242431640625, 0.02362460084259510040283203125), float3(0.0358506999909877777099609375, -0.076182700693607330322265625, 0.957014024257659912109375)); + break; + } + else + { + if (_Globals.OutputGamut == 2u) + { + _602 = _574 * float3x3(float3(1.71660840511322021484375, -0.3556621074676513671875, -0.253360092639923095703125), float3(-0.666682898998260498046875, 1.61647760868072509765625, 0.01576850004494190216064453125), float3(0.017642199993133544921875, -0.04277630150318145751953125, 0.94222867488861083984375)); + break; + } + else + { + if (_Globals.OutputGamut == 3u) + { + _602 = float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625)); + break; + } + else + { + if (_Globals.OutputGamut == 4u) + { + _602 = float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 1.0)); + break; + } + else + { + _602 = _575; + break; + } + } + } + } + } + float3 _603 = float4((in.in_var_TEXCOORD0 - float2(0.015625)) * float2(1.03225803375244140625), float(gl_Layer) * 0.0322580635547637939453125, 0.0).xyz; + float3 _625; + if (_Globals.OutputDevice >= 3u) + { + float3 _617 = pow(_603, float3(0.0126833133399486541748046875)); + _625 = pow(fast::max(float3(0.0), _617 - float3(0.8359375)) / (float3(18.8515625) - (float3(18.6875) * _617)), float3(6.277394771575927734375)) * float3(10000.0); + } + else + { + _625 = (exp2((_603 - float3(0.434017598628997802734375)) * float3(14.0)) * float3(0.180000007152557373046875)) - (exp2(float3(-6.0762462615966796875)) * float3(0.180000007152557373046875)); + } + float _628 = _Globals.WhiteTemp * 1.00055634975433349609375; + float _642 = (_628 <= 7000.0) ? (0.24406300485134124755859375 + ((99.1100006103515625 + ((2967800.0 - (4604438528.0 / _Globals.WhiteTemp)) / _628)) / _628)) : (0.23703999817371368408203125 + ((247.4799957275390625 + ((1901800.0 - (2005284352.0 / _Globals.WhiteTemp)) / _628)) / _628)); + float _659 = ((0.860117733478546142578125 + (0.00015411825734190642833709716796875 * _Globals.WhiteTemp)) + ((1.2864121856637211749330163002014e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 + (0.0008424202096648514270782470703125 * _Globals.WhiteTemp)) + ((7.0814513719597016461193561553955e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _670 = ((0.317398726940155029296875 + (4.25 * _Globals.WhiteTemp)) + ((4.2048167614439080352894961833954e-08 * _Globals.WhiteTemp) * _Globals.WhiteTemp)) / ((1.0 - (2.8974181986995972692966461181641e-05 * _Globals.WhiteTemp)) + ((1.6145605741257895715534687042236e-07 * _Globals.WhiteTemp) * _Globals.WhiteTemp)); + float _675 = ((2.0 * _659) - (8.0 * _670)) + 4.0; + float2 _679 = float2((3.0 * _659) / _675, (2.0 * _670) / _675); + float2 _686 = normalize(float2(_659, _670)); + float _691 = _659 + (((-_686.y) * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _695 = _670 + ((_686.x * _Globals.WhiteTint) * 0.0500000007450580596923828125); + float _700 = ((2.0 * _691) - (8.0 * _695)) + 4.0; + float2 _706 = select(float2(_642, ((((-3.0) * _642) * _642) + (2.86999988555908203125 * _642)) - 0.2750000059604644775390625), _679, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _691) / _700, (2.0 * _695) / _700) - _679); + float _707 = _706.x; + float _708 = _706.y; + float _709 = fast::max(_708, 1.0000000133514319600180897396058e-10); + float3 _711 = _523; + _711.x = _707 / _709; + float3 _712 = _711; + _712.y = 1.0; + float3 _716 = _712; + _716.z = ((1.0 - _707) - _708) / _709; + float _717 = fast::max(0.328999996185302734375, 1.0000000133514319600180897396058e-10); + float3 _719 = _523; + _719.x = 0.3127000033855438232421875 / _717; + float3 _720 = _719; + _720.y = 1.0; + float3 _722 = _720; + _722.z = 0.3582999706268310546875 / _717; + float3 _723 = _716 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _724 = _722 * float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)); + float3 _743 = (_625 * ((float3x3(float3(0.41245639324188232421875, 0.3575761020183563232421875, 0.180437505245208740234375), float3(0.21267290413379669189453125, 0.715152204036712646484375, 0.072175003588199615478515625), float3(0.01933390088379383087158203125, 0.119191996753215789794921875, 0.950304090976715087890625)) * ((float3x3(float3(0.89509999752044677734375, 0.2664000093936920166015625, -0.16140000522136688232421875), float3(-0.750199973583221435546875, 1.71350002288818359375, 0.0366999991238117218017578125), float3(0.0388999991118907928466796875, -0.06849999725818634033203125, 1.02960002422332763671875)) * float3x3(float3(_724.x / _723.x, 0.0, 0.0), float3(0.0, _724.y / _723.y, 0.0), float3(0.0, 0.0, _724.z / _723.z))) * float3x3(float3(0.986992895603179931640625, -0.14705429971218109130859375, 0.15996269881725311279296875), float3(0.4323053061962127685546875, 0.518360316753387451171875, 0.049291200935840606689453125), float3(-0.00852870009839534759521484375, 0.0400427989661693572998046875, 0.968486726284027099609375)))) * float3x3(float3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), float3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), float3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875)))) * _573; + float3 _771; + if (_Globals.ColorShadow_Tint2.w != 0.0) + { + float _750 = dot(_743, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float3 _753 = (_743 / float3(_750)) - float3(1.0); + _771 = mix(_743, _743 * (_575 * (float3x3(float3(0.544169127941131591796875, 0.23959259688854217529296875, 0.16669429838657379150390625), float3(0.23946559429168701171875, 0.702153027057647705078125, 0.058381401002407073974609375), float3(-0.0023439000360667705535888671875, 0.0361833982169628143310546875, 1.05521833896636962890625)) * float3x3(float3(1.6410233974456787109375, -0.324803292751312255859375, -0.23642469942569732666015625), float3(-0.663662850856781005859375, 1.6153316497802734375, 0.016756348311901092529296875), float3(0.01172189414501190185546875, -0.008284442126750946044921875, 0.98839485645294189453125)))), float3((1.0 - exp2((-4.0) * dot(_753, _753))) * (1.0 - exp2((((-4.0) * _Globals.ExpandGamut) * _750) * _750)))); + } + else + { + _771 = _743; + } + float _772 = dot(_771, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625)); + float4 _777 = _Globals.ColorSaturationShadows * _Globals.ColorSaturation; + float4 _782 = _Globals.ColorContrastShadows * _Globals.ColorContrast; + float4 _787 = _Globals.ColorGammaShadows * _Globals.ColorGamma; + float4 _792 = _Globals.ColorGainShadows * _Globals.ColorGain; + float4 _797 = _Globals.ColorOffsetShadows + _Globals.ColorOffset; + float3 _798 = float3(_772); + float _830 = smoothstep(0.0, _Globals.ColorCorrectionShadowsMax, _772); + float4 _834 = _Globals.ColorSaturationHighlights * _Globals.ColorSaturation; + float4 _837 = _Globals.ColorContrastHighlights * _Globals.ColorContrast; + float4 _840 = _Globals.ColorGammaHighlights * _Globals.ColorGamma; + float4 _843 = _Globals.ColorGainHighlights * _Globals.ColorGain; + float4 _846 = _Globals.ColorOffsetHighlights + _Globals.ColorOffset; + float _878 = smoothstep(_Globals.ColorCorrectionHighlightsMin, 1.0, _772); + float4 _881 = _Globals.ColorSaturationMidtones * _Globals.ColorSaturation; + float4 _884 = _Globals.ColorContrastMidtones * _Globals.ColorContrast; + float4 _887 = _Globals.ColorGammaMidtones * _Globals.ColorGamma; + float4 _890 = _Globals.ColorGainMidtones * _Globals.ColorGain; + float4 _893 = _Globals.ColorOffsetMidtones + _Globals.ColorOffset; + float3 _931 = ((((pow(pow(fast::max(float3(0.0), mix(_798, _771, _777.xyz * float3(_777.w))) * float3(5.5555553436279296875), _782.xyz * float3(_782.w)) * float3(0.180000007152557373046875), float3(1.0) / (_787.xyz * float3(_787.w))) * (_792.xyz * float3(_792.w))) + (_797.xyz + float3(_797.w))) * float3(1.0 - _830)) + (((pow(pow(fast::max(float3(0.0), mix(_798, _771, _881.xyz * float3(_881.w))) * float3(5.5555553436279296875), _884.xyz * float3(_884.w)) * float3(0.180000007152557373046875), float3(1.0) / (_887.xyz * float3(_887.w))) * (_890.xyz * float3(_890.w))) + (_893.xyz + float3(_893.w))) * float3(_830 - _878))) + (((pow(pow(fast::max(float3(0.0), mix(_798, _771, _834.xyz * float3(_834.w))) * float3(5.5555553436279296875), _837.xyz * float3(_837.w)) * float3(0.180000007152557373046875), float3(1.0) / (_840.xyz * float3(_840.w))) * (_843.xyz * float3(_843.w))) + (_846.xyz + float3(_846.w))) * float3(_878)); + float3 _932 = _931 * _575; + float3 _940 = float3(_Globals.BlueCorrection); + float3 _942 = mix(_931, _931 * ((_577 * float3x3(float3(0.940437257289886474609375, -0.01830687932670116424560546875, 0.07786960899829864501953125), float3(0.008378696627914905548095703125, 0.82866001129150390625, 0.162961304187774658203125), float3(0.0005471261101774871349334716796875, -0.00088337459601461887359619140625, 1.00033628940582275390625))) * _576), _940) * _577; + float _943 = _942.x; + float _944 = _942.y; + float _946 = _942.z; + float _949 = fast::max(fast::max(_943, _944), _946); + float _954 = (fast::max(_949, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_943, _944), _946), 1.0000000133514319600180897396058e-10)) / fast::max(_949, 0.00999999977648258209228515625); + float _967 = ((_946 + _944) + _943) + (1.75 * sqrt(((_946 * (_946 - _944)) + (_944 * (_944 - _943))) + (_943 * (_943 - _946)))); + float _968 = _967 * 0.3333333432674407958984375; + float _969 = _954 - 0.4000000059604644775390625; + float _974 = fast::max(1.0 - abs(_969 * 2.5), 0.0); + float _982 = (1.0 + (float(int(sign(_969 * 5.0))) * (1.0 - (_974 * _974)))) * 0.02500000037252902984619140625; + float _995; + if (_968 <= 0.053333334624767303466796875) + { + _995 = _982; + } + else + { + float _994; + if (_968 >= 0.1599999964237213134765625) + { + _994 = 0.0; + } + else + { + _994 = _982 * ((0.23999999463558197021484375 / _967) - 0.5); + } + _995 = _994; + } + float3 _998 = _942 * float3(1.0 + _995); + float _999 = _998.x; + float _1000 = _998.y; + float _1002 = _998.z; + float _1016; + if ((_999 == _1000) && (_1000 == _1002)) + { + _1016 = 0.0; + } + else + { + _1016 = 57.2957763671875 * atan2(sqrt(3.0) * (_1000 - _1002), ((2.0 * _999) - _1000) - _1002); + } + float _1021; + if (_1016 < 0.0) + { + _1021 = _1016 + 360.0; + } + else + { + _1021 = _1016; + } + float _1022 = fast::clamp(_1021, 0.0, 360.0); + float _1027; + if (_1022 > 180.0) + { + _1027 = _1022 - 360.0; + } + else + { + _1027 = _1022; + } + float _1031 = smoothstep(0.0, 1.0, 1.0 - abs(_1027 * 0.01481481455266475677490234375)); + float3 _1038 = _998; + _1038.x = _999 + ((((_1031 * _1031) * _954) * (0.02999999932944774627685546875 - _999)) * 0.180000007152557373046875); + float3 _1040 = fast::max(float3(0.0), _1038 * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375))); + float _1049 = (1.0 + _Globals.FilmBlackClip) - _Globals.FilmToe; + float _1052 = 1.0 + _Globals.FilmWhiteClip; + float _1055 = _1052 - _Globals.FilmShoulder; + float _1082; + if (_Globals.FilmToe > 0.800000011920928955078125) + { + _1082 = ((0.819999992847442626953125 - _Globals.FilmToe) / _Globals.FilmSlope) + (log(0.180000007152557373046875) / log(10.0)); + } + else + { + float _1061 = (0.180000007152557373046875 + _Globals.FilmBlackClip) / _1049; + _1082 = (log(0.180000007152557373046875) / log(10.0)) - ((0.5 * log(_1061 / (2.0 - _1061))) * (_1049 / _Globals.FilmSlope)); + } + float _1087 = ((1.0 - _Globals.FilmToe) / _Globals.FilmSlope) - _1082; + float _1089 = (_Globals.FilmShoulder / _Globals.FilmSlope) - _1087; + float _1091 = log(10.0); + float3 _1093 = log(mix(float3(dot(_1040, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1040, float3(0.959999978542327880859375))) / float3(_1091); + float3 _1097 = float3(_Globals.FilmSlope) * (_1093 + float3(_1087)); + float3 _1105 = float3(_1082); + float3 _1106 = _1093 - _1105; + float3 _1118 = float3(_1089); + float3 _1132 = fast::clamp(_1106 / float3(_1089 - _1082), float3(0.0), float3(1.0)); + float3 _1136 = select(_1132, float3(1.0) - _1132, bool3(_1089 < _1082)); + float3 _1141 = mix(select(_1097, float3(-_Globals.FilmBlackClip) + (float3(2.0 * _1049) / (float3(1.0) + exp(float3(((-2.0) * _Globals.FilmSlope) / _1049) * _1106))), _1093 < _1105), select(_1097, float3(_1052) - (float3(2.0 * _1055) / (float3(1.0) + exp(float3((2.0 * _Globals.FilmSlope) / _1055) * (_1093 - _1118)))), _1093 > _1118), ((float3(3.0) - (float3(2.0) * _1136)) * _1136) * _1136); + float3 _1145 = fast::max(float3(0.0), mix(float3(dot(_1141, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1141, float3(0.930000007152557373046875))); + float3 _1215; + if (_Globals.ColorShadow_Tint2.w == 0.0) + { + float3 _1157 = _525; + _1157.x = dot(_932, _Globals.ColorMatrixR_ColorCurveCd1.xyz); + float3 _1162 = _1157; + _1162.y = dot(_932, _Globals.ColorMatrixG_ColorCurveCd3Cm3.xyz); + float3 _1167 = _1162; + _1167.z = dot(_932, _Globals.ColorMatrixB_ColorCurveCm2.xyz); + float3 _1183 = fast::max(float3(0.0), _1167 * (_Globals.ColorShadow_Tint1.xyz + (_Globals.ColorShadow_Tint2.xyz * float3(1.0 / (dot(_932, _Globals.ColorShadow_Luma.xyz) + 1.0))))); + float3 _1188 = fast::max(float3(0.0), _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx - _1183); + float3 _1190 = fast::max(_1183, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz); + _1215 = ((((_1190 * _Globals.ColorCurve_Ch1_Ch2.xxx) + _Globals.ColorCurve_Ch1_Ch2.yyy) * (float3(1.0) / (_1190 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.www))) + ((fast::clamp(_1183, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.xxx, _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.zzz) * _Globals.ColorMatrixB_ColorCurveCm2.www) + (((_1188 * _Globals.ColorMatrixR_ColorCurveCd1.www) * (float3(1.0) / (_1188 + _Globals.ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3.yyy))) + _Globals.ColorMatrixG_ColorCurveCd3Cm3.www))) - float3(0.00200000009499490261077880859375); + } + else + { + _1215 = fast::max(float3(0.0), mix(_1145, _1145 * ((_577 * float3x3(float3(1.06317996978759765625, 0.02339559979736804962158203125, -0.08657260239124298095703125), float3(-0.010633699595928192138671875, 1.2063200473785400390625, -0.1956900060176849365234375), float3(-0.0005908869788981974124908447265625, 0.00105247995816171169281005859375, 0.999538004398345947265625))) * _576), _940) * _575); + } + float3 _1216 = fast::clamp(_1215, float3(0.0), float3(1.0)); + float _1217 = _1216.x; + float _1229; + for (;;) + { + if (_1217 < 0.00313066993840038776397705078125) + { + _1229 = _1217 * 12.9200000762939453125; + break; + } + _1229 = (pow(_1217, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _1230 = _1216.y; + float _1242; + for (;;) + { + if (_1230 < 0.00313066993840038776397705078125) + { + _1242 = _1230 * 12.9200000762939453125; + break; + } + _1242 = (pow(_1230, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _1243 = _1216.z; + float _1255; + for (;;) + { + if (_1243 < 0.00313066993840038776397705078125) + { + _1255 = _1243 * 12.9200000762939453125; + break; + } + _1255 = (pow(_1243, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float3 _1256 = float3(_1229, _1242, _1255); + float3 _1258 = (_1256 * float3(0.9375)) + float3(0.03125); + float _1270 = (_1258.z * 16.0) - 0.5; + float _1271 = floor(_1270); + float _1275 = (_1258.x + _1271) * 0.0625; + float _1276 = _1258.y; + float4 _1279 = Texture1.sample(Texture1Sampler, float2(_1275, _1276)); + float4 _1283 = Texture1.sample(Texture1Sampler, float2(_1275 + 0.0625, _1276)); + float3 _1289 = fast::max(float3(6.1035199905745685100555419921875e-05), (float3(_Globals.LUTWeights[0].x) * _1256) + (float3(_Globals.LUTWeights[1].x) * mix(_1279, _1283, float4(_1270 - _1271)).xyz)); + float3 _1295 = select(_1289 * float3(0.077399380505084991455078125), pow((_1289 * float3(0.94786727428436279296875)) + float3(0.0521326996386051177978515625), float3(2.400000095367431640625)), _1289 > float3(0.040449999272823333740234375)); + float3 _1324 = pow(fast::max(float3(0.0), mix((((float3(_Globals.MappingPolynomial.x) * (_1295 * _1295)) + (float3(_Globals.MappingPolynomial.y) * _1295)) + float3(_Globals.MappingPolynomial.z)) * _Globals.ColorScale, _Globals.OverlayColor.xyz, float3(_Globals.OverlayColor.w))), float3(_Globals.InverseGamma.y)); + float3 _3103; + if (_Globals.OutputDevice == 0u) + { + float _3063 = _1324.x; + float _3075; + for (;;) + { + if (_3063 < 0.00313066993840038776397705078125) + { + _3075 = _3063 * 12.9200000762939453125; + break; + } + _3075 = (pow(_3063, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _3076 = _1324.y; + float _3088; + for (;;) + { + if (_3076 < 0.00313066993840038776397705078125) + { + _3088 = _3076 * 12.9200000762939453125; + break; + } + _3088 = (pow(_3076, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + float _3089 = _1324.z; + float _3101; + for (;;) + { + if (_3089 < 0.00313066993840038776397705078125) + { + _3101 = _3089 * 12.9200000762939453125; + break; + } + _3101 = (pow(_3089, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875; + break; + } + _3103 = float3(_3075, _3088, _3101); + } + else + { + float3 _3062; + if (_Globals.OutputDevice == 1u) + { + float3 _3055 = fast::max(float3(6.1035199905745685100555419921875e-05), (_1324 * _573) * _602); + _3062 = fast::min(_3055 * float3(4.5), (pow(fast::max(_3055, float3(0.017999999225139617919921875)), float3(0.449999988079071044921875)) * float3(1.09899997711181640625)) - float3(0.098999999463558197021484375)); + } + else + { + float3 _3052; + if ((_Globals.OutputDevice == 3u) || (_Globals.OutputDevice == 5u)) + { + float3 _2204 = (_932 * float3(1.5)) * (_572 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _2205 = _2204.x; + float _2206 = _2204.y; + float _2208 = _2204.z; + float _2211 = fast::max(fast::max(_2205, _2206), _2208); + float _2216 = (fast::max(_2211, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_2205, _2206), _2208), 1.0000000133514319600180897396058e-10)) / fast::max(_2211, 0.00999999977648258209228515625); + float _2229 = ((_2208 + _2206) + _2205) + (1.75 * sqrt(((_2208 * (_2208 - _2206)) + (_2206 * (_2206 - _2205))) + (_2205 * (_2205 - _2208)))); + float _2230 = _2229 * 0.3333333432674407958984375; + float _2231 = _2216 - 0.4000000059604644775390625; + float _2236 = fast::max(1.0 - abs(_2231 * 2.5), 0.0); + float _2244 = (1.0 + (float(int(sign(_2231 * 5.0))) * (1.0 - (_2236 * _2236)))) * 0.02500000037252902984619140625; + float _2257; + if (_2230 <= 0.053333334624767303466796875) + { + _2257 = _2244; + } + else + { + float _2256; + if (_2230 >= 0.1599999964237213134765625) + { + _2256 = 0.0; + } + else + { + _2256 = _2244 * ((0.23999999463558197021484375 / _2229) - 0.5); + } + _2257 = _2256; + } + float3 _2260 = _2204 * float3(1.0 + _2257); + float _2261 = _2260.x; + float _2262 = _2260.y; + float _2264 = _2260.z; + float _2278; + if ((_2261 == _2262) && (_2262 == _2264)) + { + _2278 = 0.0; + } + else + { + _2278 = 57.2957763671875 * atan2(sqrt(3.0) * (_2262 - _2264), ((2.0 * _2261) - _2262) - _2264); + } + float _2283; + if (_2278 < 0.0) + { + _2283 = _2278 + 360.0; + } + else + { + _2283 = _2278; + } + float _2284 = fast::clamp(_2283, 0.0, 360.0); + float _2289; + if (_2284 > 180.0) + { + _2289 = _2284 - 360.0; + } + else + { + _2289 = _2284; + } + float _2339; + if ((_2289 > (-67.5)) && (_2289 < 67.5)) + { + float _2296 = (_2289 - (-67.5)) * 0.0296296291053295135498046875; + int _2297 = int(_2296); + float _2299 = _2296 - float(_2297); + float _2300 = _2299 * _2299; + float _2301 = _2300 * _2299; + float _2338; + if (_2297 == 3) + { + _2338 = (((_2301 * (-0.16666667163372039794921875)) + (_2300 * 0.5)) + (_2299 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _2331; + if (_2297 == 2) + { + _2331 = ((_2301 * 0.5) + (_2300 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _2326; + if (_2297 == 1) + { + _2326 = (((_2301 * (-0.5)) + (_2300 * 0.5)) + (_2299 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _2319; + if (_2297 == 0) + { + _2319 = _2301 * 0.16666667163372039794921875; + } + else + { + _2319 = 0.0; + } + _2326 = _2319; + } + _2331 = _2326; + } + _2338 = _2331; + } + _2339 = _2338; + } + else + { + _2339 = 0.0; + } + float3 _2346 = _2260; + _2346.x = _2261 + ((((_2339 * 1.5) * _2216) * (0.02999999932944774627685546875 - _2261)) * 0.180000007152557373046875); + float3 _2349 = fast::clamp(fast::clamp(_2346, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _2352 = mix(float3(dot(_2349, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _2349, float3(0.959999978542327880859375)); + float _2353 = _2352.x; + float _2357 = 0.17999999225139617919921875 * exp2(18.0); + float _2359 = exp2(-14.0); + float _2362 = log((_2353 <= 0.0) ? _2359 : _2353) / _1091; + float _2364 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1091; + float _2431; + if (_2362 <= _2364) + { + _2431 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2371 = log(0.180000007152557373046875) / _1091; + float _2428; + if ((_2362 > _2364) && (_2362 < _2371)) + { + float _2411 = (3.0 * (_2362 - _2364)) / (_2371 - _2364); + int _2412 = int(_2411); + float _2414 = _2411 - float(_2412); + _2428 = dot(float3(_2414 * _2414, _2414, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2412], _499[_2412 + 1], _499[_2412 + 2])); + } + else + { + float _2379 = log(_2357) / _1091; + float _2407; + if ((_2362 >= _2371) && (_2362 < _2379)) + { + float _2390 = (3.0 * (_2362 - _2371)) / (_2379 - _2371); + int _2391 = int(_2390); + float _2393 = _2390 - float(_2391); + _2407 = dot(float3(_2393 * _2393, _2393, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2391], _500[_2391 + 1], _500[_2391 + 2])); + } + else + { + _2407 = log(10000.0) / _1091; + } + _2428 = _2407; + } + _2431 = _2428; + } + float3 _2433 = _523; + _2433.x = pow(10.0, _2431); + float _2434 = _2352.y; + float _2438 = log((_2434 <= 0.0) ? _2359 : _2434) / _1091; + float _2505; + if (_2438 <= _2364) + { + _2505 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2445 = log(0.180000007152557373046875) / _1091; + float _2502; + if ((_2438 > _2364) && (_2438 < _2445)) + { + float _2485 = (3.0 * (_2438 - _2364)) / (_2445 - _2364); + int _2486 = int(_2485); + float _2488 = _2485 - float(_2486); + _2502 = dot(float3(_2488 * _2488, _2488, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2486], _499[_2486 + 1], _499[_2486 + 2])); + } + else + { + float _2453 = log(_2357) / _1091; + float _2481; + if ((_2438 >= _2445) && (_2438 < _2453)) + { + float _2464 = (3.0 * (_2438 - _2445)) / (_2453 - _2445); + int _2465 = int(_2464); + float _2467 = _2464 - float(_2465); + _2481 = dot(float3(_2467 * _2467, _2467, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2465], _500[_2465 + 1], _500[_2465 + 2])); + } + else + { + _2481 = log(10000.0) / _1091; + } + _2502 = _2481; + } + _2505 = _2502; + } + float3 _2507 = _2433; + _2507.y = pow(10.0, _2505); + float _2508 = _2352.z; + float _2512 = log((_2508 <= 0.0) ? _2359 : _2508) / _1091; + float _2579; + if (_2512 <= _2364) + { + _2579 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2519 = log(0.180000007152557373046875) / _1091; + float _2576; + if ((_2512 > _2364) && (_2512 < _2519)) + { + float _2559 = (3.0 * (_2512 - _2364)) / (_2519 - _2364); + int _2560 = int(_2559); + float _2562 = _2559 - float(_2560); + _2576 = dot(float3(_2562 * _2562, _2562, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2560], _499[_2560 + 1], _499[_2560 + 2])); + } + else + { + float _2527 = log(_2357) / _1091; + float _2555; + if ((_2512 >= _2519) && (_2512 < _2527)) + { + float _2538 = (3.0 * (_2512 - _2519)) / (_2527 - _2519); + int _2539 = int(_2538); + float _2541 = _2538 - float(_2539); + _2555 = dot(float3(_2541 * _2541, _2541, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2539], _500[_2539 + 1], _500[_2539 + 2])); + } + else + { + _2555 = log(10000.0) / _1091; + } + _2576 = _2555; + } + _2579 = _2576; + } + float3 _2581 = _2507; + _2581.z = pow(10.0, _2579); + float3 _2583 = (_2581 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _2585 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _2589 = log((_2585 <= 0.0) ? _2359 : _2585) / _1091; + float _2656; + if (_2589 <= _2364) + { + _2656 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2596 = log(0.180000007152557373046875) / _1091; + float _2653; + if ((_2589 > _2364) && (_2589 < _2596)) + { + float _2636 = (3.0 * (_2589 - _2364)) / (_2596 - _2364); + int _2637 = int(_2636); + float _2639 = _2636 - float(_2637); + _2653 = dot(float3(_2639 * _2639, _2639, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2637], _499[_2637 + 1], _499[_2637 + 2])); + } + else + { + float _2604 = log(_2357) / _1091; + float _2632; + if ((_2589 >= _2596) && (_2589 < _2604)) + { + float _2615 = (3.0 * (_2589 - _2596)) / (_2604 - _2596); + int _2616 = int(_2615); + float _2618 = _2615 - float(_2616); + _2632 = dot(float3(_2618 * _2618, _2618, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2616], _500[_2616 + 1], _500[_2616 + 2])); + } + else + { + _2632 = log(10000.0) / _1091; + } + _2653 = _2632; + } + _2656 = _2653; + } + float _2659 = log(0.180000007152557373046875) / _1091; + float _2713; + if (_2659 <= _2364) + { + _2713 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2710; + if ((_2659 > _2364) && (_2659 < _2659)) + { + _2710 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[3], _499[4], _499[5])).z; + } + else + { + float _2672 = log(_2357) / _1091; + float _2700; + if ((_2659 >= _2659) && (_2659 < _2672)) + { + float _2683 = (3.0 * (_2659 - _2659)) / (_2672 - _2659); + int _2684 = int(_2683); + float _2686 = _2683 - float(_2684); + _2700 = dot(float3(_2686 * _2686, _2686, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2684], _500[_2684 + 1], _500[_2684 + 2])); + } + else + { + _2700 = log(10000.0) / _1091; + } + _2710 = _2700; + } + _2713 = _2710; + } + float _2714 = pow(10.0, _2713); + float _2716 = 0.17999999225139617919921875 * pow(2.0, 10.0); + float _2720 = log((_2716 <= 0.0) ? _2359 : _2716) / _1091; + float _2785; + if (_2720 <= _2364) + { + _2785 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _2782; + if ((_2720 > _2364) && (_2720 < _2659)) + { + float _2765 = (3.0 * (_2720 - _2364)) / (_2659 - _2364); + int _2766 = int(_2765); + float _2768 = _2765 - float(_2766); + _2782 = dot(float3(_2768 * _2768, _2768, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_2766], _499[_2766 + 1], _499[_2766 + 2])); + } + else + { + float _2733 = log(_2357) / _1091; + float _2761; + if ((_2720 >= _2659) && (_2720 < _2733)) + { + float _2744 = (3.0 * (_2720 - _2659)) / (_2733 - _2659); + int _2745 = int(_2744); + float _2747 = _2744 - float(_2745); + _2761 = dot(float3(_2747 * _2747, _2747, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_2745], _500[_2745 + 1], _500[_2745 + 2])); + } + else + { + _2761 = log(10000.0) / _1091; + } + _2782 = _2761; + } + _2785 = _2782; + } + float _2786 = pow(10.0, _2785); + float _2787 = _2583.x; + float _2791 = log((_2787 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2787) / _1091; + float _2792 = log(pow(10.0, _2656)); + float _2793 = _2792 / _1091; + float _2870; + if (_2791 <= _2793) + { + _2870 = (_2791 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1091) - ((3.0 * _2792) / _1091)); + } + else + { + float _2800 = log(_2714) / _1091; + float _2862; + if ((_2791 > _2793) && (_2791 < _2800)) + { + float _2845 = (7.0 * (_2791 - _2793)) / (_2800 - _2793); + int _2846 = int(_2845); + float _2848 = _2845 - float(_2846); + _2862 = dot(float3(_2848 * _2848, _2848, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_503[_2846], _503[_2846 + 1], _503[_2846 + 2])); + } + else + { + float _2807 = log(_2786); + float _2808 = _2807 / _1091; + float _2841; + if ((_2791 >= _2800) && (_2791 < _2808)) + { + float _2824 = (7.0 * (_2791 - _2800)) / (_2808 - _2800); + int _2825 = int(_2824); + float _2827 = _2824 - float(_2825); + _2841 = dot(float3(_2827 * _2827, _2827, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_504[_2825], _504[_2825 + 1], _504[_2825 + 2])); + } + else + { + _2841 = (_2791 * 0.0599999986588954925537109375) + ((log(1000.0) / _1091) - ((0.0599999986588954925537109375 * _2807) / _1091)); + } + _2862 = _2841; + } + _2870 = _2862; + } + float3 _2872 = _523; + _2872.x = pow(10.0, _2870); + float _2873 = _2583.y; + float _2877 = log((_2873 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2873) / _1091; + float _2954; + if (_2877 <= _2793) + { + _2954 = (_2877 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1091) - ((3.0 * _2792) / _1091)); + } + else + { + float _2884 = log(_2714) / _1091; + float _2946; + if ((_2877 > _2793) && (_2877 < _2884)) + { + float _2929 = (7.0 * (_2877 - _2793)) / (_2884 - _2793); + int _2930 = int(_2929); + float _2932 = _2929 - float(_2930); + _2946 = dot(float3(_2932 * _2932, _2932, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_503[_2930], _503[_2930 + 1], _503[_2930 + 2])); + } + else + { + float _2891 = log(_2786); + float _2892 = _2891 / _1091; + float _2925; + if ((_2877 >= _2884) && (_2877 < _2892)) + { + float _2908 = (7.0 * (_2877 - _2884)) / (_2892 - _2884); + int _2909 = int(_2908); + float _2911 = _2908 - float(_2909); + _2925 = dot(float3(_2911 * _2911, _2911, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_504[_2909], _504[_2909 + 1], _504[_2909 + 2])); + } + else + { + _2925 = (_2877 * 0.0599999986588954925537109375) + ((log(1000.0) / _1091) - ((0.0599999986588954925537109375 * _2891) / _1091)); + } + _2946 = _2925; + } + _2954 = _2946; + } + float3 _2956 = _2872; + _2956.y = pow(10.0, _2954); + float _2957 = _2583.z; + float _2961 = log((_2957 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2957) / _1091; + float _3038; + if (_2961 <= _2793) + { + _3038 = (_2961 * 3.0) + ((log(9.9999997473787516355514526367188e-05) / _1091) - ((3.0 * _2792) / _1091)); + } + else + { + float _2968 = log(_2714) / _1091; + float _3030; + if ((_2961 > _2793) && (_2961 < _2968)) + { + float _3013 = (7.0 * (_2961 - _2793)) / (_2968 - _2793); + int _3014 = int(_3013); + float _3016 = _3013 - float(_3014); + _3030 = dot(float3(_3016 * _3016, _3016, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_503[_3014], _503[_3014 + 1], _503[_3014 + 2])); + } + else + { + float _2975 = log(_2786); + float _2976 = _2975 / _1091; + float _3009; + if ((_2961 >= _2968) && (_2961 < _2976)) + { + float _2992 = (7.0 * (_2961 - _2968)) / (_2976 - _2968); + int _2993 = int(_2992); + float _2995 = _2992 - float(_2993); + _3009 = dot(float3(_2995 * _2995, _2995, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_504[_2993], _504[_2993 + 1], _504[_2993 + 2])); + } + else + { + _3009 = (_2961 * 0.0599999986588954925537109375) + ((log(1000.0) / _1091) - ((0.0599999986588954925537109375 * _2975) / _1091)); + } + _3030 = _3009; + } + _3038 = _3030; + } + float3 _3040 = _2956; + _3040.z = pow(10.0, _3038); + float3 _3044 = pow(((_3040 - float3(3.5073844628641381859779357910156e-05)) * _602) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _3052 = pow((float3(0.8359375) + (float3(18.8515625) * _3044)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _3044))), float3(78.84375)); + } + else + { + float3 _2201; + if ((_Globals.OutputDevice == 4u) || (_Globals.OutputDevice == 6u)) + { + float3 _1369 = (_932 * float3(1.5)) * (_572 * float3x3(float3(1.04981100559234619140625, 0.0, -9.74845024757087230682373046875e-05), float3(-0.49590301513671875, 1.37331306934356689453125, 0.09824003279209136962890625), float3(0.0, 0.0, 0.991252005100250244140625))); + float _1370 = _1369.x; + float _1371 = _1369.y; + float _1373 = _1369.z; + float _1376 = fast::max(fast::max(_1370, _1371), _1373); + float _1381 = (fast::max(_1376, 1.0000000133514319600180897396058e-10) - fast::max(fast::min(fast::min(_1370, _1371), _1373), 1.0000000133514319600180897396058e-10)) / fast::max(_1376, 0.00999999977648258209228515625); + float _1394 = ((_1373 + _1371) + _1370) + (1.75 * sqrt(((_1373 * (_1373 - _1371)) + (_1371 * (_1371 - _1370))) + (_1370 * (_1370 - _1373)))); + float _1395 = _1394 * 0.3333333432674407958984375; + float _1396 = _1381 - 0.4000000059604644775390625; + float _1401 = fast::max(1.0 - abs(_1396 * 2.5), 0.0); + float _1409 = (1.0 + (float(int(sign(_1396 * 5.0))) * (1.0 - (_1401 * _1401)))) * 0.02500000037252902984619140625; + float _1422; + if (_1395 <= 0.053333334624767303466796875) + { + _1422 = _1409; + } + else + { + float _1421; + if (_1395 >= 0.1599999964237213134765625) + { + _1421 = 0.0; + } + else + { + _1421 = _1409 * ((0.23999999463558197021484375 / _1394) - 0.5); + } + _1422 = _1421; + } + float3 _1425 = _1369 * float3(1.0 + _1422); + float _1426 = _1425.x; + float _1427 = _1425.y; + float _1429 = _1425.z; + float _1443; + if ((_1426 == _1427) && (_1427 == _1429)) + { + _1443 = 0.0; + } + else + { + _1443 = 57.2957763671875 * atan2(sqrt(3.0) * (_1427 - _1429), ((2.0 * _1426) - _1427) - _1429); + } + float _1448; + if (_1443 < 0.0) + { + _1448 = _1443 + 360.0; + } + else + { + _1448 = _1443; + } + float _1449 = fast::clamp(_1448, 0.0, 360.0); + float _1454; + if (_1449 > 180.0) + { + _1454 = _1449 - 360.0; + } + else + { + _1454 = _1449; + } + float _1504; + if ((_1454 > (-67.5)) && (_1454 < 67.5)) + { + float _1461 = (_1454 - (-67.5)) * 0.0296296291053295135498046875; + int _1462 = int(_1461); + float _1464 = _1461 - float(_1462); + float _1465 = _1464 * _1464; + float _1466 = _1465 * _1464; + float _1503; + if (_1462 == 3) + { + _1503 = (((_1466 * (-0.16666667163372039794921875)) + (_1465 * 0.5)) + (_1464 * (-0.5))) + 0.16666667163372039794921875; + } + else + { + float _1496; + if (_1462 == 2) + { + _1496 = ((_1466 * 0.5) + (_1465 * (-1.0))) + 0.666666686534881591796875; + } + else + { + float _1491; + if (_1462 == 1) + { + _1491 = (((_1466 * (-0.5)) + (_1465 * 0.5)) + (_1464 * 0.5)) + 0.16666667163372039794921875; + } + else + { + float _1484; + if (_1462 == 0) + { + _1484 = _1466 * 0.16666667163372039794921875; + } + else + { + _1484 = 0.0; + } + _1491 = _1484; + } + _1496 = _1491; + } + _1503 = _1496; + } + _1504 = _1503; + } + else + { + _1504 = 0.0; + } + float3 _1511 = _1425; + _1511.x = _1426 + ((((_1504 * 1.5) * _1381) * (0.02999999932944774627685546875 - _1426)) * 0.180000007152557373046875); + float3 _1514 = fast::clamp(fast::clamp(_1511, float3(0.0), float3(65535.0)) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)), float3(0.0), float3(65535.0)); + float3 _1517 = mix(float3(dot(_1514, float3(0.272228717803955078125, 0.674081742763519287109375, 0.053689517080783843994140625))), _1514, float3(0.959999978542327880859375)); + float _1518 = _1517.x; + float _1522 = 0.17999999225139617919921875 * exp2(18.0); + float _1524 = exp2(-14.0); + float _1527 = log((_1518 <= 0.0) ? _1524 : _1518) / _1091; + float _1529 = log(0.17999999225139617919921875 * exp2(-15.0)) / _1091; + float _1596; + if (_1527 <= _1529) + { + _1596 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1536 = log(0.180000007152557373046875) / _1091; + float _1593; + if ((_1527 > _1529) && (_1527 < _1536)) + { + float _1576 = (3.0 * (_1527 - _1529)) / (_1536 - _1529); + int _1577 = int(_1576); + float _1579 = _1576 - float(_1577); + _1593 = dot(float3(_1579 * _1579, _1579, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1577], _499[_1577 + 1], _499[_1577 + 2])); + } + else + { + float _1544 = log(_1522) / _1091; + float _1572; + if ((_1527 >= _1536) && (_1527 < _1544)) + { + float _1555 = (3.0 * (_1527 - _1536)) / (_1544 - _1536); + int _1556 = int(_1555); + float _1558 = _1555 - float(_1556); + _1572 = dot(float3(_1558 * _1558, _1558, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1556], _500[_1556 + 1], _500[_1556 + 2])); + } + else + { + _1572 = log(10000.0) / _1091; + } + _1593 = _1572; + } + _1596 = _1593; + } + float3 _1598 = _523; + _1598.x = pow(10.0, _1596); + float _1599 = _1517.y; + float _1603 = log((_1599 <= 0.0) ? _1524 : _1599) / _1091; + float _1670; + if (_1603 <= _1529) + { + _1670 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1610 = log(0.180000007152557373046875) / _1091; + float _1667; + if ((_1603 > _1529) && (_1603 < _1610)) + { + float _1650 = (3.0 * (_1603 - _1529)) / (_1610 - _1529); + int _1651 = int(_1650); + float _1653 = _1650 - float(_1651); + _1667 = dot(float3(_1653 * _1653, _1653, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1651], _499[_1651 + 1], _499[_1651 + 2])); + } + else + { + float _1618 = log(_1522) / _1091; + float _1646; + if ((_1603 >= _1610) && (_1603 < _1618)) + { + float _1629 = (3.0 * (_1603 - _1610)) / (_1618 - _1610); + int _1630 = int(_1629); + float _1632 = _1629 - float(_1630); + _1646 = dot(float3(_1632 * _1632, _1632, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1630], _500[_1630 + 1], _500[_1630 + 2])); + } + else + { + _1646 = log(10000.0) / _1091; + } + _1667 = _1646; + } + _1670 = _1667; + } + float3 _1672 = _1598; + _1672.y = pow(10.0, _1670); + float _1673 = _1517.z; + float _1677 = log((_1673 <= 0.0) ? _1524 : _1673) / _1091; + float _1744; + if (_1677 <= _1529) + { + _1744 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1684 = log(0.180000007152557373046875) / _1091; + float _1741; + if ((_1677 > _1529) && (_1677 < _1684)) + { + float _1724 = (3.0 * (_1677 - _1529)) / (_1684 - _1529); + int _1725 = int(_1724); + float _1727 = _1724 - float(_1725); + _1741 = dot(float3(_1727 * _1727, _1727, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1725], _499[_1725 + 1], _499[_1725 + 2])); + } + else + { + float _1692 = log(_1522) / _1091; + float _1720; + if ((_1677 >= _1684) && (_1677 < _1692)) + { + float _1703 = (3.0 * (_1677 - _1684)) / (_1692 - _1684); + int _1704 = int(_1703); + float _1706 = _1703 - float(_1704); + _1720 = dot(float3(_1706 * _1706, _1706, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1704], _500[_1704 + 1], _500[_1704 + 2])); + } + else + { + _1720 = log(10000.0) / _1091; + } + _1741 = _1720; + } + _1744 = _1741; + } + float3 _1746 = _1672; + _1746.z = pow(10.0, _1744); + float3 _1748 = (_1746 * float3x3(float3(0.695452213287353515625, 0.140678703784942626953125, 0.16386906802654266357421875), float3(0.0447945632040500640869140625, 0.859671115875244140625, 0.095534317195415496826171875), float3(-0.0055258828215301036834716796875, 0.0040252101607620716094970703125, 1.00150072574615478515625))) * float3x3(float3(1.45143926143646240234375, -0.236510753631591796875, -0.214928567409515380859375), float3(-0.07655377686023712158203125, 1.1762297153472900390625, -0.0996759235858917236328125), float3(0.0083161480724811553955078125, -0.0060324496589601039886474609375, 0.99771630764007568359375)); + float _1750 = 0.17999999225139617919921875 * pow(2.0, -12.0); + float _1754 = log((_1750 <= 0.0) ? _1524 : _1750) / _1091; + float _1821; + if (_1754 <= _1529) + { + _1821 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1761 = log(0.180000007152557373046875) / _1091; + float _1818; + if ((_1754 > _1529) && (_1754 < _1761)) + { + float _1801 = (3.0 * (_1754 - _1529)) / (_1761 - _1529); + int _1802 = int(_1801); + float _1804 = _1801 - float(_1802); + _1818 = dot(float3(_1804 * _1804, _1804, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1802], _499[_1802 + 1], _499[_1802 + 2])); + } + else + { + float _1769 = log(_1522) / _1091; + float _1797; + if ((_1754 >= _1761) && (_1754 < _1769)) + { + float _1780 = (3.0 * (_1754 - _1761)) / (_1769 - _1761); + int _1781 = int(_1780); + float _1783 = _1780 - float(_1781); + _1797 = dot(float3(_1783 * _1783, _1783, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1781], _500[_1781 + 1], _500[_1781 + 2])); + } + else + { + _1797 = log(10000.0) / _1091; + } + _1818 = _1797; + } + _1821 = _1818; + } + float _1824 = log(0.180000007152557373046875) / _1091; + float _1878; + if (_1824 <= _1529) + { + _1878 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1875; + if ((_1824 > _1529) && (_1824 < _1824)) + { + _1875 = (float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[3], _499[4], _499[5])).z; + } + else + { + float _1837 = log(_1522) / _1091; + float _1865; + if ((_1824 >= _1824) && (_1824 < _1837)) + { + float _1848 = (3.0 * (_1824 - _1824)) / (_1837 - _1824); + int _1849 = int(_1848); + float _1851 = _1848 - float(_1849); + _1865 = dot(float3(_1851 * _1851, _1851, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1849], _500[_1849 + 1], _500[_1849 + 2])); + } + else + { + _1865 = log(10000.0) / _1091; + } + _1875 = _1865; + } + _1878 = _1875; + } + float _1879 = pow(10.0, _1878); + float _1881 = 0.17999999225139617919921875 * pow(2.0, 11.0); + float _1885 = log((_1881 <= 0.0) ? _1524 : _1881) / _1091; + float _1950; + if (_1885 <= _1529) + { + _1950 = log(9.9999997473787516355514526367188e-05) / _1091; + } + else + { + float _1947; + if ((_1885 > _1529) && (_1885 < _1824)) + { + float _1930 = (3.0 * (_1885 - _1529)) / (_1824 - _1529); + int _1931 = int(_1930); + float _1933 = _1930 - float(_1931); + _1947 = dot(float3(_1933 * _1933, _1933, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_499[_1931], _499[_1931 + 1], _499[_1931 + 2])); + } + else + { + float _1898 = log(_1522) / _1091; + float _1926; + if ((_1885 >= _1824) && (_1885 < _1898)) + { + float _1909 = (3.0 * (_1885 - _1824)) / (_1898 - _1824); + int _1910 = int(_1909); + float _1912 = _1909 - float(_1910); + _1926 = dot(float3(_1912 * _1912, _1912, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_500[_1910], _500[_1910 + 1], _500[_1910 + 2])); + } + else + { + _1926 = log(10000.0) / _1091; + } + _1947 = _1926; + } + _1950 = _1947; + } + float _1951 = pow(10.0, _1950); + float _1952 = _1748.x; + float _1956 = log((_1952 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _1952) / _1091; + float _1958 = log(pow(10.0, _1821)) / _1091; + float _2030; + if (_1956 <= _1958) + { + _2030 = log(0.004999999888241291046142578125) / _1091; + } + else + { + float _1965 = log(_1879) / _1091; + float _2027; + if ((_1956 > _1958) && (_1956 < _1965)) + { + float _2010 = (7.0 * (_1956 - _1958)) / (_1965 - _1958); + int _2011 = int(_2010); + float _2013 = _2010 - float(_2011); + _2027 = dot(float3(_2013 * _2013, _2013, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_506[_2011], _506[_2011 + 1], _506[_2011 + 2])); + } + else + { + float _1972 = log(_1951); + float _1973 = _1972 / _1091; + float _2006; + if ((_1956 >= _1965) && (_1956 < _1973)) + { + float _1989 = (7.0 * (_1956 - _1965)) / (_1973 - _1965); + int _1990 = int(_1989); + float _1992 = _1989 - float(_1990); + _2006 = dot(float3(_1992 * _1992, _1992, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_507[_1990], _507[_1990 + 1], _507[_1990 + 2])); + } + else + { + _2006 = (_1956 * 0.119999997317790985107421875) + ((log(2000.0) / _1091) - ((0.119999997317790985107421875 * _1972) / _1091)); + } + _2027 = _2006; + } + _2030 = _2027; + } + float3 _2032 = _523; + _2032.x = pow(10.0, _2030); + float _2033 = _1748.y; + float _2037 = log((_2033 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2033) / _1091; + float _2109; + if (_2037 <= _1958) + { + _2109 = log(0.004999999888241291046142578125) / _1091; + } + else + { + float _2044 = log(_1879) / _1091; + float _2106; + if ((_2037 > _1958) && (_2037 < _2044)) + { + float _2089 = (7.0 * (_2037 - _1958)) / (_2044 - _1958); + int _2090 = int(_2089); + float _2092 = _2089 - float(_2090); + _2106 = dot(float3(_2092 * _2092, _2092, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_506[_2090], _506[_2090 + 1], _506[_2090 + 2])); + } + else + { + float _2051 = log(_1951); + float _2052 = _2051 / _1091; + float _2085; + if ((_2037 >= _2044) && (_2037 < _2052)) + { + float _2068 = (7.0 * (_2037 - _2044)) / (_2052 - _2044); + int _2069 = int(_2068); + float _2071 = _2068 - float(_2069); + _2085 = dot(float3(_2071 * _2071, _2071, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_507[_2069], _507[_2069 + 1], _507[_2069 + 2])); + } + else + { + _2085 = (_2037 * 0.119999997317790985107421875) + ((log(2000.0) / _1091) - ((0.119999997317790985107421875 * _2051) / _1091)); + } + _2106 = _2085; + } + _2109 = _2106; + } + float3 _2111 = _2032; + _2111.y = pow(10.0, _2109); + float _2112 = _1748.z; + float _2116 = log((_2112 <= 0.0) ? 9.9999997473787516355514526367188e-05 : _2112) / _1091; + float _2188; + if (_2116 <= _1958) + { + _2188 = log(0.004999999888241291046142578125) / _1091; + } + else + { + float _2123 = log(_1879) / _1091; + float _2185; + if ((_2116 > _1958) && (_2116 < _2123)) + { + float _2168 = (7.0 * (_2116 - _1958)) / (_2123 - _1958); + int _2169 = int(_2168); + float _2171 = _2168 - float(_2169); + _2185 = dot(float3(_2171 * _2171, _2171, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_506[_2169], _506[_2169 + 1], _506[_2169 + 2])); + } + else + { + float _2130 = log(_1951); + float _2131 = _2130 / _1091; + float _2164; + if ((_2116 >= _2123) && (_2116 < _2131)) + { + float _2147 = (7.0 * (_2116 - _2123)) / (_2131 - _2123); + int _2148 = int(_2147); + float _2150 = _2147 - float(_2148); + _2164 = dot(float3(_2150 * _2150, _2150, 1.0), float3x3(float3(0.5, -1.0, 0.5), float3(-1.0, 1.0, 0.5), float3(0.5, 0.0, 0.0)) * float3(_507[_2148], _507[_2148 + 1], _507[_2148 + 2])); + } + else + { + _2164 = (_2116 * 0.119999997317790985107421875) + ((log(2000.0) / _1091) - ((0.119999997317790985107421875 * _2130) / _1091)); + } + _2185 = _2164; + } + _2188 = _2185; + } + float3 _2190 = _2111; + _2190.z = pow(10.0, _2188); + float3 _2193 = pow((_2190 * _602) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _2201 = pow((float3(0.8359375) + (float3(18.8515625) * _2193)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _2193))), float3(78.84375)); + } + else + { + float3 _1366; + if (_Globals.OutputDevice == 7u) + { + float3 _1358 = pow(((_932 * _573) * _602) * float3(9.9999997473787516355514526367188e-05), float3(0.1593017578125)); + _1366 = pow((float3(0.8359375) + (float3(18.8515625) * _1358)) * (float3(1.0) / (float3(1.0) + (float3(18.6875) * _1358))), float3(78.84375)); + } + else + { + _1366 = pow((_1324 * _573) * _602, float3(_Globals.InverseGamma.z)); + } + _2201 = _1366; + } + _3052 = _2201; + } + _3062 = _3052; + } + _3103 = _3062; + } + float3 _3104 = _3103 * float3(0.95238101482391357421875); + float4 _3106 = float4(_3104.x, _3104.y, _3104.z, float4(0.0).w); + _3106.w = 0.0; + out.out_var_SV_Target0 = _3106; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag new file mode 100644 index 000000000..73dc2eee1 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag @@ -0,0 +1,350 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_PrimitiveDither +{ + float PrimitiveDither_LODFactor; +}; + +struct type_PrimitiveFade +{ + float2 PrimitiveFade_FadeTimeScaleBias; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[9]; + float4 Material_ScalarExpressions[3]; +}; + +constant float _98 = {}; +constant float _103 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; + float gl_FragDepth [[depth(less)]]; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD6 [[user(locn0)]]; + float4 in_var_TEXCOORD7 [[user(locn1)]]; + float4 in_var_TEXCOORD10_centroid [[user(locn2)]]; + float4 in_var_TEXCOORD11_centroid [[user(locn3)]]; + float4 in_var_TEXCOORD0_0 [[user(locn4)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_PrimitiveDither& PrimitiveDither [[buffer(1)]], constant type_PrimitiveFade& PrimitiveFade [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture2d Material_Texture2D_0 [[texture(0)]], texture2d Material_Texture2D_3 [[texture(1)]], sampler Material_Texture2D_0Sampler [[sampler(0)]], sampler Material_Texture2D_3Sampler [[sampler(1)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + spvUnsafeArray in_var_TEXCOORD0 = {}; + in_var_TEXCOORD0[0] = in.in_var_TEXCOORD0_0; + float2 _135 = gl_FragCoord.xy - View.View_ViewRectMin.xy; + float4 _140 = float4(_103, _103, gl_FragCoord.z, 1.0) * float4(gl_FragCoord.w); + float4 _144 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0); + float3 _148 = _144.xyz / float3(_144.w); + float3 _149 = _148 - float3(View.View_PreViewTranslation); + float3 _151 = normalize(-_148); + float3 _152 = _151 * float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz); + float _170 = mix(Material.Material_ScalarExpressions[0].y, Material.Material_ScalarExpressions[0].z, fast::min(fast::max(abs(dot(_151, in.in_var_TEXCOORD11_centroid.xyz)), 0.0), 1.0)); + float _172 = 1.0 / _170; + float2 _174 = (float2(Material.Material_ScalarExpressions[0].x) * ((_152.xy * float2(-1.0)) / float2(_152.z))) * float2(_172); + float _180_copy; + float2 _183; + _183 = float2(0.0); + float _188; + float _211; + float2 _212; + float _180 = 1.0; + int _185 = 0; + float _187 = 1.0; + float _189 = 1.0; + for (;;) + { + if (float(_185) < (floor(_170) + 2.0)) + { + _188 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _183), gradient2d(dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)), dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)))).y; + if (_180 < _188) + { + float _201 = _188 - _180; + float _203 = _201 / ((_189 - _187) + _201); + _211 = (_189 * _203) + (_180 * (1.0 - _203)); + _212 = _183 - (float2(_203) * _174); + break; + } + _180_copy = _180; + _180 -= _172; + _183 += _174; + _185++; + _187 = _188; + _189 = _180_copy; + continue; + } + else + { + _211 = _98; + _212 = _183; + break; + } + } + float4 _218 = Material_Texture2D_0.sample(Material_Texture2D_0Sampler, (float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y) + _212.xy), bias(View.View_MaterialTextureMipBias)); + float2 _229 = _135 + float2(View.View_TemporalAAParams.x); + float _237 = float((uint(_229.x) + (2u * uint(_229.y))) % 5u); + float2 _238 = _135 * float2(0.015625); + float4 _242 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float4 _254 = Material_Texture2D_3.sample(Material_Texture2D_3Sampler, _238, bias(View.View_MaterialTextureMipBias)); + float3 _272 = float3(_212, (1.0 - _211) * Material.Material_ScalarExpressions[0].x); + float2 _275 = dfdx(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _276 = abs(_275); + float3 _279 = dfdx(_149); + float2 _283 = dfdy(float2(in_var_TEXCOORD0[0].x, in_var_TEXCOORD0[0].y)); + float2 _284 = abs(_283); + float3 _287 = dfdy(_149); + if (PrimitiveDither.PrimitiveDither_LODFactor != 0.0) + { + if (abs(PrimitiveDither.PrimitiveDither_LODFactor) > 0.001000000047497451305389404296875) + { + float _317 = fract(cos(dot(floor(gl_FragCoord.xy), float2(347.834503173828125, 3343.28369140625))) * 1000.0); + if ((float((PrimitiveDither.PrimitiveDither_LODFactor < 0.0) ? ((PrimitiveDither.PrimitiveDither_LODFactor + 1.0) > _317) : (PrimitiveDither.PrimitiveDither_LODFactor < _317)) - 0.001000000047497451305389404296875) < 0.0) + { + discard_fragment(); + } + } + } + if ((((_218.z + ((fast::min(fast::max(1.0 - (_218.x * Material.Material_ScalarExpressions[2].y), 0.0), 1.0) + ((_237 + (_242.x * Material.Material_ScalarExpressions[2].z)) * 0.16666667163372039794921875)) + (-0.5))) * ((fast::clamp((View.View_RealTime * PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.x) + PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.y, 0.0, 1.0) + ((_237 + _254.x) * 0.16666667163372039794921875)) + (-0.5))) - 0.33329999446868896484375) < 0.0) + { + discard_fragment(); + } + float2 _351 = ((((in.in_var_TEXCOORD6.xy / float2(in.in_var_TEXCOORD6.w)) - View.View_TemporalAAJitter.xy) - ((in.in_var_TEXCOORD7.xy / float2(in.in_var_TEXCOORD7.w)) - View.View_TemporalAAJitter.zw)) * float2(0.2495000064373016357421875)) + float2(0.49999237060546875); + out.gl_FragDepth = fast::min(_140.z / (_140.w + (sqrt(dot(_272, _272)) / (fast::max(sqrt(dot(_276, _276)) / sqrt(dot(_279, _279)), sqrt(dot(_284, _284)) / sqrt(dot(_287, _287))) / abs(dot(float3x3(View.View_ViewToTranslatedWorld[0].xyz, View.View_ViewToTranslatedWorld[1].xyz, View.View_ViewToTranslatedWorld[2].xyz) * float3(0.0, 0.0, 1.0), _151))))), gl_FragCoord.z); + out.out_var_SV_Target0 = float4(_351.x, _351.y, float2(0.0).x, float2(0.0).y); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag new file mode 100644 index 000000000..dd54893a2 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag @@ -0,0 +1,503 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct type_TranslucentBasePass +{ + uint TranslucentBasePass_Shared_Forward_NumLocalLights; + uint TranslucentBasePass_Shared_Forward_NumReflectionCaptures; + uint TranslucentBasePass_Shared_Forward_HasDirectionalLight; + uint TranslucentBasePass_Shared_Forward_NumGridCells; + packed_int3 TranslucentBasePass_Shared_Forward_CulledGridSize; + uint TranslucentBasePass_Shared_Forward_MaxCulledLightsPerCell; + uint TranslucentBasePass_Shared_Forward_LightGridPixelSizeShift; + uint PrePadding_TranslucentBasePass_Shared_Forward_36; + uint PrePadding_TranslucentBasePass_Shared_Forward_40; + uint PrePadding_TranslucentBasePass_Shared_Forward_44; + packed_float3 TranslucentBasePass_Shared_Forward_LightGridZParams; + float PrePadding_TranslucentBasePass_Shared_Forward_60; + packed_float3 TranslucentBasePass_Shared_Forward_DirectionalLightDirection; + float PrePadding_TranslucentBasePass_Shared_Forward_76; + packed_float3 TranslucentBasePass_Shared_Forward_DirectionalLightColor; + float TranslucentBasePass_Shared_Forward_DirectionalLightVolumetricScatteringIntensity; + uint TranslucentBasePass_Shared_Forward_DirectionalLightShadowMapChannelMask; + uint PrePadding_TranslucentBasePass_Shared_Forward_100; + float2 TranslucentBasePass_Shared_Forward_DirectionalLightDistanceFadeMAD; + uint TranslucentBasePass_Shared_Forward_NumDirectionalLightCascades; + uint PrePadding_TranslucentBasePass_Shared_Forward_116; + uint PrePadding_TranslucentBasePass_Shared_Forward_120; + uint PrePadding_TranslucentBasePass_Shared_Forward_124; + float4 TranslucentBasePass_Shared_Forward_CascadeEndDepths; + float4x4 TranslucentBasePass_Shared_Forward_DirectionalLightWorldToShadowMatrix[4]; + float4 TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapMinMax[4]; + float4 TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapAtlasBufferSize; + float TranslucentBasePass_Shared_Forward_DirectionalLightDepthBias; + uint TranslucentBasePass_Shared_Forward_DirectionalLightUseStaticShadowing; + uint PrePadding_TranslucentBasePass_Shared_Forward_488; + uint PrePadding_TranslucentBasePass_Shared_Forward_492; + float4 TranslucentBasePass_Shared_Forward_DirectionalLightStaticShadowBufferSize; + float4x4 TranslucentBasePass_Shared_Forward_DirectionalLightWorldToStaticShadow; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_576; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_580; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_584; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_588; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_592; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_596; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_600; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_604; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_608; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_612; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_616; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_620; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_624; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_628; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_632; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_636; + uint TranslucentBasePass_Shared_ForwardISR_NumLocalLights; + uint TranslucentBasePass_Shared_ForwardISR_NumReflectionCaptures; + uint TranslucentBasePass_Shared_ForwardISR_HasDirectionalLight; + uint TranslucentBasePass_Shared_ForwardISR_NumGridCells; + packed_int3 TranslucentBasePass_Shared_ForwardISR_CulledGridSize; + uint TranslucentBasePass_Shared_ForwardISR_MaxCulledLightsPerCell; + uint TranslucentBasePass_Shared_ForwardISR_LightGridPixelSizeShift; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_676; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_680; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_684; + packed_float3 TranslucentBasePass_Shared_ForwardISR_LightGridZParams; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_700; + packed_float3 TranslucentBasePass_Shared_ForwardISR_DirectionalLightDirection; + float PrePadding_TranslucentBasePass_Shared_ForwardISR_716; + packed_float3 TranslucentBasePass_Shared_ForwardISR_DirectionalLightColor; + float TranslucentBasePass_Shared_ForwardISR_DirectionalLightVolumetricScatteringIntensity; + uint TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowMapChannelMask; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_740; + float2 TranslucentBasePass_Shared_ForwardISR_DirectionalLightDistanceFadeMAD; + uint TranslucentBasePass_Shared_ForwardISR_NumDirectionalLightCascades; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_756; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_760; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_764; + float4 TranslucentBasePass_Shared_ForwardISR_CascadeEndDepths; + float4x4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToShadowMatrix[4]; + float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapMinMax[4]; + float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapAtlasBufferSize; + float TranslucentBasePass_Shared_ForwardISR_DirectionalLightDepthBias; + uint TranslucentBasePass_Shared_ForwardISR_DirectionalLightUseStaticShadowing; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_1128; + uint PrePadding_TranslucentBasePass_Shared_ForwardISR_1132; + float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightStaticShadowBufferSize; + float4x4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToStaticShadow; + float PrePadding_TranslucentBasePass_Shared_Reflection_1216; + float PrePadding_TranslucentBasePass_Shared_Reflection_1220; + float PrePadding_TranslucentBasePass_Shared_Reflection_1224; + float PrePadding_TranslucentBasePass_Shared_Reflection_1228; + float PrePadding_TranslucentBasePass_Shared_Reflection_1232; + float PrePadding_TranslucentBasePass_Shared_Reflection_1236; + float PrePadding_TranslucentBasePass_Shared_Reflection_1240; + float PrePadding_TranslucentBasePass_Shared_Reflection_1244; + float PrePadding_TranslucentBasePass_Shared_Reflection_1248; + float PrePadding_TranslucentBasePass_Shared_Reflection_1252; + float PrePadding_TranslucentBasePass_Shared_Reflection_1256; + float PrePadding_TranslucentBasePass_Shared_Reflection_1260; + float PrePadding_TranslucentBasePass_Shared_Reflection_1264; + float PrePadding_TranslucentBasePass_Shared_Reflection_1268; + float PrePadding_TranslucentBasePass_Shared_Reflection_1272; + float PrePadding_TranslucentBasePass_Shared_Reflection_1276; + float4 TranslucentBasePass_Shared_Reflection_SkyLightParameters; + float TranslucentBasePass_Shared_Reflection_SkyLightCubemapBrightness; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1300; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1304; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1308; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1312; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1316; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1320; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1324; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1328; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1332; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1336; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1340; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1344; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1348; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1352; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1356; + float4 TranslucentBasePass_Shared_PlanarReflection_ReflectionPlane; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionOrigin; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionXAxis; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionYAxis; + float3x4 TranslucentBasePass_Shared_PlanarReflection_InverseTransposeMirrorMatrix; + packed_float3 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1484; + float2 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters2; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1496; + float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1500; + float4x4 TranslucentBasePass_Shared_PlanarReflection_ProjectionWithExtraFOV[2]; + float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenScaleBias[2]; + float2 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenBound; + uint TranslucentBasePass_Shared_PlanarReflection_bIsStereo; + float PrePadding_TranslucentBasePass_Shared_Fog_1676; + float PrePadding_TranslucentBasePass_Shared_Fog_1680; + float PrePadding_TranslucentBasePass_Shared_Fog_1684; + float PrePadding_TranslucentBasePass_Shared_Fog_1688; + float PrePadding_TranslucentBasePass_Shared_Fog_1692; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters2; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogColorParameter; + float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters3; + float4 TranslucentBasePass_Shared_Fog_InscatteringLightDirection; + float4 TranslucentBasePass_Shared_Fog_DirectionalInscatteringColor; + float2 TranslucentBasePass_Shared_Fog_SinCosInscatteringColorCubemapRotation; + float PrePadding_TranslucentBasePass_Shared_Fog_1800; + float PrePadding_TranslucentBasePass_Shared_Fog_1804; + packed_float3 TranslucentBasePass_Shared_Fog_FogInscatteringTextureParameters; + float TranslucentBasePass_Shared_Fog_ApplyVolumetricFog; + float PrePadding_TranslucentBasePass_1824; + float PrePadding_TranslucentBasePass_1828; + float PrePadding_TranslucentBasePass_1832; + float PrePadding_TranslucentBasePass_1836; + float PrePadding_TranslucentBasePass_1840; + float PrePadding_TranslucentBasePass_1844; + float PrePadding_TranslucentBasePass_1848; + float PrePadding_TranslucentBasePass_1852; + float PrePadding_TranslucentBasePass_1856; + float PrePadding_TranslucentBasePass_1860; + float PrePadding_TranslucentBasePass_1864; + float PrePadding_TranslucentBasePass_1868; + float PrePadding_TranslucentBasePass_1872; + float PrePadding_TranslucentBasePass_1876; + float PrePadding_TranslucentBasePass_1880; + float PrePadding_TranslucentBasePass_1884; + float PrePadding_TranslucentBasePass_1888; + float PrePadding_TranslucentBasePass_1892; + float PrePadding_TranslucentBasePass_1896; + float PrePadding_TranslucentBasePass_1900; + float PrePadding_TranslucentBasePass_1904; + float PrePadding_TranslucentBasePass_1908; + float PrePadding_TranslucentBasePass_1912; + float PrePadding_TranslucentBasePass_1916; + float PrePadding_TranslucentBasePass_1920; + float PrePadding_TranslucentBasePass_1924; + float PrePadding_TranslucentBasePass_1928; + float PrePadding_TranslucentBasePass_1932; + float PrePadding_TranslucentBasePass_1936; + float PrePadding_TranslucentBasePass_1940; + float PrePadding_TranslucentBasePass_1944; + float PrePadding_TranslucentBasePass_1948; + float PrePadding_TranslucentBasePass_1952; + float PrePadding_TranslucentBasePass_1956; + float PrePadding_TranslucentBasePass_1960; + float PrePadding_TranslucentBasePass_1964; + float PrePadding_TranslucentBasePass_1968; + float PrePadding_TranslucentBasePass_1972; + float PrePadding_TranslucentBasePass_1976; + float PrePadding_TranslucentBasePass_1980; + float PrePadding_TranslucentBasePass_1984; + float PrePadding_TranslucentBasePass_1988; + float PrePadding_TranslucentBasePass_1992; + float PrePadding_TranslucentBasePass_1996; + float PrePadding_TranslucentBasePass_2000; + float PrePadding_TranslucentBasePass_2004; + float PrePadding_TranslucentBasePass_2008; + float PrePadding_TranslucentBasePass_2012; + float PrePadding_TranslucentBasePass_2016; + float PrePadding_TranslucentBasePass_2020; + float PrePadding_TranslucentBasePass_2024; + float PrePadding_TranslucentBasePass_2028; + float PrePadding_TranslucentBasePass_2032; + float PrePadding_TranslucentBasePass_2036; + float PrePadding_TranslucentBasePass_2040; + float PrePadding_TranslucentBasePass_2044; + float PrePadding_TranslucentBasePass_2048; + float PrePadding_TranslucentBasePass_2052; + float PrePadding_TranslucentBasePass_2056; + float PrePadding_TranslucentBasePass_2060; + float PrePadding_TranslucentBasePass_2064; + float PrePadding_TranslucentBasePass_2068; + float PrePadding_TranslucentBasePass_2072; + float PrePadding_TranslucentBasePass_2076; + float PrePadding_TranslucentBasePass_2080; + float PrePadding_TranslucentBasePass_2084; + float PrePadding_TranslucentBasePass_2088; + float PrePadding_TranslucentBasePass_2092; + float PrePadding_TranslucentBasePass_2096; + float PrePadding_TranslucentBasePass_2100; + float PrePadding_TranslucentBasePass_2104; + float PrePadding_TranslucentBasePass_2108; + float PrePadding_TranslucentBasePass_2112; + float PrePadding_TranslucentBasePass_2116; + float PrePadding_TranslucentBasePass_2120; + float PrePadding_TranslucentBasePass_2124; + float PrePadding_TranslucentBasePass_2128; + float PrePadding_TranslucentBasePass_2132; + float PrePadding_TranslucentBasePass_2136; + float PrePadding_TranslucentBasePass_2140; + float4 TranslucentBasePass_HZBUvFactorAndInvFactor; + float4 TranslucentBasePass_PrevScreenPositionScaleBias; + float TranslucentBasePass_PrevSceneColorPreExposureInv; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[2]; + float4 Material_ScalarExpressions[1]; +}; + +constant float _108 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; + uint gl_SampleMask [[sample_mask]]; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 in_var_TEXCOORD11_centroid [[user(locn1)]]; + uint in_var_PRIMITIVE_ID [[user(locn2)]]; + float4 in_var_TEXCOORD7 [[user(locn3)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], const device type_StructuredBuffer_v4float& View_PrimitiveSceneData [[buffer(1)]], constant type_TranslucentBasePass& TranslucentBasePass [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture3d TranslucentBasePass_Shared_Fog_IntegratedLightScattering [[texture(0)]], sampler View_SharedBilinearClampedSampler [[sampler(0)]], float4 gl_FragCoord [[position]], uint gl_SampleMaskIn [[sample_mask]]) +{ + main0_out out = {}; + float4 _137 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0); + float3 _142 = (_137.xyz / float3(_137.w)) - float3(View.View_PreViewTranslation); + bool _165 = TranslucentBasePass.TranslucentBasePass_Shared_Fog_ApplyVolumetricFog > 0.0; + float4 _215; + if (_165) + { + float4 _172 = View.View_WorldToClip * float4(_142, 1.0); + float _173 = _172.w; + float4 _202; + if (_165) + { + _202 = TranslucentBasePass_Shared_Fog_IntegratedLightScattering.sample(View_SharedBilinearClampedSampler, float3(((_172.xy / float2(_173)).xy * float2(0.5, -0.5)) + float2(0.5), (log2((_173 * View.View_VolumetricFogGridZParams[0]) + View.View_VolumetricFogGridZParams[1]) * View.View_VolumetricFogGridZParams[2]) * View.View_VolumetricFogInvGridSize[2]), level(0.0)); + } + else + { + _202 = float4(0.0, 0.0, 0.0, 1.0); + } + _215 = float4(_202.xyz + (in.in_var_TEXCOORD7.xyz * float3(_202.w)), _202.w * in.in_var_TEXCOORD7.w); + } + else + { + _215 = in.in_var_TEXCOORD7; + } + float3 _216 = fast::max(Material.Material_VectorExpressions[1].xyz * float3(((1.0 + dot(float3(-1.0, -1.5, 3.0) / float3(sqrt(12.25)), normalize(float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz) * normalize((float3(0.0, 0.0, 1.0) * float3(View.View_NormalOverrideParameter.w)) + View.View_NormalOverrideParameter.xyz)))) * 0.5) + 0.20000000298023223876953125), float3(0.0)); + float3 _246; + if (View.View_OutOfBoundsMask > 0.0) + { + uint _222 = in.in_var_PRIMITIVE_ID * 26u; + float3 _245; + if (any(abs(_142 - View_PrimitiveSceneData._m0[_222 + 5u].xyz) > (View_PrimitiveSceneData._m0[_222 + 19u].xyz + float3(1.0)))) + { + _245 = mix(float3(1.0, 1.0, 0.0), float3(0.0, 1.0, 1.0), select(float3(0.0), float3(1.0), float3(fract(dot(_142, float3(0.57700002193450927734375)) * 0.00200000009499490261077880859375)) > float3(0.5))); + } + else + { + _245 = _216; + } + _246 = _245; + } + else + { + _246 = _216; + } + float4 _256 = float4((_246 * float3(_215.w)) + _215.xyz, _108); + _256.w = 1.0; + float4 _268; + uint _269; + if (View.View_NumSceneColorMSAASamples > 1) + { + _268 = _256 * float4(float(View.View_NumSceneColorMSAASamples) * 0.25); + _269 = gl_SampleMaskIn & 15u; + } + else + { + _268 = _256; + _269 = gl_SampleMaskIn; + } + out.out_var_SV_Target0 = _268; + out.gl_SampleMask = _269; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag new file mode 100644 index 000000000..02cfc8829 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag @@ -0,0 +1,213 @@ +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Globals +{ + float3 SoftTransitionScale; + float4 ShadowBufferSize; + float ShadowFadeFraction; + float ShadowSharpen; + float4 LightPositionAndInvRadius; + float4x4 ScreenToShadowMatrix; + float2 ProjectionDepthBiasParameters; + float4 ModulatedShadowColor; + float4 ShadowTileOffsetAndSize; +}; + +constant float4 _58 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +fragment main0_out main0(constant type_View& View [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], float4 _gl_LastFragData [[color(0)]], texture2d ShadowDepthTexture [[texture(1)]], sampler ShadowDepthTextureSampler [[sampler(0)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + float4 _67 = _gl_LastFragData; + float _68 = _67.w; + float4 _82 = _Globals.ScreenToShadowMatrix * float4((((gl_FragCoord.xy * View.View_BufferSizeAndInvSize.zw) - View.View_ScreenPositionScaleBias.wz) / View.View_ScreenPositionScaleBias.xy) * float2(_68), _68, 1.0); + float _118 = fast::clamp(((fast::clamp((ShadowDepthTexture.sample(ShadowDepthTextureSampler, (((_82.xyz / float3(_82.w)).xy * _Globals.ShadowTileOffsetAndSize.zw).xy + _Globals.ShadowTileOffsetAndSize.xy).xy, level(0.0)).xxx * float3(_Globals.SoftTransitionScale.z)) - float3((fast::min(_82.z, 0.999989986419677734375) * _Globals.SoftTransitionScale.z) - 1.0), float3(0.0), float3(1.0)).x - 0.5) * _Globals.ShadowSharpen) + 0.5, 0.0, 1.0); + float3 _127 = mix(_Globals.ModulatedShadowColor.xyz, float3(1.0), float3(mix(1.0, _118 * _118, _Globals.ShadowFadeFraction))); + float4 _129 = float4(_127.x, _127.y, _127.z, _58.w); + _129.w = 0.0; + out.out_var_SV_Target0 = _129; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/texture-atomics.asm.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/texture-atomics.asm.frag new file mode 100644 index 000000000..a416259d8 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/texture-atomics.asm.frag @@ -0,0 +1,121 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _107 = _103 + 1u; + if (all(CulledObjectBoxBounds._m0[_107].xy > _96.xy) && all(CulledObjectBoxBounds._m0[_103].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[_160] - (float3(0.5) * (CulledObjectBoxBounds._m0[_103].xyz + CulledObjectBoxBounds._m0[_107].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[_103 + 2u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 3u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 4u].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag new file mode 100644 index 000000000..a416259d8 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag @@ -0,0 +1,121 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" +#pragma clang diagnostic ignored "-Wunused-variable" + +#include +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct type_Globals +{ + uint2 ShadowTileListGroupSize; +}; + +constant float3 _70 = {}; + +struct main0_out +{ + float4 out_var_SV_Target0 [[color(0)]]; +}; + +struct main0_in +{ + uint in_var_TEXCOORD0 [[user(locn0)]]; +}; + +fragment main0_out main0(main0_in in [[stage_in]], const device type_StructuredBuffer_v4float& CulledObjectBoxBounds [[buffer(0)]], constant type_Globals& _Globals [[buffer(1)]], texture2d RWShadowTileNumCulledObjects [[texture(2)]], device atomic_uint* RWShadowTileNumCulledObjects_atomic [[buffer(2)]], float4 gl_FragCoord [[position]]) +{ + main0_out out = {}; + uint2 _77 = uint2(gl_FragCoord.xy); + uint _78 = _77.y; + uint _83 = _77.x; + float2 _91 = float2(float(_83), float((_Globals.ShadowTileListGroupSize.y - 1u) - _78)); + float2 _93 = float2(_Globals.ShadowTileListGroupSize); + float2 _96 = ((_91 / _93) * float2(2.0)) - float2(1.0); + float2 _100 = (((_91 + float2(1.0)) / _93) * float2(2.0)) - float2(1.0); + float3 _102 = float3(_100.x, _100.y, _70.z); + _102.z = 1.0; + uint _103 = in.in_var_TEXCOORD0 * 5u; + uint _107 = _103 + 1u; + if (all(CulledObjectBoxBounds._m0[_107].xy > _96.xy) && all(CulledObjectBoxBounds._m0[_103].xyz < _102)) + { + float _122 = _96.x; + float _123 = _96.y; + spvUnsafeArray _73; + _73[0] = float3(_122, _123, -1000.0); + float _126 = _100.x; + _73[1] = float3(_126, _123, -1000.0); + float _129 = _100.y; + _73[2] = float3(_122, _129, -1000.0); + _73[3] = float3(_126, _129, -1000.0); + _73[4] = float3(_122, _123, 1.0); + _73[5] = float3(_126, _123, 1.0); + _73[6] = float3(_122, _129, 1.0); + _73[7] = float3(_126, _129, 1.0); + float3 _155; + float3 _158; + _155 = float3(-500000.0); + _158 = float3(500000.0); + for (int _160 = 0; _160 < 8; ) + { + float3 _166 = _73[_160] - (float3(0.5) * (CulledObjectBoxBounds._m0[_103].xyz + CulledObjectBoxBounds._m0[_107].xyz)); + float3 _170 = float3(dot(_166, CulledObjectBoxBounds._m0[_103 + 2u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 3u].xyz), dot(_166, CulledObjectBoxBounds._m0[_103 + 4u].xyz)); + _155 = fast::max(_155, _170); + _158 = fast::min(_158, _170); + _160++; + continue; + } + if (all(_158 < float3(1.0)) && all(_155 > float3(-1.0))) + { + uint _179 = atomic_fetch_add_explicit((device atomic_uint*)&RWShadowTileNumCulledObjects_atomic[(_78 * _Globals.ShadowTileListGroupSize.x) + _83], 1u, memory_order_relaxed); + } + } + out.out_var_SV_Target0 = float4(0.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc new file mode 100644 index 000000000..70d17d47f --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc @@ -0,0 +1,399 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; + float4 Color; + spvUnsafeArray TexCoords; + float4 LightMapCoordinate; + uint PrimitiveId; + uint LightmapDataIndex; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FSharedBasePassInterpolants +{ +}; +struct FBasePassInterpolantsVSToDS +{ + FSharedBasePassInterpolants _m0; +}; + +struct FBasePassVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + FBasePassInterpolantsVSToDS BasePassInterpolants; + float4 Position; +}; + +struct FPNTessellationHSToDS +{ + FBasePassVSToDS PassSpecificData; + spvUnsafeArray WorldPosition; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +constant float4 _142 = {}; + +struct main0_out +{ + float4 out_var_COLOR0; + uint out_var_LIGHTMAP_ID; + float3 out_var_PN_DisplacementScales; + spvUnsafeArray out_var_PN_POSITION; + float out_var_PN_TessellationMultiplier; + float out_var_PN_WorldDisplacementMultiplier; + uint out_var_PRIMITIVE_ID; + spvUnsafeArray out_var_TEXCOORD0; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_TEXCOORD4; + float4 out_var_VS_To_DS_Position; +}; + +struct main0_patchOut +{ + float4 out_var_PN_POSITION9; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_COLOR0 [[attribute(2)]]; + float4 in_var_TEXCOORD0_0 [[attribute(3)]]; + float4 in_var_TEXCOORD4 [[attribute(4)]]; + uint in_var_PRIMITIVE_ID [[attribute(5)]]; + uint in_var_LIGHTMAP_ID [[attribute(6)]]; + float4 in_var_VS_To_DS_Position [[attribute(7)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], const device type_StructuredBuffer_v4float& View_PrimitiveSceneData [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FPNTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _144 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _145 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _146 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _147 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray _148 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD4, gl_in[1].in_var_TEXCOORD4, gl_in[2].in_var_TEXCOORD4, gl_in[3].in_var_TEXCOORD4, gl_in[4].in_var_TEXCOORD4, gl_in[5].in_var_TEXCOORD4, gl_in[6].in_var_TEXCOORD4, gl_in[7].in_var_TEXCOORD4, gl_in[8].in_var_TEXCOORD4, gl_in[9].in_var_TEXCOORD4, gl_in[10].in_var_TEXCOORD4, gl_in[11].in_var_TEXCOORD4 }); + spvUnsafeArray _149 = spvUnsafeArray({ gl_in[0].in_var_PRIMITIVE_ID, gl_in[1].in_var_PRIMITIVE_ID, gl_in[2].in_var_PRIMITIVE_ID, gl_in[3].in_var_PRIMITIVE_ID, gl_in[4].in_var_PRIMITIVE_ID, gl_in[5].in_var_PRIMITIVE_ID, gl_in[6].in_var_PRIMITIVE_ID, gl_in[7].in_var_PRIMITIVE_ID, gl_in[8].in_var_PRIMITIVE_ID, gl_in[9].in_var_PRIMITIVE_ID, gl_in[10].in_var_PRIMITIVE_ID, gl_in[11].in_var_PRIMITIVE_ID }); + spvUnsafeArray _150 = spvUnsafeArray({ gl_in[0].in_var_LIGHTMAP_ID, gl_in[1].in_var_LIGHTMAP_ID, gl_in[2].in_var_LIGHTMAP_ID, gl_in[3].in_var_LIGHTMAP_ID, gl_in[4].in_var_LIGHTMAP_ID, gl_in[5].in_var_LIGHTMAP_ID, gl_in[6].in_var_LIGHTMAP_ID, gl_in[7].in_var_LIGHTMAP_ID, gl_in[8].in_var_LIGHTMAP_ID, gl_in[9].in_var_LIGHTMAP_ID, gl_in[10].in_var_LIGHTMAP_ID, gl_in[11].in_var_LIGHTMAP_ID }); + spvUnsafeArray _259 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _284 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[0], _145[0], _146[0], _147[0], _148[0], _149[0], _150[0] } }, FBasePassInterpolantsVSToDS{ { } }, _259[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[1], _145[1], _146[1], _147[1], _148[1], _149[1], _150[1] } }, FBasePassInterpolantsVSToDS{ { } }, _259[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[2], _145[2], _146[2], _147[2], _148[2], _149[2], _150[2] } }, FBasePassInterpolantsVSToDS{ { } }, _259[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[3], _145[3], _146[3], _147[3], _148[3], _149[3], _150[3] } }, FBasePassInterpolantsVSToDS{ { } }, _259[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[4], _145[4], _146[4], _147[4], _148[4], _149[4], _150[4] } }, FBasePassInterpolantsVSToDS{ { } }, _259[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[5], _145[5], _146[5], _147[5], _148[5], _149[5], _150[5] } }, FBasePassInterpolantsVSToDS{ { } }, _259[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[6], _145[6], _146[6], _147[6], _148[6], _149[6], _150[6] } }, FBasePassInterpolantsVSToDS{ { } }, _259[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[7], _145[7], _146[7], _147[7], _148[7], _149[7], _150[7] } }, FBasePassInterpolantsVSToDS{ { } }, _259[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[8], _145[8], _146[8], _147[8], _148[8], _149[8], _150[8] } }, FBasePassInterpolantsVSToDS{ { } }, _259[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[9], _145[9], _146[9], _147[9], _148[9], _149[9], _150[9] } }, FBasePassInterpolantsVSToDS{ { } }, _259[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[10], _145[10], _146[10], _147[10], _148[10], _149[10], _150[10] } }, FBasePassInterpolantsVSToDS{ { } }, _259[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[11], _145[11], _146[11], _147[11], _148[11], _149[11], _150[11] } }, FBasePassInterpolantsVSToDS{ { } }, _259[11] } }); + spvUnsafeArray param_var_I; + param_var_I = _284; + float4 _301 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _310 = View_PrimitiveSceneData._m0[(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId * 26u) + 22u].xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _313 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _314 = 2u * gl_InvocationID; + uint _315 = 3u + _314; + uint _316 = _314 + 4u; + float4 _328 = float4(param_var_I[_313].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _336 = float4(param_var_I[_315].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _344 = float4(param_var_I[_316].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _392 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_313].Position) - (float4(dot(param_var_I[_313].Position - param_var_I[gl_InvocationID].Position, _301)) * _301)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_315].Position) + param_var_I[_316].Position) - (float4(dot(param_var_I[_316].Position - param_var_I[_315].Position, _336)) * _336)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_313].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_313].Position, _328)) * _328)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_316].Position) + param_var_I[_315].Position) - (float4(dot(param_var_I[_315].Position - param_var_I[_316].Position, _344)) * _344)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_COLOR0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.Color; + gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TexCoords; + gl_out[gl_InvocationID].out_var_TEXCOORD4 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.LightMapCoordinate; + gl_out[gl_InvocationID].out_var_PRIMITIVE_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId; + gl_out[gl_InvocationID].out_var_LIGHTMAP_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.LightmapDataIndex; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_PN_POSITION = _392; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _310; + gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _392, _310, 1.0, 1.0 }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _450 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); + float4 _463 = _142; + _463.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _469 = _463; + _469.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _474 = _469; + _474.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _481 = _474; + _481.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _589; + for (;;) + { + float4 _489 = View.View_ViewToClip * float4(0.0); + float4 _494 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _495 = _494.xyz; + float3 _496 = _489.xyz; + float _498 = _494.w; + float _499 = _489.w; + float4 _516 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _517 = _516.xyz; + float _519 = _516.w; + float4 _537 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _538 = _537.xyz; + float _540 = _537.w; + if (any((((select(int3(0), int3(1), (_495 - _496) < float3(_498 + _499)) + (int3(2) * select(int3(0), int3(1), (_495 + _496) > float3((-_498) - _499)))) | (select(int3(0), int3(1), (_517 - _496) < float3(_519 + _499)) + (int3(2) * select(int3(0), int3(1), (_517 + _496) > float3((-_519) - _499))))) | (select(int3(0), int3(1), (_538 - _496) < float3(_540 + _499)) + (int3(2) * select(int3(0), int3(1), (_538 + _496) > float3((-_540) - _499))))) != int3(3))) + { + _589 = float4(0.0); + break; + } + float3 _558 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _559 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _560 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _563 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _566 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _569 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _573 = sqrt(dot(_559, _559) / dot(_566, _566)); + float _577 = sqrt(dot(_560, _560) / dot(_569, _569)); + float _581 = sqrt(dot(_558, _558) / dot(_563, _563)); + float4 _586 = float4(_573, _577, _581, 1.0); + _586.w = 0.333000004291534423828125 * ((_573 + _577) + _581); + _589 = float4(View.View_AdaptiveTessellationFactor) * _586; + break; + } + float4 _591 = fast::clamp(_481 * _589, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_591.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_591.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_591.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_591.w); + patchOut.out_var_PN_POSITION9 = _450 + ((_450 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + } +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc new file mode 100644 index 000000000..2ec930609 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc @@ -0,0 +1,467 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FHitProxyVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + float4 Position; + uint VertexID; +}; + +struct FHullShaderConstantDominantVertexData +{ + float2 UV; + float4 Normal; + float3 Tangent; +}; + +struct FHullShaderConstantDominantEdgeData +{ + float2 UV0; + float2 UV1; + float4 Normal0; + float4 Normal1; + float3 Tangent0; + float3 Tangent1; +}; + +struct FPNTessellationHSToDS +{ + FHitProxyVSToDS PassSpecificData; + spvUnsafeArray WorldPosition; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; + FHullShaderConstantDominantVertexData DominantVertex; + FHullShaderConstantDominantEdgeData DominantEdge; +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_DrawsVelocity; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + uint Primitive_LightingChannelMask; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightmapDataIndex; + packed_float3 Primitive_PreSkinnedLocalBounds; + int Primitive_SingleCaptureIndex; + uint Primitive_OutputVelocity; + uint PrePadding_Primitive_420; + uint PrePadding_Primitive_424; + uint PrePadding_Primitive_428; + float4 Primitive_CustomPrimitiveData[4]; +}; + +constant float4 _140 = {}; + +struct main0_out +{ + float3 out_var_PN_DisplacementScales; + float2 out_var_PN_DominantEdge; + float2 out_var_PN_DominantEdge1; + float4 out_var_PN_DominantEdge2; + float4 out_var_PN_DominantEdge3; + float3 out_var_PN_DominantEdge4; + float3 out_var_PN_DominantEdge5; + float2 out_var_PN_DominantVertex; + float4 out_var_PN_DominantVertex1; + float3 out_var_PN_DominantVertex2; + spvUnsafeArray out_var_PN_POSITION; + float out_var_PN_TessellationMultiplier; + float out_var_PN_WorldDisplacementMultiplier; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_VS_To_DS_Position; + uint out_var_VS_To_DS_VertexID; +}; + +struct main0_patchOut +{ + float4 out_var_PN_POSITION9; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_VS_To_DS_Position [[attribute(2)]]; + uint in_var_VS_To_DS_VertexID [[attribute(3)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Primitive& Primitive [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FPNTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _142 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _143 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _192 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _193 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_VertexID, gl_in[1].in_var_VS_To_DS_VertexID, gl_in[2].in_var_VS_To_DS_VertexID, gl_in[3].in_var_VS_To_DS_VertexID, gl_in[4].in_var_VS_To_DS_VertexID, gl_in[5].in_var_VS_To_DS_VertexID, gl_in[6].in_var_VS_To_DS_VertexID, gl_in[7].in_var_VS_To_DS_VertexID, gl_in[8].in_var_VS_To_DS_VertexID, gl_in[9].in_var_VS_To_DS_VertexID, gl_in[10].in_var_VS_To_DS_VertexID, gl_in[11].in_var_VS_To_DS_VertexID }); + spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0] } }, _192[0], _193[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1] } }, _192[1], _193[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2] } }, _192[2], _193[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3] } }, _192[3], _193[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4] } }, _192[4], _193[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5] } }, _192[5], _193[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6] } }, _192[6], _193[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7] } }, _192[7], _193[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8] } }, _192[8], _193[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9] } }, _192[9], _193[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10] } }, _192[10], _193[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11] } }, _192[11], _193[11] } }); + spvUnsafeArray param_var_I; + param_var_I = _230; + float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _255 = 2u * gl_InvocationID; + uint _256 = 3u + _255; + uint _257 = _255 + 4u; + uint _264 = (_254 < 2u) ? (_254 + 1u) : 0u; + uint _265 = 2u * _254; + uint _266 = 3u + _265; + uint _267 = _265 + 4u; + float4 _279 = float4(param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _315; + float4 _316; + float4 _317; + float4 _318; + if ((param_var_I[_266].VertexID < param_var_I[_254].VertexID) || ((param_var_I[_266].VertexID == param_var_I[_254].VertexID) && (param_var_I[_267].VertexID < param_var_I[_264].VertexID))) + { + _315 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _316 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _317 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _318 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + } + else + { + _315 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _316 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _317 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _318 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + } + float4 _324 = float4(_318.xyz, 0.0); + float4 _328 = float4(_316.xyz, 0.0); + float4 _336 = float4(param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _344 = float4(param_var_I[_256].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _352 = float4(param_var_I[_257].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _402 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _344)) * _344)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _336)) * _336)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _352)) * _352)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_VS_To_DS_VertexID = param_var_I[gl_InvocationID].VertexID; + gl_out[gl_InvocationID].out_var_PN_POSITION = _402; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_DominantVertex = float2(0.0); + gl_out[gl_InvocationID].out_var_PN_DominantVertex1 = _279; + gl_out[gl_InvocationID].out_var_PN_DominantVertex2 = param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz; + gl_out[gl_InvocationID].out_var_PN_DominantEdge = float2(0.0); + gl_out[gl_InvocationID].out_var_PN_DominantEdge1 = float2(0.0); + gl_out[gl_InvocationID].out_var_PN_DominantEdge2 = _324; + gl_out[gl_InvocationID].out_var_PN_DominantEdge3 = _328; + gl_out[gl_InvocationID].out_var_PN_DominantEdge4 = _317.xyz; + gl_out[gl_InvocationID].out_var_PN_DominantEdge5 = _315.xyz; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _402, _251, 1.0, 1.0, FHullShaderConstantDominantVertexData{ float2(0.0), _279, param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz }, FHullShaderConstantDominantEdgeData{ float2(0.0), float2(0.0), _324, _328, _317.xyz, _315.xyz } }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _461 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); + float4 _474 = _140; + _474.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _480 = _474; + _480.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _485 = _480; + _485.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _492 = _485; + _492.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _600; + for (;;) + { + float4 _500 = View.View_ViewToClip * float4(0.0); + float4 _505 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _506 = _505.xyz; + float3 _507 = _500.xyz; + float _509 = _505.w; + float _510 = _500.w; + float4 _527 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _528 = _527.xyz; + float _530 = _527.w; + float4 _548 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _549 = _548.xyz; + float _551 = _548.w; + if (any((((select(int3(0), int3(1), (_506 - _507) < float3(_509 + _510)) + (int3(2) * select(int3(0), int3(1), (_506 + _507) > float3((-_509) - _510)))) | (select(int3(0), int3(1), (_528 - _507) < float3(_530 + _510)) + (int3(2) * select(int3(0), int3(1), (_528 + _507) > float3((-_530) - _510))))) | (select(int3(0), int3(1), (_549 - _507) < float3(_551 + _510)) + (int3(2) * select(int3(0), int3(1), (_549 + _507) > float3((-_551) - _510))))) != int3(3))) + { + _600 = float4(0.0); + break; + } + float3 _569 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _570 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _571 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _574 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _577 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _580 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _584 = sqrt(dot(_570, _570) / dot(_577, _577)); + float _588 = sqrt(dot(_571, _571) / dot(_580, _580)); + float _592 = sqrt(dot(_569, _569) / dot(_574, _574)); + float4 _597 = float4(_584, _588, _592, 1.0); + _597.w = 0.333000004291534423828125 * ((_584 + _588) + _592); + _600 = float4(View.View_AdaptiveTessellationFactor) * _597; + break; + } + float4 _602 = fast::clamp(_492 * _600, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_602.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_602.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_602.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_602.w); + patchOut.out_var_PN_POSITION9 = _461 + ((_461 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + } +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc new file mode 100644 index 000000000..833122cde --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc @@ -0,0 +1,411 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; + float4 Color; + spvUnsafeArray TexCoords; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FHitProxyVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + float4 Position; +}; + +struct FPNTessellationHSToDS +{ + FHitProxyVSToDS PassSpecificData; + spvUnsafeArray WorldPosition; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_DrawsVelocity; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + uint Primitive_LightingChannelMask; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightmapDataIndex; + packed_float3 Primitive_PreSkinnedLocalBounds; + int Primitive_SingleCaptureIndex; + uint Primitive_OutputVelocity; + uint PrePadding_Primitive_420; + uint PrePadding_Primitive_424; + uint PrePadding_Primitive_428; + float4 Primitive_CustomPrimitiveData[4]; +}; + +constant float4 _127 = {}; + +struct main0_out +{ + float4 out_var_COLOR0; + float3 out_var_PN_DisplacementScales; + spvUnsafeArray out_var_PN_POSITION; + float out_var_PN_TessellationMultiplier; + float out_var_PN_WorldDisplacementMultiplier; + spvUnsafeArray out_var_TEXCOORD0; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_VS_To_DS_Position; +}; + +struct main0_patchOut +{ + float4 out_var_PN_POSITION9; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_COLOR0 [[attribute(2)]]; + float2 in_var_TEXCOORD0_0 [[attribute(3)]]; + float2 in_var_TEXCOORD0_1 [[attribute(4)]]; + float4 in_var_VS_To_DS_Position [[attribute(5)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Primitive& Primitive [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FPNTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _129 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _130 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _131 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _132 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 }) }); + spvUnsafeArray _205 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[0], _130[0], _131[0], _132[0] } }, _205[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[1], _130[1], _131[1], _132[1] } }, _205[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[2], _130[2], _131[2], _132[2] } }, _205[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[3], _130[3], _131[3], _132[3] } }, _205[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[4], _130[4], _131[4], _132[4] } }, _205[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[5], _130[5], _131[5], _132[5] } }, _205[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[6], _130[6], _131[6], _132[6] } }, _205[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[7], _130[7], _131[7], _132[7] } }, _205[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[8], _130[8], _131[8], _132[8] } }, _205[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[9], _130[9], _131[9], _132[9] } }, _205[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[10], _130[10], _131[10], _132[10] } }, _205[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[11], _130[11], _131[11], _132[11] } }, _205[11] } }); + spvUnsafeArray param_var_I; + param_var_I = _230; + float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _255 = 2u * gl_InvocationID; + uint _256 = 3u + _255; + uint _257 = _255 + 4u; + float4 _269 = float4(param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _277 = float4(param_var_I[_256].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _285 = float4(param_var_I[_257].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _333 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _277)) * _277)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _269)) * _269)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _285)) * _285)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_COLOR0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.Color; + gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TexCoords; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_PN_POSITION = _333; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; + gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _333, _251, 1.0, 1.0 }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _385 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); + float4 _398 = _127; + _398.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _404 = _398; + _404.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _409 = _404; + _409.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _416 = _409; + _416.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _524; + for (;;) + { + float4 _424 = View.View_ViewToClip * float4(0.0); + float4 _429 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _430 = _429.xyz; + float3 _431 = _424.xyz; + float _433 = _429.w; + float _434 = _424.w; + float4 _451 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _452 = _451.xyz; + float _454 = _451.w; + float4 _472 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _473 = _472.xyz; + float _475 = _472.w; + if (any((((select(int3(0), int3(1), (_430 - _431) < float3(_433 + _434)) + (int3(2) * select(int3(0), int3(1), (_430 + _431) > float3((-_433) - _434)))) | (select(int3(0), int3(1), (_452 - _431) < float3(_454 + _434)) + (int3(2) * select(int3(0), int3(1), (_452 + _431) > float3((-_454) - _434))))) | (select(int3(0), int3(1), (_473 - _431) < float3(_475 + _434)) + (int3(2) * select(int3(0), int3(1), (_473 + _431) > float3((-_475) - _434))))) != int3(3))) + { + _524 = float4(0.0); + break; + } + float3 _493 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _494 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _495 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _498 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _501 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _504 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _508 = sqrt(dot(_494, _494) / dot(_501, _501)); + float _512 = sqrt(dot(_495, _495) / dot(_504, _504)); + float _516 = sqrt(dot(_493, _493) / dot(_498, _498)); + float4 _521 = float4(_508, _512, _516, 1.0); + _521.w = 0.333000004291534423828125 * ((_508 + _512) + _516); + _524 = float4(View.View_AdaptiveTessellationFactor) * _521; + break; + } + float4 _526 = fast::clamp(_416 * _524, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_526.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_526.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_526.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_526.w); + patchOut.out_var_PN_POSITION9 = _385 + ((_385 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + } +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc new file mode 100644 index 000000000..04f5a1d38 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc @@ -0,0 +1,178 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct FVertexFactoryInterpolantsVSToPS +{ + float4 TangentToWorld0; + float4 TangentToWorld2; +}; + +struct FVertexFactoryInterpolantsVSToDS +{ + FVertexFactoryInterpolantsVSToPS InterpolantsVSToPS; +}; + +struct FSharedBasePassInterpolants +{ +}; +struct FBasePassInterpolantsVSToDS +{ + FSharedBasePassInterpolants _m0; +}; + +struct FBasePassVSToDS +{ + FVertexFactoryInterpolantsVSToDS FactoryInterpolants; + FBasePassInterpolantsVSToDS BasePassInterpolants; + float4 Position; +}; + +struct FFlatTessellationHSToDS +{ + FBasePassVSToDS PassSpecificData; + float3 DisplacementScale; + float TessellationMultiplier; + float WorldDisplacementMultiplier; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_DrawsVelocity; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + uint Primitive_LightingChannelMask; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightmapDataIndex; + packed_float3 Primitive_PreSkinnedLocalBounds; + int Primitive_SingleCaptureIndex; + uint Primitive_OutputVelocity; + uint PrePadding_Primitive_420; + uint PrePadding_Primitive_424; + uint PrePadding_Primitive_428; + float4 Primitive_CustomPrimitiveData[4]; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[3]; + float4 Material_ScalarExpressions[1]; +}; + +constant float4 _88 = {}; + +struct main0_out +{ + float3 out_var_Flat_DisplacementScales; + float out_var_Flat_TessellationMultiplier; + float out_var_Flat_WorldDisplacementMultiplier; + float4 out_var_TEXCOORD10_centroid; + float4 out_var_TEXCOORD11_centroid; + float4 out_var_VS_To_DS_Position; +}; + +struct main0_in +{ + float4 in_var_TEXCOORD10_centroid [[attribute(0)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(1)]]; + float4 in_var_VS_To_DS_Position [[attribute(2)]]; +}; + +kernel void main0(main0_in in [[stage_in]], constant type_Primitive& Primitive [[buffer(0)]], constant type_Material& Material [[buffer(1)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +{ + threadgroup FFlatTessellationHSToDS temp_var_hullMainRetVal[3]; + device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; + if (gl_InvocationID < spvIndirectParams[0]) + gl_in[gl_InvocationID] = in; + threadgroup_barrier(mem_flags::mem_threadgroup); + if (gl_InvocationID >= 3) + return; + spvUnsafeArray _90 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _91 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _104 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position }); + spvUnsafeArray _111 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[0], _91[0] } }, FBasePassInterpolantsVSToDS{ { } }, _104[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[1], _91[1] } }, FBasePassInterpolantsVSToDS{ { } }, _104[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[2], _91[2] } }, FBasePassInterpolantsVSToDS{ { } }, _104[2] } }); + spvUnsafeArray param_var_I; + param_var_I = _111; + float3 _128 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; + gl_out[gl_InvocationID].out_var_Flat_DisplacementScales = _128; + gl_out[gl_InvocationID].out_var_Flat_TessellationMultiplier = Material.Material_ScalarExpressions[0].x; + gl_out[gl_InvocationID].out_var_Flat_WorldDisplacementMultiplier = 1.0; + temp_var_hullMainRetVal[gl_InvocationID] = FFlatTessellationHSToDS{ param_var_I[gl_InvocationID], _128, Material.Material_ScalarExpressions[0].x, 1.0 }; + threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); + if (gl_InvocationID == 0u) + { + float4 _154 = _88; + _154.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _160 = _154; + _160.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + float4 _165 = _160; + _165.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + float4 _172 = _165; + _172.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _173 = fast::clamp(_172, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_173.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_173.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_173.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_173.w); + } +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese new file mode 100644 index 000000000..b2e5eccac --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese @@ -0,0 +1,420 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_ShadowDepthPass +{ + float PrePadding_ShadowDepthPass_LPV_0; + float PrePadding_ShadowDepthPass_LPV_4; + float PrePadding_ShadowDepthPass_LPV_8; + float PrePadding_ShadowDepthPass_LPV_12; + float PrePadding_ShadowDepthPass_LPV_16; + float PrePadding_ShadowDepthPass_LPV_20; + float PrePadding_ShadowDepthPass_LPV_24; + float PrePadding_ShadowDepthPass_LPV_28; + float PrePadding_ShadowDepthPass_LPV_32; + float PrePadding_ShadowDepthPass_LPV_36; + float PrePadding_ShadowDepthPass_LPV_40; + float PrePadding_ShadowDepthPass_LPV_44; + float PrePadding_ShadowDepthPass_LPV_48; + float PrePadding_ShadowDepthPass_LPV_52; + float PrePadding_ShadowDepthPass_LPV_56; + float PrePadding_ShadowDepthPass_LPV_60; + float PrePadding_ShadowDepthPass_LPV_64; + float PrePadding_ShadowDepthPass_LPV_68; + float PrePadding_ShadowDepthPass_LPV_72; + float PrePadding_ShadowDepthPass_LPV_76; + float PrePadding_ShadowDepthPass_LPV_80; + float PrePadding_ShadowDepthPass_LPV_84; + float PrePadding_ShadowDepthPass_LPV_88; + float PrePadding_ShadowDepthPass_LPV_92; + float PrePadding_ShadowDepthPass_LPV_96; + float PrePadding_ShadowDepthPass_LPV_100; + float PrePadding_ShadowDepthPass_LPV_104; + float PrePadding_ShadowDepthPass_LPV_108; + float PrePadding_ShadowDepthPass_LPV_112; + float PrePadding_ShadowDepthPass_LPV_116; + float PrePadding_ShadowDepthPass_LPV_120; + float PrePadding_ShadowDepthPass_LPV_124; + float PrePadding_ShadowDepthPass_LPV_128; + float PrePadding_ShadowDepthPass_LPV_132; + float PrePadding_ShadowDepthPass_LPV_136; + float PrePadding_ShadowDepthPass_LPV_140; + float PrePadding_ShadowDepthPass_LPV_144; + float PrePadding_ShadowDepthPass_LPV_148; + float PrePadding_ShadowDepthPass_LPV_152; + float PrePadding_ShadowDepthPass_LPV_156; + float PrePadding_ShadowDepthPass_LPV_160; + float PrePadding_ShadowDepthPass_LPV_164; + float PrePadding_ShadowDepthPass_LPV_168; + float PrePadding_ShadowDepthPass_LPV_172; + float PrePadding_ShadowDepthPass_LPV_176; + float PrePadding_ShadowDepthPass_LPV_180; + float PrePadding_ShadowDepthPass_LPV_184; + float PrePadding_ShadowDepthPass_LPV_188; + float PrePadding_ShadowDepthPass_LPV_192; + float PrePadding_ShadowDepthPass_LPV_196; + float PrePadding_ShadowDepthPass_LPV_200; + float PrePadding_ShadowDepthPass_LPV_204; + float PrePadding_ShadowDepthPass_LPV_208; + float PrePadding_ShadowDepthPass_LPV_212; + float PrePadding_ShadowDepthPass_LPV_216; + float PrePadding_ShadowDepthPass_LPV_220; + float PrePadding_ShadowDepthPass_LPV_224; + float PrePadding_ShadowDepthPass_LPV_228; + float PrePadding_ShadowDepthPass_LPV_232; + float PrePadding_ShadowDepthPass_LPV_236; + float PrePadding_ShadowDepthPass_LPV_240; + float PrePadding_ShadowDepthPass_LPV_244; + float PrePadding_ShadowDepthPass_LPV_248; + float PrePadding_ShadowDepthPass_LPV_252; + float PrePadding_ShadowDepthPass_LPV_256; + float PrePadding_ShadowDepthPass_LPV_260; + float PrePadding_ShadowDepthPass_LPV_264; + float PrePadding_ShadowDepthPass_LPV_268; + float4x4 ShadowDepthPass_LPV_mRsmToWorld; + float4 ShadowDepthPass_LPV_mLightColour; + float4 ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection; + float4 ShadowDepthPass_LPV_mEyePos; + packed_int3 ShadowDepthPass_LPV_mOldGridOffset; + int PrePadding_ShadowDepthPass_LPV_396; + packed_int3 ShadowDepthPass_LPV_mLpvGridOffset; + float ShadowDepthPass_LPV_ClearMultiplier; + float ShadowDepthPass_LPV_LpvScale; + float ShadowDepthPass_LPV_OneOverLpvScale; + float ShadowDepthPass_LPV_DirectionalOcclusionIntensity; + float ShadowDepthPass_LPV_DirectionalOcclusionRadius; + float ShadowDepthPass_LPV_RsmAreaIntensityMultiplier; + float ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier; + float ShadowDepthPass_LPV_SecondaryOcclusionStrength; + float ShadowDepthPass_LPV_SecondaryBounceStrength; + float ShadowDepthPass_LPV_VplInjectionBias; + float ShadowDepthPass_LPV_GeometryVolumeInjectionBias; + float ShadowDepthPass_LPV_EmissiveInjectionMultiplier; + int ShadowDepthPass_LPV_PropagationIndex; + float4x4 ShadowDepthPass_ProjectionMatrix; + float4x4 ShadowDepthPass_ViewMatrix; + float4 ShadowDepthPass_ShadowParams; + float ShadowDepthPass_bClampToNearPlane; + float PrePadding_ShadowDepthPass_612; + float PrePadding_ShadowDepthPass_616; + float PrePadding_ShadowDepthPass_620; + float4x4 ShadowDepthPass_ShadowViewProjectionMatrices[6]; + float4x4 ShadowDepthPass_ShadowViewMatrices[6]; +}; + +constant float4 _113 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; + float4 out_var_COLOR0 [[user(locn2)]]; + float4 out_var_TEXCOORD0_0 [[user(locn3)]]; + uint out_var_PRIMITIVE_ID [[user(locn4)]]; + float out_var_TEXCOORD6 [[user(locn5)]]; + float out_var_TEXCOORD8 [[user(locn6)]]; + float3 out_var_TEXCOORD7 [[user(locn7)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_COLOR0 [[attribute(0)]]; + float4 in_var_PN_POSITION_0 [[attribute(2)]]; + float4 in_var_PN_POSITION_1 [[attribute(3)]]; + float4 in_var_PN_POSITION_2 [[attribute(4)]]; + float in_var_PN_WorldDisplacementMultiplier [[attribute(7)]]; + uint in_var_PRIMITIVE_ID [[attribute(8)]]; + float4 in_var_TEXCOORD0_0 [[attribute(9)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(10)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(11)]]; +}; + +struct main0_patchIn +{ + float4 in_var_PN_POSITION9 [[attribute(5)]]; + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], constant type_ShadowDepthPass& ShadowDepthPass [[buffer(1)]], texture2d Material_Texture2D_3 [[texture(0)]], sampler Material_Texture2D_3Sampler [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray out_var_TEXCOORD0 = {}; + spvUnsafeArray _117 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _118 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _119 = spvUnsafeArray({ patchIn.gl_in[0].in_var_COLOR0, patchIn.gl_in[1].in_var_COLOR0, patchIn.gl_in[2].in_var_COLOR0 }); + spvUnsafeArray, 3> _120 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray, 3> _135 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); + spvUnsafeArray _136 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier }); + float _157 = gl_TessCoord.x * gl_TessCoord.x; + float _158 = gl_TessCoord.y * gl_TessCoord.y; + float _159 = gl_TessCoord.z * gl_TessCoord.z; + float4 _165 = float4(gl_TessCoord.x); + float4 _169 = float4(gl_TessCoord.y); + float4 _174 = float4(gl_TessCoord.z); + float4 _177 = float4(_157 * 3.0); + float4 _181 = float4(_158 * 3.0); + float4 _188 = float4(_159 * 3.0); + float4 _202 = ((((((((((_135[0][0] * float4(_157)) * _165) + ((_135[1][0] * float4(_158)) * _169)) + ((_135[2][0] * float4(_159)) * _174)) + ((_135[0][1] * _177) * _169)) + ((_135[0][2] * _181) * _165)) + ((_135[1][1] * _181) * _174)) + ((_135[1][2] * _188) * _169)) + ((_135[2][1] * _188) * _165)) + ((_135[2][2] * _177) * _174)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _174) * _165) * _169); + float3 _226 = ((_117[0].xyz * float3(gl_TessCoord.x)) + (_117[1].xyz * float3(gl_TessCoord.y))).xyz + (_117[2].xyz * float3(gl_TessCoord.z)); + float4 _229 = ((_118[0] * _165) + (_118[1] * _169)) + (_118[2] * _174); + float4 _231 = ((_119[0] * _165) + (_119[1] * _169)) + (_119[2] * _174); + float4 _233 = ((_120[0][0] * _165) + (_120[1][0] * _169)) + (_120[2][0] * _174); + spvUnsafeArray _234 = spvUnsafeArray({ _233 }); + float3 _236 = _229.xyz; + float3 _264 = _202.xyz + (((float3((Material_Texture2D_3.sample(Material_Texture2D_3Sampler, (float2(View.View_GameTime * 0.20000000298023223876953125, View.View_GameTime * (-0.699999988079071044921875)) + (_233.zw * float2(1.0, 2.0))), level(-1.0)).x * 10.0) * (1.0 - _231.x)) * _236) * float3(0.5)) * float3(((_136[0] * gl_TessCoord.x) + (_136[1] * gl_TessCoord.y)) + (_136[2] * gl_TessCoord.z))); + float4x4 _116 = ShadowDepthPass.ShadowDepthPass_ViewMatrix; + float4 _270 = ShadowDepthPass.ShadowDepthPass_ProjectionMatrix * float4(_264.x, _264.y, _264.z, _202.w); + float4 _281; + if ((ShadowDepthPass.ShadowDepthPass_bClampToNearPlane > 0.0) && (_270.z < 0.0)) + { + float4 _279 = _270; + _279.z = 9.9999999747524270787835121154785e-07; + float4 _280 = _279; + _280.w = 1.0; + _281 = _280; + } + else + { + _281 = _270; + } + float _290 = abs(dot(float3(_116[0u].z, _116[1u].z, _116[2u].z), _236)); + out.out_var_TEXCOORD10_centroid = float4(_226.x, _226.y, _226.z, _113.w); + out.out_var_TEXCOORD11_centroid = _229; + out.out_var_COLOR0 = _231; + out_var_TEXCOORD0 = _234; + out.out_var_PRIMITIVE_ID = patchIn.gl_in[0u].in_var_PRIMITIVE_ID; + out.out_var_TEXCOORD6 = _281.z; + out.out_var_TEXCOORD8 = (ShadowDepthPass.ShadowDepthPass_ShadowParams.y * fast::clamp((abs(_290) > 0.0) ? (sqrt(fast::clamp(1.0 - (_290 * _290), 0.0, 1.0)) / _290) : ShadowDepthPass.ShadowDepthPass_ShadowParams.z, 0.0, ShadowDepthPass.ShadowDepthPass_ShadowParams.z)) + ShadowDepthPass.ShadowDepthPass_ShadowParams.x; + out.out_var_TEXCOORD7 = _264.xyz; + out.gl_Position = _281; + out.out_var_TEXCOORD0_0 = out_var_TEXCOORD0[0]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese new file mode 100644 index 000000000..d8921bb8e --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese @@ -0,0 +1,415 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; + float PrePadding_View_3048; + float PrePadding_View_3052; + float4x4 View_WorldToVirtualTexture; + float4 View_VirtualTextureParams; + float4 View_XRPassthroughCameraUVs[2]; +}; + +struct type_Material +{ + float4 Material_VectorExpressions[5]; + float4 Material_ScalarExpressions[2]; +}; + +constant float4 _118 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD6 [[user(locn0)]]; + float4 out_var_TEXCOORD7 [[user(locn1)]]; + float4 out_var_TEXCOORD10_centroid [[user(locn2)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn3)]]; + float gl_ClipDistance [[clip_distance]] [1]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_PN_DominantEdge2 [[attribute(3)]]; + float4 in_var_PN_DominantEdge3 [[attribute(4)]]; + float3 in_var_PN_DominantEdge4 [[attribute(5)]]; + float3 in_var_PN_DominantEdge5 [[attribute(6)]]; + float4 in_var_PN_DominantVertex1 [[attribute(8)]]; + float3 in_var_PN_DominantVertex2 [[attribute(9)]]; + float4 in_var_PN_POSITION_0 [[attribute(10)]]; + float4 in_var_PN_POSITION_1 [[attribute(11)]]; + float4 in_var_PN_POSITION_2 [[attribute(12)]]; + float in_var_PN_WorldDisplacementMultiplier [[attribute(15)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(16)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(17)]]; + float4 in_var_TEXCOORD6 [[attribute(18)]]; + float4 in_var_TEXCOORD8 [[attribute(19)]]; +}; + +struct main0_patchIn +{ + float4 in_var_PN_POSITION9 [[attribute(13)]]; + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Material& Material [[buffer(1)]], texture3d View_GlobalDistanceFieldTexture0 [[texture(0)]], texture3d View_GlobalDistanceFieldTexture1 [[texture(1)]], texture3d View_GlobalDistanceFieldTexture2 [[texture(2)]], texture3d View_GlobalDistanceFieldTexture3 [[texture(3)]], sampler View_GlobalDistanceFieldSampler0 [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray _120 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD6, patchIn.gl_in[1].in_var_TEXCOORD6, patchIn.gl_in[2].in_var_TEXCOORD6 }); + spvUnsafeArray _121 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD8, patchIn.gl_in[1].in_var_TEXCOORD8, patchIn.gl_in[2].in_var_TEXCOORD8 }); + spvUnsafeArray _128 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _129 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray, 3> _136 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); + spvUnsafeArray _137 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier }); + spvUnsafeArray _138 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantVertex1, patchIn.gl_in[1].in_var_PN_DominantVertex1, patchIn.gl_in[2].in_var_PN_DominantVertex1 }); + spvUnsafeArray _139 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantVertex2, patchIn.gl_in[1].in_var_PN_DominantVertex2, patchIn.gl_in[2].in_var_PN_DominantVertex2 }); + spvUnsafeArray _146 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge2, patchIn.gl_in[1].in_var_PN_DominantEdge2, patchIn.gl_in[2].in_var_PN_DominantEdge2 }); + spvUnsafeArray _147 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge3, patchIn.gl_in[1].in_var_PN_DominantEdge3, patchIn.gl_in[2].in_var_PN_DominantEdge3 }); + spvUnsafeArray _148 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge4, patchIn.gl_in[1].in_var_PN_DominantEdge4, patchIn.gl_in[2].in_var_PN_DominantEdge4 }); + spvUnsafeArray _149 = spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_DominantEdge5, patchIn.gl_in[1].in_var_PN_DominantEdge5, patchIn.gl_in[2].in_var_PN_DominantEdge5 }); + float _190 = gl_TessCoord.x * gl_TessCoord.x; + float _191 = gl_TessCoord.y * gl_TessCoord.y; + float _192 = gl_TessCoord.z * gl_TessCoord.z; + float4 _198 = float4(gl_TessCoord.x); + float4 _202 = float4(gl_TessCoord.y); + float4 _207 = float4(gl_TessCoord.z); + float4 _210 = float4(_190 * 3.0); + float4 _214 = float4(_191 * 3.0); + float4 _221 = float4(_192 * 3.0); + float4 _235 = ((((((((((_136[0][0] * float4(_190)) * _198) + ((_136[1][0] * float4(_191)) * _202)) + ((_136[2][0] * float4(_192)) * _207)) + ((_136[0][1] * _210) * _202)) + ((_136[0][2] * _214) * _198)) + ((_136[1][1] * _214) * _207)) + ((_136[1][2] * _221) * _202)) + ((_136[2][1] * _221) * _198)) + ((_136[2][2] * _210) * _207)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _207) * _198) * _202); + float3 _237 = float3(gl_TessCoord.x); + float3 _240 = float3(gl_TessCoord.y); + float3 _254 = float3(gl_TessCoord.z); + float3 _256 = ((_128[0].xyz * _237) + (_128[1].xyz * _240)).xyz + (_128[2].xyz * _254); + float4 _259 = ((_129[0] * _198) + (_129[1] * _202)) + (_129[2] * _207); + float3 _264 = _235.xyz; + float3 _265 = _256.xyz; + float3 _266 = _259.xyz; + float3 _272 = _264 + float3(View.View_WorldCameraOrigin); + float _279 = float(int(gl_TessCoord.x == 0.0)); + float _282 = float(int(gl_TessCoord.y == 0.0)); + float _285 = float(int(gl_TessCoord.z == 0.0)); + float _286 = _279 + _282; + float _287 = _286 + _285; + float4 _387; + float3 _388; + if (float(int(_287 == 2.0)) == 1.0) + { + float _363 = float(int((_282 + _285) == 2.0)); + float _367 = float(int((_285 + _279) == 2.0)); + float _370 = float(int(_286 == 2.0)); + _387 = ((float4(_363) * _138[0]) + (float4(_367) * _138[1])) + (float4(_370) * _138[2]); + _388 = ((float3(_363) * _139[0]) + (float3(_367) * _139[1])) + (float3(_370) * _139[2]); + } + else + { + float4 _358; + float3 _359; + if (float(int(_287 == 1.0)) != 0.0) + { + float4 _304 = float4(_279); + float4 _306 = float4(_282); + float4 _309 = float4(_285); + float4 _311 = ((_304 * _146[0]) + (_306 * _146[1])) + (_309 * _146[2]); + float4 _316 = ((_304 * _147[0]) + (_306 * _147[1])) + (_309 * _147[2]); + float3 _331 = float3(_279); + float3 _333 = float3(_282); + float3 _336 = float3(_285); + float3 _338 = ((_331 * _148[0]) + (_333 * _148[1])) + (_336 * _148[2]); + float3 _343 = ((_331 * _149[0]) + (_333 * _149[1])) + (_336 * _149[2]); + _358 = ((_304 * ((_202 * _311) + (_207 * _316))) + (_306 * ((_207 * _311) + (_198 * _316)))) + (_309 * ((_198 * _311) + (_202 * _316))); + _359 = ((_331 * ((_240 * _338) + (_254 * _343))) + (_333 * ((_254 * _338) + (_237 * _343)))) + (_336 * ((_237 * _338) + (_240 * _343))); + } + else + { + _358 = float4(_259.xyz, 0.0); + _359 = _265; + } + _387 = _358; + _388 = _359; + } + float3x3 _398; + if (float(int(_287 == 0.0)) == 0.0) + { + _398 = float3x3(_388, cross(_387.xyz, _388) * float3(_387.w), _387.xyz); + } + else + { + _398 = float3x3(_265, cross(_266, _265) * float3(_259.w), _266); + } + float3 _411 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[0].xyz) + View.View_GlobalVolumeCenterAndExtent[0].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[0].xyz + View.View_GlobalVolumeCenterAndExtent[0].www) - _272, float3(0.0))); + float _547; + if (fast::min(_411.x, fast::min(_411.y, _411.z)) > (View.View_GlobalVolumeCenterAndExtent[0].w * View.View_GlobalVolumeTexelSize)) + { + _547 = View_GlobalDistanceFieldTexture0.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[0u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[0u].xyz), level(0.0)).x; + } + else + { + float3 _436 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[1].xyz) + View.View_GlobalVolumeCenterAndExtent[1].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[1].xyz + View.View_GlobalVolumeCenterAndExtent[1].www) - _272, float3(0.0))); + float _535; + if (fast::min(_436.x, fast::min(_436.y, _436.z)) > (View.View_GlobalVolumeCenterAndExtent[1].w * View.View_GlobalVolumeTexelSize)) + { + _535 = View_GlobalDistanceFieldTexture1.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[1u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[1u].xyz), level(0.0)).x; + } + else + { + float3 _459 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[2].xyz) + View.View_GlobalVolumeCenterAndExtent[2].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[2].xyz + View.View_GlobalVolumeCenterAndExtent[2].www) - _272, float3(0.0))); + float3 _475 = fast::min(fast::max((_272 - View.View_GlobalVolumeCenterAndExtent[3].xyz) + View.View_GlobalVolumeCenterAndExtent[3].www, float3(0.0)), fast::max((View.View_GlobalVolumeCenterAndExtent[3].xyz + View.View_GlobalVolumeCenterAndExtent[3].www) - _272, float3(0.0))); + float _480 = fast::min(_475.x, fast::min(_475.y, _475.z)); + float _523; + if (fast::min(_459.x, fast::min(_459.y, _459.z)) > (View.View_GlobalVolumeCenterAndExtent[2].w * View.View_GlobalVolumeTexelSize)) + { + _523 = View_GlobalDistanceFieldTexture2.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[2u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[2u].xyz), level(0.0)).x; + } + else + { + float _511; + if (_480 > (View.View_GlobalVolumeCenterAndExtent[3].w * View.View_GlobalVolumeTexelSize)) + { + _511 = mix(View.View_MaxGlobalDistance, View_GlobalDistanceFieldTexture3.sample(View_GlobalDistanceFieldSampler0, ((_272 * View.View_GlobalVolumeWorldToUVAddAndMul[3u].www) + View.View_GlobalVolumeWorldToUVAddAndMul[3u].xyz), level(0.0)).x, fast::clamp((_480 * 10.0) * View.View_GlobalVolumeWorldToUVAddAndMul[3].w, 0.0, 1.0)); + } + else + { + _511 = View.View_MaxGlobalDistance; + } + _523 = _511; + } + _535 = _523; + } + _547 = _535; + } + float3 _565 = _264 + ((_398[2] * float3(fast::min(_547 + Material.Material_ScalarExpressions[0].z, 0.0) * Material.Material_ScalarExpressions[0].w)) * float3(((_137[0] * gl_TessCoord.x) + (_137[1] * gl_TessCoord.y)) + (_137[2] * gl_TessCoord.z))); + float4 _574 = View.View_TranslatedWorldToClip * float4(_565.x, _565.y, _565.z, _235.w); + float4 _579 = _574; + _579.z = _574.z + (0.001000000047497451305389404296875 * _574.w); + out.gl_Position = _579; + out.out_var_TEXCOORD6 = ((_120[0] * _198) + (_120[1] * _202)) + (_120[2] * _207); + out.out_var_TEXCOORD7 = ((_121[0] * _198) + (_121[1] * _202)) + (_121[2] * _207); + out.out_var_TEXCOORD10_centroid = float4(_256.x, _256.y, _256.z, _118.w); + out.out_var_TEXCOORD11_centroid = _259; + out.gl_ClipDistance[0u] = dot(View.View_GlobalClippingPlane, float4(_565.xyz - float3(View.View_PreViewTranslation), 1.0)); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese new file mode 100644 index 000000000..d0b6fbdd9 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese @@ -0,0 +1,217 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_ShadowDepthPass +{ + float PrePadding_ShadowDepthPass_LPV_0; + float PrePadding_ShadowDepthPass_LPV_4; + float PrePadding_ShadowDepthPass_LPV_8; + float PrePadding_ShadowDepthPass_LPV_12; + float PrePadding_ShadowDepthPass_LPV_16; + float PrePadding_ShadowDepthPass_LPV_20; + float PrePadding_ShadowDepthPass_LPV_24; + float PrePadding_ShadowDepthPass_LPV_28; + float PrePadding_ShadowDepthPass_LPV_32; + float PrePadding_ShadowDepthPass_LPV_36; + float PrePadding_ShadowDepthPass_LPV_40; + float PrePadding_ShadowDepthPass_LPV_44; + float PrePadding_ShadowDepthPass_LPV_48; + float PrePadding_ShadowDepthPass_LPV_52; + float PrePadding_ShadowDepthPass_LPV_56; + float PrePadding_ShadowDepthPass_LPV_60; + float PrePadding_ShadowDepthPass_LPV_64; + float PrePadding_ShadowDepthPass_LPV_68; + float PrePadding_ShadowDepthPass_LPV_72; + float PrePadding_ShadowDepthPass_LPV_76; + float PrePadding_ShadowDepthPass_LPV_80; + float PrePadding_ShadowDepthPass_LPV_84; + float PrePadding_ShadowDepthPass_LPV_88; + float PrePadding_ShadowDepthPass_LPV_92; + float PrePadding_ShadowDepthPass_LPV_96; + float PrePadding_ShadowDepthPass_LPV_100; + float PrePadding_ShadowDepthPass_LPV_104; + float PrePadding_ShadowDepthPass_LPV_108; + float PrePadding_ShadowDepthPass_LPV_112; + float PrePadding_ShadowDepthPass_LPV_116; + float PrePadding_ShadowDepthPass_LPV_120; + float PrePadding_ShadowDepthPass_LPV_124; + float PrePadding_ShadowDepthPass_LPV_128; + float PrePadding_ShadowDepthPass_LPV_132; + float PrePadding_ShadowDepthPass_LPV_136; + float PrePadding_ShadowDepthPass_LPV_140; + float PrePadding_ShadowDepthPass_LPV_144; + float PrePadding_ShadowDepthPass_LPV_148; + float PrePadding_ShadowDepthPass_LPV_152; + float PrePadding_ShadowDepthPass_LPV_156; + float PrePadding_ShadowDepthPass_LPV_160; + float PrePadding_ShadowDepthPass_LPV_164; + float PrePadding_ShadowDepthPass_LPV_168; + float PrePadding_ShadowDepthPass_LPV_172; + float PrePadding_ShadowDepthPass_LPV_176; + float PrePadding_ShadowDepthPass_LPV_180; + float PrePadding_ShadowDepthPass_LPV_184; + float PrePadding_ShadowDepthPass_LPV_188; + float PrePadding_ShadowDepthPass_LPV_192; + float PrePadding_ShadowDepthPass_LPV_196; + float PrePadding_ShadowDepthPass_LPV_200; + float PrePadding_ShadowDepthPass_LPV_204; + float PrePadding_ShadowDepthPass_LPV_208; + float PrePadding_ShadowDepthPass_LPV_212; + float PrePadding_ShadowDepthPass_LPV_216; + float PrePadding_ShadowDepthPass_LPV_220; + float PrePadding_ShadowDepthPass_LPV_224; + float PrePadding_ShadowDepthPass_LPV_228; + float PrePadding_ShadowDepthPass_LPV_232; + float PrePadding_ShadowDepthPass_LPV_236; + float PrePadding_ShadowDepthPass_LPV_240; + float PrePadding_ShadowDepthPass_LPV_244; + float PrePadding_ShadowDepthPass_LPV_248; + float PrePadding_ShadowDepthPass_LPV_252; + float PrePadding_ShadowDepthPass_LPV_256; + float PrePadding_ShadowDepthPass_LPV_260; + float PrePadding_ShadowDepthPass_LPV_264; + float PrePadding_ShadowDepthPass_LPV_268; + float4x4 ShadowDepthPass_LPV_mRsmToWorld; + float4 ShadowDepthPass_LPV_mLightColour; + float4 ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection; + float4 ShadowDepthPass_LPV_mEyePos; + packed_int3 ShadowDepthPass_LPV_mOldGridOffset; + int PrePadding_ShadowDepthPass_LPV_396; + packed_int3 ShadowDepthPass_LPV_mLpvGridOffset; + float ShadowDepthPass_LPV_ClearMultiplier; + float ShadowDepthPass_LPV_LpvScale; + float ShadowDepthPass_LPV_OneOverLpvScale; + float ShadowDepthPass_LPV_DirectionalOcclusionIntensity; + float ShadowDepthPass_LPV_DirectionalOcclusionRadius; + float ShadowDepthPass_LPV_RsmAreaIntensityMultiplier; + float ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier; + float ShadowDepthPass_LPV_SecondaryOcclusionStrength; + float ShadowDepthPass_LPV_SecondaryBounceStrength; + float ShadowDepthPass_LPV_VplInjectionBias; + float ShadowDepthPass_LPV_GeometryVolumeInjectionBias; + float ShadowDepthPass_LPV_EmissiveInjectionMultiplier; + int ShadowDepthPass_LPV_PropagationIndex; + float4x4 ShadowDepthPass_ProjectionMatrix; + float4x4 ShadowDepthPass_ViewMatrix; + float4 ShadowDepthPass_ShadowParams; + float ShadowDepthPass_bClampToNearPlane; + float PrePadding_ShadowDepthPass_612; + float PrePadding_ShadowDepthPass_616; + float PrePadding_ShadowDepthPass_620; + float4x4 ShadowDepthPass_ShadowViewProjectionMatrices[6]; + float4x4 ShadowDepthPass_ShadowViewMatrices[6]; +}; + +constant float4 _90 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; + float out_var_TEXCOORD6 [[user(locn2)]]; + float3 out_var_TEXCOORD7 [[user(locn3)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_PN_POSITION_0 [[attribute(10)]]; + float4 in_var_PN_POSITION_1 [[attribute(11)]]; + float4 in_var_PN_POSITION_2 [[attribute(12)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(16)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(17)]]; +}; + +struct main0_patchIn +{ + float4 in_var_PN_POSITION9 [[attribute(13)]]; + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_ShadowDepthPass& ShadowDepthPass [[buffer(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray _93 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _94 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray, 3> _101 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); + float _119 = gl_TessCoord.x * gl_TessCoord.x; + float _120 = gl_TessCoord.y * gl_TessCoord.y; + float _121 = gl_TessCoord.z * gl_TessCoord.z; + float4 _127 = float4(gl_TessCoord.x); + float4 _131 = float4(gl_TessCoord.y); + float4 _136 = float4(gl_TessCoord.z); + float4 _139 = float4(_119 * 3.0); + float4 _143 = float4(_120 * 3.0); + float4 _150 = float4(_121 * 3.0); + float4 _164 = ((((((((((_101[0][0] * float4(_119)) * _127) + ((_101[1][0] * float4(_120)) * _131)) + ((_101[2][0] * float4(_121)) * _136)) + ((_101[0][1] * _139) * _131)) + ((_101[0][2] * _143) * _127)) + ((_101[1][1] * _143) * _136)) + ((_101[1][2] * _150) * _131)) + ((_101[2][1] * _150) * _127)) + ((_101[2][2] * _139) * _136)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _136) * _127) * _131); + float3 _179 = ((_93[0].xyz * float3(gl_TessCoord.x)) + (_93[1].xyz * float3(gl_TessCoord.y))).xyz + (_93[2].xyz * float3(gl_TessCoord.z)); + float4 _182 = ((_94[0] * _127) + (_94[1] * _131)) + (_94[2] * _136); + float4x4 _92 = ShadowDepthPass.ShadowDepthPass_ViewMatrix; + float4 _189 = ShadowDepthPass.ShadowDepthPass_ProjectionMatrix * float4(_164.x, _164.y, _164.z, _164.w); + float4 _200; + if ((ShadowDepthPass.ShadowDepthPass_bClampToNearPlane > 0.0) && (_189.z < 0.0)) + { + float4 _198 = _189; + _198.z = 9.9999999747524270787835121154785e-07; + float4 _199 = _198; + _199.w = 1.0; + _200 = _199; + } + else + { + _200 = _189; + } + float _209 = abs(dot(float3(_92[0u].z, _92[1u].z, _92[2u].z), _182.xyz)); + float4 _234 = _200; + _234.z = ((_200.z * ShadowDepthPass.ShadowDepthPass_ShadowParams.w) + ((ShadowDepthPass.ShadowDepthPass_ShadowParams.y * fast::clamp((abs(_209) > 0.0) ? (sqrt(fast::clamp(1.0 - (_209 * _209), 0.0, 1.0)) / _209) : ShadowDepthPass.ShadowDepthPass_ShadowParams.z, 0.0, ShadowDepthPass.ShadowDepthPass_ShadowParams.z)) + ShadowDepthPass.ShadowDepthPass_ShadowParams.x)) * _200.w; + out.out_var_TEXCOORD10_centroid = float4(_179.x, _179.y, _179.z, _90.w); + out.out_var_TEXCOORD11_centroid = _182; + out.out_var_TEXCOORD6 = 0.0; + out.out_var_TEXCOORD7 = _164.xyz; + out.gl_Position = _234; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese new file mode 100644 index 000000000..346d7e3fc --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese @@ -0,0 +1,318 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_ClipToWorld; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_908; + packed_float3 View_ViewUp; + float PrePadding_View_924; + packed_float3 View_ViewRight; + float PrePadding_View_940; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_956; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_972; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_1020; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_1036; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_1052; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1068; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1724; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1740; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1756; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2076; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2148; + float PrePadding_View_2152; + float PrePadding_View_2156; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2228; + float PrePadding_View_2232; + float PrePadding_View_2236; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2268; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2412; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + float View_AtmosphericFogSunDiscHalfApexAngleRadian; + float PrePadding_View_2492; + float4 View_AtmosphericFogSunDiscLuminance; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + uint PrePadding_View_2520; + uint PrePadding_View_2524; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2584; + float PrePadding_View_2588; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2744; + float PrePadding_View_2748; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float PrePadding_View_2908; + int2 View_CursorPosition; + float View_bCheckerboardSubsurfaceProfileRendering; + float PrePadding_View_2924; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2940; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2956; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2972; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2988; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_3004; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; + float PrePadding_View_3048; + float PrePadding_View_3052; + float4x4 View_WorldToVirtualTexture; + float4 View_VirtualTextureParams; + float4 View_XRPassthroughCameraUVs[2]; +}; + +constant float4 _68 = {}; + +struct main0_out +{ + float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; + float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; + float4 out_var_TEXCOORD0_0 [[user(locn2)]]; + float4 out_var_COLOR1 [[user(locn3)]]; + float4 out_var_COLOR2 [[user(locn4)]]; + float4 out_var_TEXCOORD6 [[user(locn5)]]; + float3 out_var_TEXCOORD7 [[user(locn6)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_COLOR1 [[attribute(0)]]; + float4 in_var_COLOR2 [[attribute(1)]]; + float4 in_var_TEXCOORD0_0 [[attribute(5)]]; + float4 in_var_TEXCOORD10_centroid [[attribute(6)]]; + float4 in_var_TEXCOORD11_centroid [[attribute(7)]]; + float3 in_var_TEXCOORD7 [[attribute(8)]]; + float4 in_var_VS_To_DS_Position [[attribute(9)]]; +}; + +struct main0_patchIn +{ + patch_control_point gl_in; +}; + +[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], float3 gl_TessCoord [[position_in_patch]]) +{ + main0_out out = {}; + spvUnsafeArray out_var_TEXCOORD0 = {}; + spvUnsafeArray _77 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _78 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray, 3> _79 = spvUnsafeArray, 3>({ spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ patchIn.gl_in[2].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray _80 = spvUnsafeArray({ patchIn.gl_in[0].in_var_COLOR1, patchIn.gl_in[1].in_var_COLOR1, patchIn.gl_in[2].in_var_COLOR1 }); + spvUnsafeArray _81 = spvUnsafeArray({ patchIn.gl_in[0].in_var_COLOR2, patchIn.gl_in[1].in_var_COLOR2, patchIn.gl_in[2].in_var_COLOR2 }); + spvUnsafeArray _97 = spvUnsafeArray({ patchIn.gl_in[0].in_var_VS_To_DS_Position, patchIn.gl_in[1].in_var_VS_To_DS_Position, patchIn.gl_in[2].in_var_VS_To_DS_Position }); + spvUnsafeArray _98 = spvUnsafeArray({ patchIn.gl_in[0].in_var_TEXCOORD7, patchIn.gl_in[1].in_var_TEXCOORD7, patchIn.gl_in[2].in_var_TEXCOORD7 }); + float4 _111 = float4(gl_TessCoord.x); + float4 _113 = float4(gl_TessCoord.y); + float4 _116 = float4(gl_TessCoord.z); + float4 _118 = ((_97[0] * _111) + (_97[1] * _113)) + (_97[2] * _116); + spvUnsafeArray _72; + _72 = _79[0]; + spvUnsafeArray _71; + _71 = _79[1]; + float3 _120 = float3(gl_TessCoord.x); + float3 _123 = float3(gl_TessCoord.y); + spvUnsafeArray _73; + for (int _133 = 0; _133 < 1; ) + { + _73[_133] = (_72[_133] * _111) + (_71[_133] * _113); + _133++; + continue; + } + spvUnsafeArray _75; + _75 = _73; + spvUnsafeArray _74; + _74 = _79[2]; + float3 _155 = float3(gl_TessCoord.z); + float3 _157 = ((_77[0].xyz * _120) + (_77[1].xyz * _123)).xyz + (_77[2].xyz * _155); + spvUnsafeArray _76; + for (int _164 = 0; _164 < 1; ) + { + _76[_164] = _75[_164] + (_74[_164] * _116); + _164++; + continue; + } + float4 _181 = float4(_118.x, _118.y, _118.z, _118.w); + out.out_var_TEXCOORD10_centroid = float4(_157.x, _157.y, _157.z, _68.w); + out.out_var_TEXCOORD11_centroid = ((_78[0] * _111) + (_78[1] * _113)) + (_78[2] * _116); + out_var_TEXCOORD0 = _76; + out.out_var_COLOR1 = ((_80[0] * _111) + (_80[1] * _113)) + (_80[2] * _116); + out.out_var_COLOR2 = ((_81[0] * _111) + (_81[1] * _113)) + (_81[2] * _116); + out.out_var_TEXCOORD6 = _181; + out.out_var_TEXCOORD7 = ((_98[0] * _120) + (_98[1] * _123)) + (_98[2] * _155); + out.gl_Position = View.View_TranslatedWorldToClip * _181; + out.out_var_TEXCOORD0_0 = out_var_TEXCOORD0[0]; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert b/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert new file mode 100644 index 000000000..3d3e0e51f --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert @@ -0,0 +1,466 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_MobileBasePass +{ + float4 MobileBasePass_Fog_ExponentialFogParameters; + float4 MobileBasePass_Fog_ExponentialFogParameters2; + float4 MobileBasePass_Fog_ExponentialFogColorParameter; + float4 MobileBasePass_Fog_ExponentialFogParameters3; + float4 MobileBasePass_Fog_InscatteringLightDirection; + float4 MobileBasePass_Fog_DirectionalInscatteringColor; + float2 MobileBasePass_Fog_SinCosInscatteringColorCubemapRotation; + float PrePadding_MobileBasePass_Fog_104; + float PrePadding_MobileBasePass_Fog_108; + packed_float3 MobileBasePass_Fog_FogInscatteringTextureParameters; + float MobileBasePass_Fog_ApplyVolumetricFog; + float PrePadding_MobileBasePass_PlanarReflection_128; + float PrePadding_MobileBasePass_PlanarReflection_132; + float PrePadding_MobileBasePass_PlanarReflection_136; + float PrePadding_MobileBasePass_PlanarReflection_140; + float PrePadding_MobileBasePass_PlanarReflection_144; + float PrePadding_MobileBasePass_PlanarReflection_148; + float PrePadding_MobileBasePass_PlanarReflection_152; + float PrePadding_MobileBasePass_PlanarReflection_156; + float4 MobileBasePass_PlanarReflection_ReflectionPlane; + float4 MobileBasePass_PlanarReflection_PlanarReflectionOrigin; + float4 MobileBasePass_PlanarReflection_PlanarReflectionXAxis; + float4 MobileBasePass_PlanarReflection_PlanarReflectionYAxis; + float3x4 MobileBasePass_PlanarReflection_InverseTransposeMirrorMatrix; + packed_float3 MobileBasePass_PlanarReflection_PlanarReflectionParameters; + float PrePadding_MobileBasePass_PlanarReflection_284; + float2 MobileBasePass_PlanarReflection_PlanarReflectionParameters2; + float PrePadding_MobileBasePass_PlanarReflection_296; + float PrePadding_MobileBasePass_PlanarReflection_300; + float4x4 MobileBasePass_PlanarReflection_ProjectionWithExtraFOV[2]; + float4 MobileBasePass_PlanarReflection_PlanarReflectionScreenScaleBias[2]; + float2 MobileBasePass_PlanarReflection_PlanarReflectionScreenBound; + uint MobileBasePass_PlanarReflection_bIsStereo; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_UseEditorDepthTest; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + float PrePadding_Primitive_380; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightingChannelMask; + uint Primitive_LightmapDataIndex; + int Primitive_SingleCaptureIndex; +}; + +struct type_LandscapeParameters +{ + float4 LandscapeParameters_HeightmapUVScaleBias; + float4 LandscapeParameters_WeightmapUVScaleBias; + float4 LandscapeParameters_LandscapeLightmapScaleBias; + float4 LandscapeParameters_SubsectionSizeVertsLayerUVPan; + float4 LandscapeParameters_SubsectionOffsetParams; + float4 LandscapeParameters_LightmapSubsectionOffsetParams; + float4x4 LandscapeParameters_LocalToWorldNoScaling; +}; + +struct type_Globals +{ + float4 LodBias; + float4 LodValues; + float4 SectionLods; + float4 NeighborSectionLod[4]; +}; + +struct main0_out +{ + float2 out_var_TEXCOORD0 [[user(locn0)]]; + float2 out_var_TEXCOORD1 [[user(locn1)]]; + float4 out_var_TEXCOORD2 [[user(locn2)]]; + float4 out_var_TEXCOORD3 [[user(locn3)]]; + float4 out_var_TEXCOORD8 [[user(locn4)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float4 in_var_ATTRIBUTE0 [[attribute(0)]]; + float4 in_var_ATTRIBUTE1_0 [[attribute(1)]]; + float4 in_var_ATTRIBUTE1_1 [[attribute(2)]]; +}; + +vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_MobileBasePass& MobileBasePass [[buffer(1)]], constant type_Primitive& Primitive [[buffer(2)]], constant type_LandscapeParameters& LandscapeParameters [[buffer(3)]], constant type_Globals& _Globals [[buffer(4)]]) +{ + main0_out out = {}; + spvUnsafeArray in_var_ATTRIBUTE1 = {}; + in_var_ATTRIBUTE1[0] = in.in_var_ATTRIBUTE1_0; + in_var_ATTRIBUTE1[1] = in.in_var_ATTRIBUTE1_1; + spvUnsafeArray _97; + for (int _107 = 0; _107 < 1; ) + { + _97[_107] = float4(0.0); + _107++; + continue; + } + float4 _115 = in.in_var_ATTRIBUTE0 * float4(255.0); + float2 _116 = _115.zw; + float2 _119 = fract(_116 * float2(0.5)) * float2(2.0); + float2 _121 = (_116 - _119) * float2(0.0039215688593685626983642578125); + float2 _122 = _115.xy; + float2 _126 = _122 * float2(_Globals.LodValues.w); + float _127 = _126.y; + float _128 = _126.x; + float4 _132 = float4(_127, _128, 1.0 - _128, 1.0 - _127) * float4(2.0); + float4 _186; + if (_119.y > 0.5) + { + float4 _161; + if (_119.x > 0.5) + { + _161 = (_132 * float4(_Globals.SectionLods.w)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[3]); + } + else + { + _161 = (_132 * float4(_Globals.SectionLods.z)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[2]); + } + _186 = _161; + } + else + { + float4 _185; + if (_119.x > 0.5) + { + _185 = (_132 * float4(_Globals.SectionLods.y)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[1]); + } + else + { + _185 = (_132 * float4(_Globals.SectionLods.x)) + ((float4(1.0) - _132) * _Globals.NeighborSectionLod[0]); + } + _186 = _185; + } + float _206; + if ((_128 + _127) > 1.0) + { + float _198; + if (_128 < _127) + { + _198 = _186.w; + } + else + { + _198 = _186.z; + } + _206 = _198; + } + else + { + float _205; + if (_128 < _127) + { + _205 = _186.y; + } + else + { + _205 = _186.x; + } + _206 = _205; + } + float _207 = floor(_206); + float _220 = _121.x; + float3 _235 = select(select(select(select(select(float3(0.03125, _121.yy), float3(0.0625, _220, _121.y), bool3(_207 < 5.0)), float3(0.125, in_var_ATTRIBUTE1[1].w, _220), bool3(_207 < 4.0)), float3(0.25, in_var_ATTRIBUTE1[1].zw), bool3(_207 < 3.0)), float3(0.5, in_var_ATTRIBUTE1[1].yz), bool3(_207 < 2.0)), float3(1.0, in_var_ATTRIBUTE1[1].xy), bool3(_207 < 1.0)); + float _236 = _235.x; + float _245 = (((in_var_ATTRIBUTE1[0].x * 65280.0) + (in_var_ATTRIBUTE1[0].y * 255.0)) - 32768.0) * 0.0078125; + float _252 = (((in_var_ATTRIBUTE1[0].z * 65280.0) + (in_var_ATTRIBUTE1[0].w * 255.0)) - 32768.0) * 0.0078125; + float2 _257 = floor(_122 * float2(_236)); + float2 _271 = float2((LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.x * _236) - 1.0, fast::max((LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.x * 0.5) * _236, 2.0) - 1.0) * float2(LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.y); + float3 _287 = mix(float3(_257 / float2(_271.x), mix(_245, _252, _235.y)), float3(floor(_257 * float2(0.5)) / float2(_271.y), mix(_245, _252, _235.z)), float3(_206 - _207)); + float2 _288 = _119.xy; + float2 _292 = _288 * LandscapeParameters.LandscapeParameters_SubsectionOffsetParams.ww; + float3 _296 = _287 + float3(_292, 0.0); + float4 _322 = float4((((Primitive.Primitive_LocalToWorld[0u].xyz * _296.xxx) + (Primitive.Primitive_LocalToWorld[1u].xyz * _296.yyy)) + (Primitive.Primitive_LocalToWorld[2u].xyz * _296.zzz)) + (Primitive.Primitive_LocalToWorld[3u].xyz + float3(View.View_PreViewTranslation)), 1.0); + float2 _323 = _287.xy; + float4 _338 = float4(_322.x, _322.y, _322.z, _322.w); + float4 _339 = View.View_TranslatedWorldToClip * _338; + float3 _341 = _322.xyz - float3(View.View_TranslatedWorldCameraOrigin); + float _345 = dot(_341, _341); + float _346 = rsqrt(_345); + float _347 = _345 * _346; + float _354 = _341.z; + float _357 = fast::max(0.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.w); + float _393; + float _394; + float _395; + float _396; + if (_357 > 0.0) + { + float _361 = _357 * _346; + float _362 = _361 * _354; + float _365 = View.View_WorldCameraOrigin[2] + _362; + _393 = (1.0 - _361) * _347; + _394 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.z * exp2(-fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.y * (_365 - MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.w))); + _395 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.x * exp2(-fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.y * (_365 - MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.y))); + _396 = _354 - _362; + } + else + { + _393 = _347; + _394 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.x; + _395 = MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.x; + _396 = _354; + } + float _400 = fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.y * _396); + float _405 = log(2.0); + float _407 = 0.5 * (_405 * _405); + float _417 = fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.y * _396); + float _428 = (_395 * ((abs(_400) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_400)) / _400) : (_405 - (_407 * _400)))) + (_394 * ((abs(_417) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_417)) / _417) : (_405 - (_407 * _417)))); + float3 _459; + if (MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.w >= 0.0) + { + _459 = (MobileBasePass.MobileBasePass_Fog_DirectionalInscatteringColor.xyz * float3(pow(fast::clamp(dot(_341 * float3(_346), MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.xyz), 0.0, 1.0), MobileBasePass.MobileBasePass_Fog_DirectionalInscatteringColor.w))) * float3(1.0 - fast::clamp(exp2(-(_428 * fast::max(_393 - MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.w, 0.0))), 0.0, 1.0)); + } + else + { + _459 = float3(0.0); + } + bool _468 = (MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w > 0.0) && (_347 > MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w); + float _471 = _468 ? 1.0 : fast::max(fast::clamp(exp2(-(_428 * _393)), 0.0, 1.0), MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.w); + _97[0] = float4((MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.xyz * float3(1.0 - _471)) + select(_459, float3(0.0), bool3(_468)), _471); + float4 _482 = _338; + _482.w = _339.w; + out.out_var_TEXCOORD0 = ((_323 + LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.zw) + _292).xy; + out.out_var_TEXCOORD1 = ((_323 * LandscapeParameters.LandscapeParameters_WeightmapUVScaleBias.xy) + LandscapeParameters.LandscapeParameters_WeightmapUVScaleBias.zw) + (_288 * LandscapeParameters.LandscapeParameters_SubsectionOffsetParams.zz); + out.out_var_TEXCOORD2 = float4(float4(0.0).x, float4(0.0).y, _97[0].x, _97[0].y); + out.out_var_TEXCOORD3 = float4(float4(0.0).x, float4(0.0).y, _97[0].z, _97[0].w); + out.out_var_TEXCOORD8 = _482; + out.gl_Position = _339; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert b/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert new file mode 100644 index 000000000..b1298b7e6 --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert @@ -0,0 +1,122 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wmissing-braces" + +#include +#include + +using namespace metal; + +template +struct spvUnsafeArray +{ + T elements[Num ? Num : 1]; + + thread T& operator [] (size_t pos) thread + { + return elements[pos]; + } + constexpr const thread T& operator [] (size_t pos) const thread + { + return elements[pos]; + } + + device T& operator [] (size_t pos) device + { + return elements[pos]; + } + constexpr const device T& operator [] (size_t pos) const device + { + return elements[pos]; + } + + constexpr const constant T& operator [] (size_t pos) const constant + { + return elements[pos]; + } + + threadgroup T& operator [] (size_t pos) threadgroup + { + return elements[pos]; + } + constexpr const threadgroup T& operator [] (size_t pos) const threadgroup + { + return elements[pos]; + } +}; + +struct type_Globals +{ + float4 ViewportSize; + float ScatteringScaling; + float CocRadiusToCircumscribedRadius; +}; + +struct type_StructuredBuffer_v4float +{ + float4 _m0[1]; +}; + +struct main0_out +{ + float2 out_var_TEXCOORD0 [[user(locn0)]]; + float4 out_var_TEXCOORD1 [[user(locn1)]]; + float4 out_var_TEXCOORD2 [[user(locn2)]]; + float4 out_var_TEXCOORD3 [[user(locn3)]]; + float4 out_var_TEXCOORD4 [[user(locn4)]]; + float4 out_var_TEXCOORD5 [[user(locn5)]]; + float4 out_var_TEXCOORD6 [[user(locn6)]]; + float4 gl_Position [[position]]; +}; + +vertex main0_out main0(constant type_Globals& _Globals [[buffer(0)]], const device type_StructuredBuffer_v4float& ScatterDrawList [[buffer(1)]], uint gl_VertexIndex [[vertex_id]], uint gl_InstanceIndex [[instance_id]]) +{ + main0_out out = {}; + uint _66 = gl_VertexIndex / 4u; + uint _68 = gl_VertexIndex - (_66 * 4u); + uint _70 = (16u * gl_InstanceIndex) + _66; + float _72; + _72 = 0.0; + spvUnsafeArray _61; + spvUnsafeArray _62; + spvUnsafeArray _63; + float _73; + uint _75 = 0u; + for (;;) + { + if (_75 < 4u) + { + uint _82 = ((5u * _70) + _75) + 1u; + _61[_75] = float4(ScatterDrawList._m0[_82].xyz, 0.0); + _62[_75] = ScatterDrawList._m0[_82].w; + if (_75 == 0u) + { + _73 = _62[_75]; + } + else + { + _73 = fast::max(_72, _62[_75]); + } + _63[_75].x = (-0.5) / _62[_75]; + _63[_75].y = (0.5 * _62[_75]) + 0.5; + _72 = _73; + _75++; + continue; + } + else + { + break; + } + } + float2 _144 = float2(_Globals.ScatteringScaling) * ScatterDrawList._m0[5u * _70].xy; + float2 _173 = (((float2((_72 * _Globals.CocRadiusToCircumscribedRadius) + 1.0) * ((float2(float(_68 % 2u), float(_68 / 2u)) * float2(2.0)) - float2(1.0))) + _144) + float2(0.5)) * _Globals.ViewportSize.zw; + out.out_var_TEXCOORD0 = _144; + out.out_var_TEXCOORD1 = float4(_61[0].xyz, _62[0]); + out.out_var_TEXCOORD2 = float4(_61[1].xyz, _62[1]); + out.out_var_TEXCOORD3 = float4(_61[2].xyz, _62[2]); + out.out_var_TEXCOORD4 = float4(_61[3].xyz, _62[3]); + out.out_var_TEXCOORD5 = float4(_63[0].x, _63[0].y, _63[1].x, _63[1].y); + out.out_var_TEXCOORD6 = float4(_63[2].x, _63[2].y, _63[3].x, _63[3].y); + out.gl_Position = float4((_173.x * 2.0) - 1.0, 1.0 - (_173.y * 2.0), 0.0, 1.0); + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert b/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert new file mode 100644 index 000000000..6384e1b9d --- /dev/null +++ b/3rdparty/spirv-cross/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert @@ -0,0 +1,387 @@ +#pragma clang diagnostic ignored "-Wmissing-prototypes" + +#include +#include + +using namespace metal; + +struct type_View +{ + float4x4 View_TranslatedWorldToClip; + float4x4 View_WorldToClip; + float4x4 View_TranslatedWorldToView; + float4x4 View_ViewToTranslatedWorld; + float4x4 View_TranslatedWorldToCameraView; + float4x4 View_CameraViewToTranslatedWorld; + float4x4 View_ViewToClip; + float4x4 View_ViewToClipNoAA; + float4x4 View_ClipToView; + float4x4 View_ClipToTranslatedWorld; + float4x4 View_SVPositionToTranslatedWorld; + float4x4 View_ScreenToWorld; + float4x4 View_ScreenToTranslatedWorld; + packed_float3 View_ViewForward; + float PrePadding_View_844; + packed_float3 View_ViewUp; + float PrePadding_View_860; + packed_float3 View_ViewRight; + float PrePadding_View_876; + packed_float3 View_HMDViewNoRollUp; + float PrePadding_View_892; + packed_float3 View_HMDViewNoRollRight; + float PrePadding_View_908; + float4 View_InvDeviceZToWorldZTransform; + float4 View_ScreenPositionScaleBias; + packed_float3 View_WorldCameraOrigin; + float PrePadding_View_956; + packed_float3 View_TranslatedWorldCameraOrigin; + float PrePadding_View_972; + packed_float3 View_WorldViewOrigin; + float PrePadding_View_988; + packed_float3 View_PreViewTranslation; + float PrePadding_View_1004; + float4x4 View_PrevProjection; + float4x4 View_PrevViewProj; + float4x4 View_PrevViewRotationProj; + float4x4 View_PrevViewToClip; + float4x4 View_PrevClipToView; + float4x4 View_PrevTranslatedWorldToClip; + float4x4 View_PrevTranslatedWorldToView; + float4x4 View_PrevViewToTranslatedWorld; + float4x4 View_PrevTranslatedWorldToCameraView; + float4x4 View_PrevCameraViewToTranslatedWorld; + packed_float3 View_PrevWorldCameraOrigin; + float PrePadding_View_1660; + packed_float3 View_PrevWorldViewOrigin; + float PrePadding_View_1676; + packed_float3 View_PrevPreViewTranslation; + float PrePadding_View_1692; + float4x4 View_PrevInvViewProj; + float4x4 View_PrevScreenToTranslatedWorld; + float4x4 View_ClipToPrevClip; + float4 View_TemporalAAJitter; + float4 View_GlobalClippingPlane; + float2 View_FieldOfViewWideAngles; + float2 View_PrevFieldOfViewWideAngles; + float4 View_ViewRectMin; + float4 View_ViewSizeAndInvSize; + float4 View_BufferSizeAndInvSize; + float4 View_BufferBilinearUVMinMax; + int View_NumSceneColorMSAASamples; + float View_PreExposure; + float View_OneOverPreExposure; + float PrePadding_View_2012; + float4 View_DiffuseOverrideParameter; + float4 View_SpecularOverrideParameter; + float4 View_NormalOverrideParameter; + float2 View_RoughnessOverrideParameter; + float View_PrevFrameGameTime; + float View_PrevFrameRealTime; + float View_OutOfBoundsMask; + float PrePadding_View_2084; + float PrePadding_View_2088; + float PrePadding_View_2092; + packed_float3 View_WorldCameraMovementSinceLastFrame; + float View_CullingSign; + float View_NearPlane; + float View_AdaptiveTessellationFactor; + float View_GameTime; + float View_RealTime; + float View_DeltaTime; + float View_MaterialTextureMipBias; + float View_MaterialTextureDerivativeMultiply; + uint View_Random; + uint View_FrameNumber; + uint View_StateFrameIndexMod8; + uint View_StateFrameIndex; + float View_CameraCut; + float View_UnlitViewmodeMask; + float PrePadding_View_2164; + float PrePadding_View_2168; + float PrePadding_View_2172; + float4 View_DirectionalLightColor; + packed_float3 View_DirectionalLightDirection; + float PrePadding_View_2204; + float4 View_TranslucencyLightingVolumeMin[2]; + float4 View_TranslucencyLightingVolumeInvSize[2]; + float4 View_TemporalAAParams; + float4 View_CircleDOFParams; + float View_DepthOfFieldSensorWidth; + float View_DepthOfFieldFocalDistance; + float View_DepthOfFieldScale; + float View_DepthOfFieldFocalLength; + float View_DepthOfFieldFocalRegion; + float View_DepthOfFieldNearTransitionRegion; + float View_DepthOfFieldFarTransitionRegion; + float View_MotionBlurNormalizedToPixel; + float View_bSubsurfacePostprocessEnabled; + float View_GeneralPurposeTweak; + float View_DemosaicVposOffset; + float PrePadding_View_2348; + packed_float3 View_IndirectLightingColorScale; + float View_HDR32bppEncodingMode; + packed_float3 View_AtmosphericFogSunDirection; + float View_AtmosphericFogSunPower; + float View_AtmosphericFogPower; + float View_AtmosphericFogDensityScale; + float View_AtmosphericFogDensityOffset; + float View_AtmosphericFogGroundOffset; + float View_AtmosphericFogDistanceScale; + float View_AtmosphericFogAltitudeScale; + float View_AtmosphericFogHeightScaleRayleigh; + float View_AtmosphericFogStartDistance; + float View_AtmosphericFogDistanceOffset; + float View_AtmosphericFogSunDiscScale; + uint View_AtmosphericFogRenderMask; + uint View_AtmosphericFogInscatterAltitudeSampleNum; + float4 View_AtmosphericFogSunColor; + packed_float3 View_NormalCurvatureToRoughnessScaleBias; + float View_RenderingReflectionCaptureMask; + float4 View_AmbientCubemapTint; + float View_AmbientCubemapIntensity; + float View_SkyLightParameters; + float PrePadding_View_2488; + float PrePadding_View_2492; + float4 View_SkyLightColor; + float4 View_SkyIrradianceEnvironmentMap[7]; + float View_MobilePreviewMode; + float View_HMDEyePaddingOffset; + float View_ReflectionCubemapMaxMip; + float View_ShowDecalsMask; + uint View_DistanceFieldAOSpecularOcclusionMode; + float View_IndirectCapsuleSelfShadowingIntensity; + float PrePadding_View_2648; + float PrePadding_View_2652; + packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; + int View_StereoPassIndex; + float4 View_GlobalVolumeCenterAndExtent[4]; + float4 View_GlobalVolumeWorldToUVAddAndMul[4]; + float View_GlobalVolumeDimension; + float View_GlobalVolumeTexelSize; + float View_MaxGlobalDistance; + float View_bCheckerboardSubsurfaceProfileRendering; + packed_float3 View_VolumetricFogInvGridSize; + float PrePadding_View_2828; + packed_float3 View_VolumetricFogGridZParams; + float PrePadding_View_2844; + float2 View_VolumetricFogSVPosToVolumeUV; + float View_VolumetricFogMaxDistance; + float PrePadding_View_2860; + packed_float3 View_VolumetricLightmapWorldToUVScale; + float PrePadding_View_2876; + packed_float3 View_VolumetricLightmapWorldToUVAdd; + float PrePadding_View_2892; + packed_float3 View_VolumetricLightmapIndirectionTextureSize; + float View_VolumetricLightmapBrickSize; + packed_float3 View_VolumetricLightmapBrickTexelSize; + float View_StereoIPD; + float View_IndirectLightingCacheShowFlag; + float View_EyeToPixelSpreadAngle; +}; + +struct type_Primitive +{ + float4x4 Primitive_LocalToWorld; + float4 Primitive_InvNonUniformScaleAndDeterminantSign; + float4 Primitive_ObjectWorldPositionAndRadius; + float4x4 Primitive_WorldToLocal; + float4x4 Primitive_PreviousLocalToWorld; + float4x4 Primitive_PreviousWorldToLocal; + packed_float3 Primitive_ActorWorldPosition; + float Primitive_UseSingleSampleShadowFromStationaryLights; + packed_float3 Primitive_ObjectBounds; + float Primitive_LpvBiasMultiplier; + float Primitive_DecalReceiverMask; + float Primitive_PerObjectGBufferData; + float Primitive_UseVolumetricLightmapShadowFromStationaryLights; + float Primitive_UseEditorDepthTest; + float4 Primitive_ObjectOrientation; + float4 Primitive_NonUniformScale; + packed_float3 Primitive_LocalObjectBoundsMin; + float PrePadding_Primitive_380; + packed_float3 Primitive_LocalObjectBoundsMax; + uint Primitive_LightingChannelMask; + uint Primitive_LightmapDataIndex; + int Primitive_SingleCaptureIndex; +}; + +struct type_MobileShadowDepthPass +{ + float PrePadding_MobileShadowDepthPass_0; + float PrePadding_MobileShadowDepthPass_4; + float PrePadding_MobileShadowDepthPass_8; + float PrePadding_MobileShadowDepthPass_12; + float PrePadding_MobileShadowDepthPass_16; + float PrePadding_MobileShadowDepthPass_20; + float PrePadding_MobileShadowDepthPass_24; + float PrePadding_MobileShadowDepthPass_28; + float PrePadding_MobileShadowDepthPass_32; + float PrePadding_MobileShadowDepthPass_36; + float PrePadding_MobileShadowDepthPass_40; + float PrePadding_MobileShadowDepthPass_44; + float PrePadding_MobileShadowDepthPass_48; + float PrePadding_MobileShadowDepthPass_52; + float PrePadding_MobileShadowDepthPass_56; + float PrePadding_MobileShadowDepthPass_60; + float PrePadding_MobileShadowDepthPass_64; + float PrePadding_MobileShadowDepthPass_68; + float PrePadding_MobileShadowDepthPass_72; + float PrePadding_MobileShadowDepthPass_76; + float4x4 MobileShadowDepthPass_ProjectionMatrix; + float2 MobileShadowDepthPass_ShadowParams; + float MobileShadowDepthPass_bClampToNearPlane; + float PrePadding_MobileShadowDepthPass_156; + float4x4 MobileShadowDepthPass_ShadowViewProjectionMatrices[6]; +}; + +struct type_EmitterDynamicUniforms +{ + float2 EmitterDynamicUniforms_LocalToWorldScale; + float EmitterDynamicUniforms_EmitterInstRandom; + float PrePadding_EmitterDynamicUniforms_12; + float4 EmitterDynamicUniforms_AxisLockRight; + float4 EmitterDynamicUniforms_AxisLockUp; + float4 EmitterDynamicUniforms_DynamicColor; + float4 EmitterDynamicUniforms_MacroUVParameters; +}; + +struct type_EmitterUniforms +{ + float4 EmitterUniforms_ColorCurve; + float4 EmitterUniforms_ColorScale; + float4 EmitterUniforms_ColorBias; + float4 EmitterUniforms_MiscCurve; + float4 EmitterUniforms_MiscScale; + float4 EmitterUniforms_MiscBias; + float4 EmitterUniforms_SizeBySpeed; + float4 EmitterUniforms_SubImageSize; + float4 EmitterUniforms_TangentSelector; + packed_float3 EmitterUniforms_CameraFacingBlend; + float EmitterUniforms_RemoveHMDRoll; + float EmitterUniforms_RotationRateScale; + float EmitterUniforms_RotationBias; + float EmitterUniforms_CameraMotionBlurAmount; + float PrePadding_EmitterUniforms_172; + float2 EmitterUniforms_PivotOffset; +}; + +struct type_Globals +{ + uint ParticleIndicesOffset; +}; + +struct main0_out +{ + float out_var_TEXCOORD6 [[user(locn0)]]; + float4 gl_Position [[position]]; +}; + +struct main0_in +{ + float2 in_var_ATTRIBUTE0 [[attribute(0)]]; +}; + +// Returns 2D texture coords corresponding to 1D texel buffer coords +static inline __attribute__((always_inline)) +uint2 spvTexelBufferCoord(uint tc) +{ + return uint2(tc % 4096, tc / 4096); +} + +vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_Primitive& Primitive [[buffer(1)]], constant type_MobileShadowDepthPass& MobileShadowDepthPass [[buffer(2)]], constant type_EmitterDynamicUniforms& EmitterDynamicUniforms [[buffer(3)]], constant type_EmitterUniforms& EmitterUniforms [[buffer(4)]], constant type_Globals& _Globals [[buffer(5)]], texture2d ParticleIndices [[texture(0)]], texture2d PositionTexture [[texture(1)]], texture2d VelocityTexture [[texture(2)]], texture2d AttributesTexture [[texture(3)]], texture2d CurveTexture [[texture(4)]], sampler PositionTextureSampler [[sampler(0)]], sampler VelocityTextureSampler [[sampler(1)]], sampler AttributesTextureSampler [[sampler(2)]], sampler CurveTextureSampler [[sampler(3)]], uint gl_VertexIndex [[vertex_id]], uint gl_InstanceIndex [[instance_id]]) +{ + main0_out out = {}; + float2 _133 = ParticleIndices.read(spvTexelBufferCoord((_Globals.ParticleIndicesOffset + ((gl_InstanceIndex * 16u) + (gl_VertexIndex / 4u))))).xy; + float4 _137 = PositionTexture.sample(PositionTextureSampler, _133, level(0.0)); + float4 _145 = AttributesTexture.sample(AttributesTextureSampler, _133, level(0.0)); + float _146 = _137.w; + float3 _158 = float3x3(Primitive.Primitive_LocalToWorld[0].xyz, Primitive.Primitive_LocalToWorld[1].xyz, Primitive.Primitive_LocalToWorld[2].xyz) * VelocityTexture.sample(VelocityTextureSampler, _133, level(0.0)).xyz; + float3 _160 = normalize(_158 + float3(0.0, 0.0, 9.9999997473787516355514526367188e-05)); + float2 _204 = ((((_145.xy + float2((_145.x < 0.5) ? 0.0 : (-0.5), (_145.y < 0.5) ? 0.0 : (-0.5))) * float2(2.0)) * (((CurveTexture.sample(CurveTextureSampler, (EmitterUniforms.EmitterUniforms_MiscCurve.xy + (EmitterUniforms.EmitterUniforms_MiscCurve.zw * float2(_146))), level(0.0)) * EmitterUniforms.EmitterUniforms_MiscScale) + EmitterUniforms.EmitterUniforms_MiscBias).xy * EmitterDynamicUniforms.EmitterDynamicUniforms_LocalToWorldScale)) * fast::min(fast::max(EmitterUniforms.EmitterUniforms_SizeBySpeed.xy * float2(length(_158)), float2(1.0)), EmitterUniforms.EmitterUniforms_SizeBySpeed.zw)) * float2(step(_146, 1.0)); + float3 _239 = float4((((Primitive.Primitive_LocalToWorld[0u].xyz * _137.xxx) + (Primitive.Primitive_LocalToWorld[1u].xyz * _137.yyy)) + (Primitive.Primitive_LocalToWorld[2u].xyz * _137.zzz)) + (Primitive.Primitive_LocalToWorld[3u].xyz + float3(View.View_PreViewTranslation)), 1.0).xyz; + float3 _242 = float3(EmitterUniforms.EmitterUniforms_RemoveHMDRoll); + float3 _251 = mix(mix(float3(View.View_ViewRight), float3(View.View_HMDViewNoRollRight), _242), EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.xyz, float3(EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.w)); + float3 _259 = mix(-mix(float3(View.View_ViewUp), float3(View.View_HMDViewNoRollUp), _242), EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockUp.xyz, float3(EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockUp.w)); + float3 _260 = float3(View.View_TranslatedWorldCameraOrigin) - _239; + float _261 = dot(_260, _260); + float3 _265 = _260 / float3(sqrt(fast::max(_261, 0.00999999977648258209228515625))); + float3 _335; + float3 _336; + if (EmitterUniforms.EmitterUniforms_CameraFacingBlend[0] > 0.0) + { + float3 _279 = cross(_265, float3(0.0, 0.0, 1.0)); + float3 _284 = _279 / float3(sqrt(fast::max(dot(_279, _279), 0.00999999977648258209228515625))); + float3 _286 = float3(fast::clamp((_261 * EmitterUniforms.EmitterUniforms_CameraFacingBlend[1]) - EmitterUniforms.EmitterUniforms_CameraFacingBlend[2], 0.0, 1.0)); + _335 = normalize(mix(_251, _284, _286)); + _336 = normalize(mix(_259, cross(_265, _284), _286)); + } + else + { + float3 _333; + float3 _334; + if (EmitterUniforms.EmitterUniforms_TangentSelector.y > 0.0) + { + float3 _297 = cross(_265, _160); + _333 = _297 / float3(sqrt(fast::max(dot(_297, _297), 0.00999999977648258209228515625))); + _334 = -_160; + } + else + { + float3 _331; + float3 _332; + if (EmitterUniforms.EmitterUniforms_TangentSelector.z > 0.0) + { + float3 _310 = cross(EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.xyz, _265); + _331 = EmitterDynamicUniforms.EmitterDynamicUniforms_AxisLockRight.xyz; + _332 = -(_310 / float3(sqrt(fast::max(dot(_310, _310), 0.00999999977648258209228515625)))); + } + else + { + float3 _329; + float3 _330; + if (EmitterUniforms.EmitterUniforms_TangentSelector.w > 0.0) + { + float3 _322 = cross(_265, float3(0.0, 0.0, 1.0)); + float3 _327 = _322 / float3(sqrt(fast::max(dot(_322, _322), 0.00999999977648258209228515625))); + _329 = _327; + _330 = cross(_265, _327); + } + else + { + _329 = _251; + _330 = _259; + } + _331 = _329; + _332 = _330; + } + _333 = _331; + _334 = _332; + } + _335 = _333; + _336 = _334; + } + float _339 = ((_145.z + ((_145.w * EmitterUniforms.EmitterUniforms_RotationRateScale) * _146)) * 6.283185482025146484375) + EmitterUniforms.EmitterUniforms_RotationBias; + float3 _342 = float3(sin(_339)); + float3 _344 = float3(cos(_339)); + float4 _371 = float4(_239 + ((float3(_204.x * (in.in_var_ATTRIBUTE0.x + EmitterUniforms.EmitterUniforms_PivotOffset.x)) * ((_342 * _336) + (_344 * _335))) + (float3(_204.y * (in.in_var_ATTRIBUTE0.y + EmitterUniforms.EmitterUniforms_PivotOffset.y)) * ((_344 * _336) - (_342 * _335)))), 1.0); + float4 _375 = MobileShadowDepthPass.MobileShadowDepthPass_ProjectionMatrix * float4(_371.x, _371.y, _371.z, _371.w); + float4 _386; + if ((MobileShadowDepthPass.MobileShadowDepthPass_bClampToNearPlane > 0.0) && (_375.z < 0.0)) + { + float4 _384 = _375; + _384.z = 9.9999999747524270787835121154785e-07; + float4 _385 = _384; + _385.w = 1.0; + _386 = _385; + } + else + { + _386 = _375; + } + float4 _396 = _386; + _396.z = ((_386.z * MobileShadowDepthPass.MobileShadowDepthPass_ShadowParams.y) + MobileShadowDepthPass.MobileShadowDepthPass_ShadowParams.x) * _386.w; + out.out_var_TEXCOORD6 = 0.0; + out.gl_Position = _396; + return out; +} + diff --git a/3rdparty/spirv-cross/reference/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp b/3rdparty/spirv-cross/reference/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp index 4f8d2ffa7..f8650b5e5 100644 --- a/3rdparty/spirv-cross/reference/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp +++ b/3rdparty/spirv-cross/reference/shaders/asm/comp/phi-temporary-copy-loop-variable.asm.comp @@ -5,9 +5,9 @@ layout(binding = 1, rgba32f) uniform writeonly image2D outImageTexture; void main() { + int _27_copy; int _30; _30 = 7; - int _27_copy; for (int _27 = 7; _27 >= 0; _27_copy = _27, _27--, _30 = _27_copy) { if (5.0 > float(_27)) diff --git a/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag new file mode 100644 index 000000000..a9650ddbb --- /dev/null +++ b/3rdparty/spirv-cross/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -0,0 +1,61 @@ +; SPIR-V +; Version: 1.2 +; Generator: Khronos; 0 +; Bound: 43 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %EntryPoint_Main "main" + OpExecutionMode %EntryPoint_Main OriginUpperLeft + OpSource Unknown 100 + OpName %EmptyStructTest "EmptyStructTest" + OpName %EmptyStruct2Test "EmptyStruct2Test" + OpName %GetValue "GetValue" + OpName %GetValue2 "GetValue" + OpName %self "self" + OpName %self2 "self" + OpName %emptyStruct "emptyStruct" + OpName %value "value" + OpName %EntryPoint_Main "EntryPoint_Main" + +%EmptyStructTest = OpTypeStruct +%EmptyStruct2Test = OpTypeStruct %EmptyStructTest +%_ptr_Function_EmptyStruct2Test = OpTypePointer Function %EmptyStruct2Test + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float + %5 = OpTypeFunction %float %_ptr_Function_EmptyStruct2Test + %6 = OpTypeFunction %float %EmptyStruct2Test + %void = OpTypeVoid +%_ptr_Function_void = OpTypePointer Function %void + %8 = OpTypeFunction %void %_ptr_Function_EmptyStruct2Test + %9 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %value4 = OpConstantNull %EmptyStruct2Test + + %GetValue = OpFunction %float None %5 + %self = OpFunctionParameter %_ptr_Function_EmptyStruct2Test + %13 = OpLabel + OpReturnValue %float_0 + OpFunctionEnd + + %GetValue2 = OpFunction %float None %6 + %self2 = OpFunctionParameter %EmptyStruct2Test + %14 = OpLabel + OpReturnValue %float_0 + OpFunctionEnd + +%EntryPoint_Main = OpFunction %void None %9 + %37 = OpLabel + %emptyStruct = OpVariable %_ptr_Function_EmptyStruct2Test Function + %18 = OpVariable %_ptr_Function_EmptyStruct2Test Function + %value = OpVariable %_ptr_Function_float Function + %value2 = OpCompositeConstruct %EmptyStructTest + %value3 = OpCompositeConstruct %EmptyStruct2Test %value2 + %22 = OpFunctionCall %float %GetValue %emptyStruct + %23 = OpFunctionCall %float %GetValue2 %value3 + %24 = OpFunctionCall %float %GetValue2 %value4 + OpStore %value %22 + OpStore %value %23 + OpStore %value %24 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-msl-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/3rdparty/spirv-cross/shaders-msl-no-opt/asm/frag/empty-struct-in-struct.asm.frag new file mode 100644 index 000000000..a9650ddbb --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -0,0 +1,61 @@ +; SPIR-V +; Version: 1.2 +; Generator: Khronos; 0 +; Bound: 43 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %EntryPoint_Main "main" + OpExecutionMode %EntryPoint_Main OriginUpperLeft + OpSource Unknown 100 + OpName %EmptyStructTest "EmptyStructTest" + OpName %EmptyStruct2Test "EmptyStruct2Test" + OpName %GetValue "GetValue" + OpName %GetValue2 "GetValue" + OpName %self "self" + OpName %self2 "self" + OpName %emptyStruct "emptyStruct" + OpName %value "value" + OpName %EntryPoint_Main "EntryPoint_Main" + +%EmptyStructTest = OpTypeStruct +%EmptyStruct2Test = OpTypeStruct %EmptyStructTest +%_ptr_Function_EmptyStruct2Test = OpTypePointer Function %EmptyStruct2Test + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float + %5 = OpTypeFunction %float %_ptr_Function_EmptyStruct2Test + %6 = OpTypeFunction %float %EmptyStruct2Test + %void = OpTypeVoid +%_ptr_Function_void = OpTypePointer Function %void + %8 = OpTypeFunction %void %_ptr_Function_EmptyStruct2Test + %9 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %value4 = OpConstantNull %EmptyStruct2Test + + %GetValue = OpFunction %float None %5 + %self = OpFunctionParameter %_ptr_Function_EmptyStruct2Test + %13 = OpLabel + OpReturnValue %float_0 + OpFunctionEnd + + %GetValue2 = OpFunction %float None %6 + %self2 = OpFunctionParameter %EmptyStruct2Test + %14 = OpLabel + OpReturnValue %float_0 + OpFunctionEnd + +%EntryPoint_Main = OpFunction %void None %9 + %37 = OpLabel + %emptyStruct = OpVariable %_ptr_Function_EmptyStruct2Test Function + %18 = OpVariable %_ptr_Function_EmptyStruct2Test Function + %value = OpVariable %_ptr_Function_float Function + %value2 = OpCompositeConstruct %EmptyStructTest + %value3 = OpCompositeConstruct %EmptyStruct2Test %value2 + %22 = OpFunctionCall %float %GetValue %emptyStruct + %23 = OpFunctionCall %float %GetValue2 %value3 + %24 = OpFunctionCall %float %GetValue2 %value4 + OpStore %value %22 + OpStore %value %23 + OpStore %value %24 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-msl-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag b/3rdparty/spirv-cross/shaders-msl-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag deleted file mode 100644 index 8b09e5b68..000000000 --- a/3rdparty/spirv-cross/shaders-msl-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag +++ /dev/null @@ -1,646 +0,0 @@ -; SPIR-V -; Version: 1.0 -; Generator: Khronos Glslang Reference Front End; 3 -; Bound: 1532 -; Schema: 0 - OpCapability Shader - %1 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Fragment %main "main" %IN_HPosition %IN_Uv_EdgeDistance1 %IN_UvStuds_EdgeDistance2 %IN_Color %IN_LightPosition_Fog %IN_View_Depth %IN_Normal_SpecPower %IN_Tangent %IN_PosLightSpace_Reflectance %IN_studIndex %_entryPointOutput - OpExecutionMode %main OriginUpperLeft - OpSource HLSL 500 - OpName %main "main" - OpName %VertexOutput "VertexOutput" - OpMemberName %VertexOutput 0 "HPosition" - OpMemberName %VertexOutput 1 "Uv_EdgeDistance1" - OpMemberName %VertexOutput 2 "UvStuds_EdgeDistance2" - OpMemberName %VertexOutput 3 "Color" - OpMemberName %VertexOutput 4 "LightPosition_Fog" - OpMemberName %VertexOutput 5 "View_Depth" - OpMemberName %VertexOutput 6 "Normal_SpecPower" - OpMemberName %VertexOutput 7 "Tangent" - OpMemberName %VertexOutput 8 "PosLightSpace_Reflectance" - OpMemberName %VertexOutput 9 "studIndex" - OpName %Surface "Surface" - OpMemberName %Surface 0 "albedo" - OpMemberName %Surface 1 "normal" - OpMemberName %Surface 2 "specular" - OpMemberName %Surface 3 "gloss" - OpMemberName %Surface 4 "reflectance" - OpMemberName %Surface 5 "opacity" - OpName %SurfaceInput "SurfaceInput" - OpMemberName %SurfaceInput 0 "Color" - OpMemberName %SurfaceInput 1 "Uv" - OpMemberName %SurfaceInput 2 "UvStuds" - OpName %Globals "Globals" - OpMemberName %Globals 0 "ViewProjection" - OpMemberName %Globals 1 "ViewRight" - OpMemberName %Globals 2 "ViewUp" - OpMemberName %Globals 3 "ViewDir" - OpMemberName %Globals 4 "CameraPosition" - OpMemberName %Globals 5 "AmbientColor" - OpMemberName %Globals 6 "Lamp0Color" - OpMemberName %Globals 7 "Lamp0Dir" - OpMemberName %Globals 8 "Lamp1Color" - OpMemberName %Globals 9 "FogParams" - OpMemberName %Globals 10 "FogColor" - OpMemberName %Globals 11 "LightBorder" - OpMemberName %Globals 12 "LightConfig0" - OpMemberName %Globals 13 "LightConfig1" - OpMemberName %Globals 14 "LightConfig2" - OpMemberName %Globals 15 "LightConfig3" - OpMemberName %Globals 16 "RefractionBias_FadeDistance_GlowFactor" - OpMemberName %Globals 17 "OutlineBrightness_ShadowInfo" - OpMemberName %Globals 18 "ShadowMatrix0" - OpMemberName %Globals 19 "ShadowMatrix1" - OpMemberName %Globals 20 "ShadowMatrix2" - OpName %CB0 "CB0" - OpMemberName %CB0 0 "CB0" - OpName %_ "" - OpName %LightMapTexture "LightMapTexture" - OpName %LightMapSampler "LightMapSampler" - OpName %ShadowMapSampler "ShadowMapSampler" - OpName %ShadowMapTexture "ShadowMapTexture" - OpName %EnvironmentMapTexture "EnvironmentMapTexture" - OpName %EnvironmentMapSampler "EnvironmentMapSampler" - OpName %IN_HPosition "IN.HPosition" - OpName %IN_Uv_EdgeDistance1 "IN.Uv_EdgeDistance1" - OpName %IN_UvStuds_EdgeDistance2 "IN.UvStuds_EdgeDistance2" - OpName %IN_Color "IN.Color" - OpName %IN_LightPosition_Fog "IN.LightPosition_Fog" - OpName %IN_View_Depth "IN.View_Depth" - OpName %IN_Normal_SpecPower "IN.Normal_SpecPower" - OpName %IN_Tangent "IN.Tangent" - OpName %IN_PosLightSpace_Reflectance "IN.PosLightSpace_Reflectance" - OpName %IN_studIndex "IN.studIndex" - OpName %_entryPointOutput "@entryPointOutput" - OpName %DiffuseMapSampler "DiffuseMapSampler" - OpName %DiffuseMapTexture "DiffuseMapTexture" - OpName %NormalMapSampler "NormalMapSampler" - OpName %NormalMapTexture "NormalMapTexture" - OpName %NormalDetailMapTexture "NormalDetailMapTexture" - OpName %NormalDetailMapSampler "NormalDetailMapSampler" - OpName %StudsMapTexture "StudsMapTexture" - OpName %StudsMapSampler "StudsMapSampler" - OpName %SpecularMapSampler "SpecularMapSampler" - OpName %SpecularMapTexture "SpecularMapTexture" - OpName %Params "Params" - OpMemberName %Params 0 "LqmatFarTilingFactor" - OpName %CB2 "CB2" - OpMemberName %CB2 0 "CB2" - OpMemberDecorate %Globals 0 ColMajor - OpMemberDecorate %Globals 0 Offset 0 - OpMemberDecorate %Globals 0 MatrixStride 16 - OpMemberDecorate %Globals 1 Offset 64 - OpMemberDecorate %Globals 2 Offset 80 - OpMemberDecorate %Globals 3 Offset 96 - OpMemberDecorate %Globals 4 Offset 112 - OpMemberDecorate %Globals 5 Offset 128 - OpMemberDecorate %Globals 6 Offset 144 - OpMemberDecorate %Globals 7 Offset 160 - OpMemberDecorate %Globals 8 Offset 176 - OpMemberDecorate %Globals 9 Offset 192 - OpMemberDecorate %Globals 10 Offset 208 - OpMemberDecorate %Globals 11 Offset 224 - OpMemberDecorate %Globals 12 Offset 240 - OpMemberDecorate %Globals 13 Offset 256 - OpMemberDecorate %Globals 14 Offset 272 - OpMemberDecorate %Globals 15 Offset 288 - OpMemberDecorate %Globals 16 Offset 304 - OpMemberDecorate %Globals 17 Offset 320 - OpMemberDecorate %Globals 18 Offset 336 - OpMemberDecorate %Globals 19 Offset 352 - OpMemberDecorate %Globals 20 Offset 368 - OpMemberDecorate %CB0 0 Offset 0 - OpDecorate %CB0 Block - OpDecorate %_ DescriptorSet 0 - OpDecorate %_ Binding 0 - OpDecorate %LightMapTexture DescriptorSet 1 - OpDecorate %LightMapTexture Binding 6 - OpDecorate %LightMapSampler DescriptorSet 1 - OpDecorate %LightMapSampler Binding 6 - OpDecorate %ShadowMapSampler DescriptorSet 1 - OpDecorate %ShadowMapSampler Binding 1 - OpDecorate %ShadowMapTexture DescriptorSet 1 - OpDecorate %ShadowMapTexture Binding 1 - OpDecorate %EnvironmentMapTexture DescriptorSet 1 - OpDecorate %EnvironmentMapTexture Binding 2 - OpDecorate %EnvironmentMapSampler DescriptorSet 1 - OpDecorate %EnvironmentMapSampler Binding 2 - OpDecorate %IN_HPosition BuiltIn FragCoord - OpDecorate %IN_Uv_EdgeDistance1 Location 0 - OpDecorate %IN_UvStuds_EdgeDistance2 Location 1 - OpDecorate %IN_Color Location 2 - OpDecorate %IN_LightPosition_Fog Location 3 - OpDecorate %IN_View_Depth Location 4 - OpDecorate %IN_Normal_SpecPower Location 5 - OpDecorate %IN_Tangent Location 6 - OpDecorate %IN_PosLightSpace_Reflectance Location 7 - OpDecorate %IN_studIndex Location 8 - OpDecorate %_entryPointOutput Location 0 - OpDecorate %DiffuseMapSampler DescriptorSet 1 - OpDecorate %DiffuseMapSampler Binding 3 - OpDecorate %DiffuseMapTexture DescriptorSet 1 - OpDecorate %DiffuseMapTexture Binding 3 - OpDecorate %NormalMapSampler DescriptorSet 1 - OpDecorate %NormalMapSampler Binding 4 - OpDecorate %NormalMapTexture DescriptorSet 1 - OpDecorate %NormalMapTexture Binding 4 - OpDecorate %NormalDetailMapTexture DescriptorSet 1 - OpDecorate %NormalDetailMapTexture Binding 8 - OpDecorate %NormalDetailMapSampler DescriptorSet 1 - OpDecorate %NormalDetailMapSampler Binding 8 - OpDecorate %StudsMapTexture DescriptorSet 1 - OpDecorate %StudsMapTexture Binding 0 - OpDecorate %StudsMapSampler DescriptorSet 1 - OpDecorate %StudsMapSampler Binding 0 - OpDecorate %SpecularMapSampler DescriptorSet 1 - OpDecorate %SpecularMapSampler Binding 5 - OpDecorate %SpecularMapTexture DescriptorSet 1 - OpDecorate %SpecularMapTexture Binding 5 - OpMemberDecorate %Params 0 Offset 0 - OpMemberDecorate %CB2 0 Offset 0 - OpDecorate %CB2 Block - %void = OpTypeVoid - %3 = OpTypeFunction %void - %float = OpTypeFloat 32 -%_ptr_Function_float = OpTypePointer Function %float - %8 = OpTypeFunction %float %_ptr_Function_float - %v4float = OpTypeVector %float 4 -%_ptr_Function_v4float = OpTypePointer Function %v4float - %v3float = OpTypeVector %float 3 - %18 = OpTypeFunction %v3float %_ptr_Function_v4float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %_ptr_Function_v3float - %27 = OpTypeFunction %float %_ptr_Function_v3float - %31 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float - %36 = OpTypeSampler -%_ptr_Function_36 = OpTypePointer Function %36 - %38 = OpTypeImage %float 2D 0 0 0 1 Unknown -%_ptr_Function_38 = OpTypePointer Function %38 - %40 = OpTypeFunction %float %_ptr_Function_36 %_ptr_Function_38 %_ptr_Function_v3float %_ptr_Function_float -%VertexOutput = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v3float %v4float %float -%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput - %Surface = OpTypeStruct %v3float %v3float %float %float %float %float - %50 = OpTypeFunction %Surface %_ptr_Function_VertexOutput - %54 = OpTypeFunction %v4float %_ptr_Function_VertexOutput - %v2float = OpTypeVector %float 2 -%_ptr_Function_v2float = OpTypePointer Function %v2float - %60 = OpTypeFunction %v4float %_ptr_Function_36 %_ptr_Function_38 %_ptr_Function_v2float %_ptr_Function_float %_ptr_Function_float -%SurfaceInput = OpTypeStruct %v4float %v2float %v2float -%_ptr_Function_SurfaceInput = OpTypePointer Function %SurfaceInput - %70 = OpTypeFunction %Surface %_ptr_Function_SurfaceInput %_ptr_Function_v2float - %float_0 = OpConstant %float 0 - %float_1 = OpConstant %float 1 - %float_2 = OpConstant %float 2 -%mat4v4float = OpTypeMatrix %v4float 4 - %Globals = OpTypeStruct %mat4v4float %v4float %v4float %v4float %v3float %v3float %v3float %v3float %v3float %v4float %v3float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float - %CB0 = OpTypeStruct %Globals -%_ptr_Uniform_CB0 = OpTypePointer Uniform %CB0 - %_ = OpVariable %_ptr_Uniform_CB0 Uniform - %int = OpTypeInt 32 1 - %int_0 = OpConstant %int 0 - %int_15 = OpConstant %int 15 -%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float - %int_14 = OpConstant %int 14 - %128 = OpConstantComposite %v3float %float_1 %float_1 %float_1 - %133 = OpTypeImage %float 3D 0 0 0 1 Unknown -%_ptr_UniformConstant_133 = OpTypePointer UniformConstant %133 -%LightMapTexture = OpVariable %_ptr_UniformConstant_133 UniformConstant -%_ptr_UniformConstant_36 = OpTypePointer UniformConstant %36 -%LightMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant - %140 = OpTypeSampledImage %133 - %int_11 = OpConstant %int 11 - %uint = OpTypeInt 32 0 - %float_9 = OpConstant %float 9 - %float_20 = OpConstant %float 20 - %float_0_5 = OpConstant %float 0.5 - %183 = OpTypeSampledImage %38 - %uint_0 = OpConstant %uint 0 - %uint_1 = OpConstant %uint 1 - %int_17 = OpConstant %int 17 - %uint_3 = OpConstant %uint 3 -%_ptr_Uniform_float = OpTypePointer Uniform %float - %float_0_25 = OpConstant %float 0.25 - %int_5 = OpConstant %int 5 -%float_0_00333333 = OpConstant %float 0.00333333 - %int_16 = OpConstant %int 16 -%_ptr_Function_Surface = OpTypePointer Function %Surface - %int_6 = OpConstant %int 6 - %int_7 = OpConstant %int 7 -%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float - %int_8 = OpConstant %int 8 -%ShadowMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant -%_ptr_UniformConstant_38 = OpTypePointer UniformConstant %38 -%ShadowMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant - %367 = OpTypeImage %float Cube 0 0 0 1 Unknown -%_ptr_UniformConstant_367 = OpTypePointer UniformConstant %367 -%EnvironmentMapTexture = OpVariable %_ptr_UniformConstant_367 UniformConstant -%EnvironmentMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant - %373 = OpTypeSampledImage %367 - %float_1_5 = OpConstant %float 1.5 - %int_10 = OpConstant %int 10 -%_ptr_Input_v4float = OpTypePointer Input %v4float -%IN_HPosition = OpVariable %_ptr_Input_v4float Input -%IN_Uv_EdgeDistance1 = OpVariable %_ptr_Input_v4float Input -%IN_UvStuds_EdgeDistance2 = OpVariable %_ptr_Input_v4float Input - %IN_Color = OpVariable %_ptr_Input_v4float Input -%IN_LightPosition_Fog = OpVariable %_ptr_Input_v4float Input -%IN_View_Depth = OpVariable %_ptr_Input_v4float Input -%IN_Normal_SpecPower = OpVariable %_ptr_Input_v4float Input -%_ptr_Input_v3float = OpTypePointer Input %v3float - %IN_Tangent = OpVariable %_ptr_Input_v3float Input -%IN_PosLightSpace_Reflectance = OpVariable %_ptr_Input_v4float Input -%_ptr_Input_float = OpTypePointer Input %float -%IN_studIndex = OpVariable %_ptr_Input_float Input -%_ptr_Output_v4float = OpTypePointer Output %v4float -%_entryPointOutput = OpVariable %_ptr_Output_v4float Output - %bool = OpTypeBool -%DiffuseMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant -%DiffuseMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant -%NormalMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant -%NormalMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant -%NormalDetailMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant -%NormalDetailMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant - %float_0_3 = OpConstant %float 0.3 -%StudsMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant -%StudsMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant -%SpecularMapSampler = OpVariable %_ptr_UniformConstant_36 UniformConstant -%SpecularMapTexture = OpVariable %_ptr_UniformConstant_38 UniformConstant - %float_0_75 = OpConstant %float 0.75 - %float_256 = OpConstant %float 256 - %689 = OpConstantComposite %v2float %float_2 %float_256 - %float_0_01 = OpConstant %float 0.01 - %692 = OpConstantComposite %v2float %float_0 %float_0_01 - %float_0_8 = OpConstant %float 0.8 - %float_120 = OpConstant %float 120 - %697 = OpConstantComposite %v2float %float_0_8 %float_120 - %Params = OpTypeStruct %v4float - %CB2 = OpTypeStruct %Params -%_ptr_Uniform_CB2 = OpTypePointer Uniform %CB2 - %false = OpConstantFalse %bool - %1509 = OpUndef %VertexOutput - %1510 = OpUndef %SurfaceInput - %1511 = OpUndef %v2float - %1512 = OpUndef %v4float - %1531 = OpUndef %Surface - %main = OpFunction %void None %3 - %5 = OpLabel - %501 = OpLoad %v4float %IN_HPosition - %1378 = OpCompositeInsert %VertexOutput %501 %1509 0 - %504 = OpLoad %v4float %IN_Uv_EdgeDistance1 - %1380 = OpCompositeInsert %VertexOutput %504 %1378 1 - %507 = OpLoad %v4float %IN_UvStuds_EdgeDistance2 - %1382 = OpCompositeInsert %VertexOutput %507 %1380 2 - %510 = OpLoad %v4float %IN_Color - %1384 = OpCompositeInsert %VertexOutput %510 %1382 3 - %513 = OpLoad %v4float %IN_LightPosition_Fog - %1386 = OpCompositeInsert %VertexOutput %513 %1384 4 - %516 = OpLoad %v4float %IN_View_Depth - %1388 = OpCompositeInsert %VertexOutput %516 %1386 5 - %519 = OpLoad %v4float %IN_Normal_SpecPower - %1390 = OpCompositeInsert %VertexOutput %519 %1388 6 - %523 = OpLoad %v3float %IN_Tangent - %1392 = OpCompositeInsert %VertexOutput %523 %1390 7 - %526 = OpLoad %v4float %IN_PosLightSpace_Reflectance - %1394 = OpCompositeInsert %VertexOutput %526 %1392 8 - %530 = OpLoad %float %IN_studIndex - %1396 = OpCompositeInsert %VertexOutput %530 %1394 9 - %1400 = OpCompositeInsert %SurfaceInput %510 %1510 0 - %954 = OpVectorShuffle %v2float %504 %504 0 1 - %1404 = OpCompositeInsert %SurfaceInput %954 %1400 1 - %958 = OpVectorShuffle %v2float %507 %507 0 1 - %1408 = OpCompositeInsert %SurfaceInput %958 %1404 2 - %1410 = OpCompositeExtract %float %1408 2 1 - %962 = OpExtInst %float %1 Fract %1410 - %965 = OpFAdd %float %962 %530 - %966 = OpFMul %float %965 %float_0_25 - %1414 = OpCompositeInsert %SurfaceInput %966 %1408 2 1 - %1416 = OpCompositeExtract %float %1396 5 3 - %970 = OpFMul %float %1416 %float_0_00333333 - %971 = OpFSub %float %float_1 %970 - %987 = OpExtInst %float %1 FClamp %971 %float_0 %float_1 - %976 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_16 %uint_1 - %977 = OpLoad %float %976 - %978 = OpFMul %float %1416 %977 - %979 = OpFSub %float %float_1 %978 - %990 = OpExtInst %float %1 FClamp %979 %float_0 %float_1 - %1024 = OpVectorTimesScalar %v2float %954 %float_1 - %1029 = OpLoad %36 %DiffuseMapSampler - %1030 = OpLoad %38 %DiffuseMapTexture - OpBranch %1119 - %1119 = OpLabel - OpLoopMerge %1120 %1121 None - OpBranch %1122 - %1122 = OpLabel - %1124 = OpFOrdEqual %bool %float_0 %float_0 - OpSelectionMerge %1125 None - OpBranchConditional %1124 %1126 %1127 - %1126 = OpLabel - %1130 = OpSampledImage %183 %1030 %1029 - %1132 = OpImageSampleImplicitLod %v4float %1130 %1024 - OpBranch %1120 - %1127 = OpLabel - %1134 = OpFSub %float %float_1 %float_0 - %1135 = OpFDiv %float %float_1 %1134 - %1138 = OpSampledImage %183 %1030 %1029 - %1140 = OpVectorTimesScalar %v2float %1024 %float_0_25 - %1141 = OpImageSampleImplicitLod %v4float %1138 %1140 - %1144 = OpSampledImage %183 %1030 %1029 - %1146 = OpImageSampleImplicitLod %v4float %1144 %1024 - %1149 = OpFMul %float %987 %1135 - %1152 = OpFMul %float %float_0 %1135 - %1153 = OpFSub %float %1149 %1152 - %1161 = OpExtInst %float %1 FClamp %1153 %float_0 %float_1 - %1155 = OpCompositeConstruct %v4float %1161 %1161 %1161 %1161 - %1156 = OpExtInst %v4float %1 FMix %1141 %1146 %1155 - OpBranch %1120 - %1125 = OpLabel - %1157 = OpUndef %v4float - OpBranch %1120 - %1121 = OpLabel - OpBranchConditional %false %1119 %1120 - %1120 = OpLabel - %1517 = OpPhi %v4float %1132 %1126 %1156 %1127 %1157 %1125 %1512 %1121 - %1035 = OpVectorTimesScalar %v4float %1517 %float_1 - %1036 = OpLoad %36 %NormalMapSampler - %1037 = OpLoad %38 %NormalMapTexture - OpBranch %1165 - %1165 = OpLabel - OpLoopMerge %1166 %1167 None - OpBranch %1168 - %1168 = OpLabel - OpSelectionMerge %1171 None - OpBranchConditional %1124 %1172 %1173 - %1172 = OpLabel - %1176 = OpSampledImage %183 %1037 %1036 - %1178 = OpImageSampleImplicitLod %v4float %1176 %1024 - OpBranch %1166 - %1173 = OpLabel - %1180 = OpFSub %float %float_1 %float_0 - %1181 = OpFDiv %float %float_1 %1180 - %1184 = OpSampledImage %183 %1037 %1036 - %1186 = OpVectorTimesScalar %v2float %1024 %float_0_25 - %1187 = OpImageSampleImplicitLod %v4float %1184 %1186 - %1190 = OpSampledImage %183 %1037 %1036 - %1192 = OpImageSampleImplicitLod %v4float %1190 %1024 - %1195 = OpFMul %float %990 %1181 - %1198 = OpFMul %float %float_0 %1181 - %1199 = OpFSub %float %1195 %1198 - %1206 = OpExtInst %float %1 FClamp %1199 %float_0 %float_1 - %1201 = OpCompositeConstruct %v4float %1206 %1206 %1206 %1206 - %1202 = OpExtInst %v4float %1 FMix %1187 %1192 %1201 - OpBranch %1166 - %1171 = OpLabel - %1203 = OpUndef %v4float - OpBranch %1166 - %1167 = OpLabel - OpBranchConditional %false %1165 %1166 - %1166 = OpLabel - %1523 = OpPhi %v4float %1178 %1172 %1202 %1173 %1203 %1171 %1512 %1167 - %1210 = OpVectorShuffle %v2float %1523 %1523 3 1 - %1211 = OpVectorTimesScalar %v2float %1210 %float_2 - %1212 = OpCompositeConstruct %v2float %float_1 %float_1 - %1213 = OpFSub %v2float %1211 %1212 - %1216 = OpFNegate %v2float %1213 - %1218 = OpDot %float %1216 %1213 - %1219 = OpFAdd %float %float_1 %1218 - %1220 = OpExtInst %float %1 FClamp %1219 %float_0 %float_1 - %1221 = OpExtInst %float %1 Sqrt %1220 - %1222 = OpCompositeExtract %float %1213 0 - %1223 = OpCompositeExtract %float %1213 1 - %1224 = OpCompositeConstruct %v3float %1222 %1223 %1221 - %1042 = OpLoad %38 %NormalDetailMapTexture - %1043 = OpLoad %36 %NormalDetailMapSampler - %1044 = OpSampledImage %183 %1042 %1043 - %1046 = OpVectorTimesScalar %v2float %1024 %float_0 - %1047 = OpImageSampleImplicitLod %v4float %1044 %1046 - %1228 = OpVectorShuffle %v2float %1047 %1047 3 1 - %1229 = OpVectorTimesScalar %v2float %1228 %float_2 - %1231 = OpFSub %v2float %1229 %1212 - %1234 = OpFNegate %v2float %1231 - %1236 = OpDot %float %1234 %1231 - %1237 = OpFAdd %float %float_1 %1236 - %1238 = OpExtInst %float %1 FClamp %1237 %float_0 %float_1 - %1239 = OpExtInst %float %1 Sqrt %1238 - %1240 = OpCompositeExtract %float %1231 0 - %1241 = OpCompositeExtract %float %1231 1 - %1242 = OpCompositeConstruct %v3float %1240 %1241 %1239 - %1050 = OpVectorShuffle %v2float %1242 %1242 0 1 - %1051 = OpVectorTimesScalar %v2float %1050 %float_0 - %1053 = OpVectorShuffle %v2float %1224 %1224 0 1 - %1054 = OpFAdd %v2float %1053 %1051 - %1056 = OpVectorShuffle %v3float %1224 %1054 3 4 2 - %1059 = OpVectorShuffle %v2float %1056 %1056 0 1 - %1060 = OpVectorTimesScalar %v2float %1059 %990 - %1062 = OpVectorShuffle %v3float %1056 %1060 3 4 2 - %1430 = OpCompositeExtract %float %1062 0 - %1065 = OpFMul %float %1430 %float_0_3 - %1066 = OpFAdd %float %float_1 %1065 - %1069 = OpVectorShuffle %v3float %510 %510 0 1 2 - %1071 = OpVectorShuffle %v3float %1035 %1035 0 1 2 - %1072 = OpFMul %v3float %1069 %1071 - %1074 = OpVectorTimesScalar %v3float %1072 %1066 - %1075 = OpLoad %38 %StudsMapTexture - %1076 = OpLoad %36 %StudsMapSampler - %1077 = OpSampledImage %183 %1075 %1076 - %1434 = OpCompositeExtract %v2float %1414 2 - %1080 = OpImageSampleImplicitLod %v4float %1077 %1434 - %1436 = OpCompositeExtract %float %1080 0 - %1083 = OpFMul %float %1436 %float_2 - %1085 = OpVectorTimesScalar %v3float %1074 %1083 - %1086 = OpLoad %36 %SpecularMapSampler - %1087 = OpLoad %38 %SpecularMapTexture - OpBranch %1246 - %1246 = OpLabel - OpLoopMerge %1247 %1248 None - OpBranch %1249 - %1249 = OpLabel - %1251 = OpFOrdEqual %bool %float_0_75 %float_0 - OpSelectionMerge %1252 None - OpBranchConditional %1251 %1253 %1254 - %1253 = OpLabel - %1257 = OpSampledImage %183 %1087 %1086 - %1259 = OpImageSampleImplicitLod %v4float %1257 %1024 - OpBranch %1247 - %1254 = OpLabel - %1261 = OpFSub %float %float_1 %float_0_75 - %1262 = OpFDiv %float %float_1 %1261 - %1265 = OpSampledImage %183 %1087 %1086 - %1267 = OpVectorTimesScalar %v2float %1024 %float_0_25 - %1268 = OpImageSampleImplicitLod %v4float %1265 %1267 - %1271 = OpSampledImage %183 %1087 %1086 - %1273 = OpImageSampleImplicitLod %v4float %1271 %1024 - %1276 = OpFMul %float %990 %1262 - %1279 = OpFMul %float %float_0_75 %1262 - %1280 = OpFSub %float %1276 %1279 - %1287 = OpExtInst %float %1 FClamp %1280 %float_0 %float_1 - %1282 = OpCompositeConstruct %v4float %1287 %1287 %1287 %1287 - %1283 = OpExtInst %v4float %1 FMix %1268 %1273 %1282 - OpBranch %1247 - %1252 = OpLabel - %1284 = OpUndef %v4float - OpBranch %1247 - %1248 = OpLabel - OpBranchConditional %false %1246 %1247 - %1247 = OpLabel - %1530 = OpPhi %v4float %1259 %1253 %1283 %1254 %1284 %1252 %1512 %1248 - %1091 = OpVectorShuffle %v2float %1530 %1530 0 1 - %1093 = OpFMul %v2float %1091 %689 - %1094 = OpFAdd %v2float %1093 %692 - %1097 = OpCompositeConstruct %v2float %990 %990 - %1098 = OpExtInst %v2float %1 FMix %697 %1094 %1097 - %1438 = OpCompositeInsert %Surface %1085 %1531 0 - %1440 = OpCompositeInsert %Surface %1062 %1438 1 - %1442 = OpCompositeExtract %float %1098 0 - %1444 = OpCompositeInsert %Surface %1442 %1440 2 - %1446 = OpCompositeExtract %float %1098 1 - %1448 = OpCompositeInsert %Surface %1446 %1444 3 - %1450 = OpCompositeExtract %float %1091 1 - %1112 = OpFMul %float %1450 %990 - %1113 = OpFMul %float %1112 %float_0 - %1452 = OpCompositeInsert %Surface %1113 %1448 4 - %1456 = OpCompositeExtract %float %1396 3 3 - %764 = OpCompositeExtract %float %1085 0 - %765 = OpCompositeExtract %float %1085 1 - %766 = OpCompositeExtract %float %1085 2 - %767 = OpCompositeConstruct %v4float %764 %765 %766 %1456 - %770 = OpVectorShuffle %v3float %519 %519 0 1 2 - %773 = OpExtInst %v3float %1 Cross %770 %523 - %1462 = OpCompositeExtract %float %1452 1 0 - %778 = OpVectorTimesScalar %v3float %523 %1462 - %1466 = OpCompositeExtract %float %1452 1 1 - %782 = OpVectorTimesScalar %v3float %773 %1466 - %783 = OpFAdd %v3float %778 %782 - %1468 = OpCompositeExtract %float %1452 1 2 - %789 = OpVectorTimesScalar %v3float %770 %1468 - %790 = OpFAdd %v3float %783 %789 - %791 = OpExtInst %v3float %1 Normalize %790 - %793 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_7 - %794 = OpLoad %v3float %793 - %795 = OpFNegate %v3float %794 - %796 = OpDot %float %791 %795 - %1290 = OpExtInst %float %1 FClamp %796 %float_0 %float_1 - %799 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_6 - %800 = OpLoad %v3float %799 - %801 = OpVectorTimesScalar %v3float %800 %1290 - %803 = OpFNegate %float %796 - %804 = OpExtInst %float %1 FMax %803 %float_0 - %805 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_8 - %806 = OpLoad %v3float %805 - %807 = OpVectorTimesScalar %v3float %806 %804 - %808 = OpFAdd %v3float %801 %807 - %810 = OpExtInst %float %1 Step %float_0 %796 - %813 = OpFMul %float %810 %1442 - %820 = OpVectorShuffle %v3float %513 %513 0 1 2 - %1296 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_15 - %1297 = OpLoad %v4float %1296 - %1298 = OpVectorShuffle %v3float %1297 %1297 0 1 2 - %1300 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_14 - %1301 = OpLoad %v4float %1300 - %1302 = OpVectorShuffle %v3float %1301 %1301 0 1 2 - %1303 = OpFSub %v3float %820 %1302 - %1304 = OpExtInst %v3float %1 FAbs %1303 - %1305 = OpExtInst %v3float %1 Step %1298 %1304 - %1307 = OpDot %float %1305 %128 - %1328 = OpExtInst %float %1 FClamp %1307 %float_0 %float_1 - %1309 = OpLoad %133 %LightMapTexture - %1310 = OpLoad %36 %LightMapSampler - %1311 = OpSampledImage %140 %1309 %1310 - %1313 = OpVectorShuffle %v3float %820 %820 1 2 0 - %1317 = OpVectorTimesScalar %v3float %1313 %1328 - %1318 = OpFSub %v3float %1313 %1317 - %1319 = OpImageSampleImplicitLod %v4float %1311 %1318 - %1321 = OpAccessChain %_ptr_Uniform_v4float %_ %int_0 %int_11 - %1322 = OpLoad %v4float %1321 - %1324 = OpCompositeConstruct %v4float %1328 %1328 %1328 %1328 - %1325 = OpExtInst %v4float %1 FMix %1319 %1322 %1324 - %822 = OpLoad %36 %ShadowMapSampler - %823 = OpLoad %38 %ShadowMapTexture - %826 = OpVectorShuffle %v3float %526 %526 0 1 2 - %1482 = OpCompositeExtract %float %1325 3 - %1337 = OpSampledImage %183 %823 %822 - %1339 = OpVectorShuffle %v2float %826 %826 0 1 - %1340 = OpImageSampleImplicitLod %v4float %1337 %1339 - %1341 = OpVectorShuffle %v2float %1340 %1340 0 1 - %1484 = OpCompositeExtract %float %826 2 - %1486 = OpCompositeExtract %float %1341 0 - %1363 = OpExtInst %float %1 Step %1486 %1484 - %1365 = OpFSub %float %1484 %float_0_5 - %1366 = OpExtInst %float %1 FAbs %1365 - %1367 = OpFMul %float %float_20 %1366 - %1368 = OpFSub %float %float_9 %1367 - %1369 = OpExtInst %float %1 FClamp %1368 %float_0 %float_1 - %1370 = OpFMul %float %1363 %1369 - %1488 = OpCompositeExtract %float %1341 1 - %1350 = OpFMul %float %1370 %1488 - %1351 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17 %uint_3 - %1352 = OpLoad %float %1351 - %1353 = OpFMul %float %1350 %1352 - %1354 = OpFSub %float %float_1 %1353 - %1356 = OpFMul %float %1354 %1482 - %830 = OpLoad %367 %EnvironmentMapTexture - %831 = OpLoad %36 %EnvironmentMapSampler - %832 = OpSampledImage %373 %830 %831 - %835 = OpVectorShuffle %v3float %516 %516 0 1 2 - %836 = OpFNegate %v3float %835 - %838 = OpExtInst %v3float %1 Reflect %836 %791 - %839 = OpImageSampleImplicitLod %v4float %832 %838 - %840 = OpVectorShuffle %v3float %839 %839 0 1 2 - %842 = OpVectorShuffle %v3float %767 %767 0 1 2 - %845 = OpCompositeConstruct %v3float %1113 %1113 %1113 - %846 = OpExtInst %v3float %1 FMix %842 %840 %845 - %848 = OpVectorShuffle %v4float %767 %846 4 5 6 3 - %849 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_5 - %850 = OpLoad %v3float %849 - %853 = OpVectorTimesScalar %v3float %808 %1356 - %854 = OpFAdd %v3float %850 %853 - %856 = OpVectorShuffle %v3float %1325 %1325 0 1 2 - %857 = OpFAdd %v3float %854 %856 - %859 = OpVectorShuffle %v3float %848 %848 0 1 2 - %860 = OpFMul %v3float %857 %859 - %865 = OpFMul %float %813 %1356 - %873 = OpExtInst %v3float %1 Normalize %835 - %874 = OpFAdd %v3float %795 %873 - %875 = OpExtInst %v3float %1 Normalize %874 - %876 = OpDot %float %791 %875 - %877 = OpExtInst %float %1 FClamp %876 %float_0 %float_1 - %879 = OpExtInst %float %1 Pow %877 %1446 - %880 = OpFMul %float %865 %879 - %881 = OpVectorTimesScalar %v3float %800 %880 - %884 = OpFAdd %v3float %860 %881 - %886 = OpVectorShuffle %v4float %1512 %884 4 5 6 3 - %1494 = OpCompositeExtract %float %848 3 - %1496 = OpCompositeInsert %v4float %1494 %886 3 - %896 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17 %uint_0 - %897 = OpLoad %float %896 - %898 = OpFMul %float %978 %897 - %899 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17 %uint_1 - %900 = OpLoad %float %899 - %901 = OpFAdd %float %898 %900 - %1373 = OpExtInst %float %1 FClamp %901 %float_0 %float_1 - %905 = OpVectorShuffle %v2float %504 %504 3 2 - %908 = OpVectorShuffle %v2float %507 %507 3 2 - %909 = OpExtInst %v2float %1 FMin %905 %908 - %1504 = OpCompositeExtract %float %909 0 - %1506 = OpCompositeExtract %float %909 1 - %914 = OpExtInst %float %1 FMin %1504 %1506 - %916 = OpFDiv %float %914 %978 - %919 = OpFSub %float %float_1_5 %916 - %920 = OpFMul %float %1373 %919 - %922 = OpFAdd %float %920 %916 - %1376 = OpExtInst %float %1 FClamp %922 %float_0 %float_1 - %925 = OpVectorShuffle %v3float %1496 %1496 0 1 2 - %926 = OpVectorTimesScalar %v3float %925 %1376 - %928 = OpVectorShuffle %v4float %1496 %926 4 5 6 3 - %1508 = OpCompositeExtract %float %1396 4 3 - %931 = OpExtInst %float %1 FClamp %1508 %float_0 %float_1 - %932 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0 %int_10 - %933 = OpLoad %v3float %932 - %935 = OpVectorShuffle %v3float %928 %928 0 1 2 - %937 = OpCompositeConstruct %v3float %931 %931 %931 - %938 = OpExtInst %v3float %1 FMix %933 %935 %937 - %940 = OpVectorShuffle %v4float %928 %938 4 5 6 3 - OpStore %_entryPointOutput %940 - OpReturn - OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-msl-no-opt/packing/array-of-vec3.comp b/3rdparty/spirv-cross/shaders-msl-no-opt/packing/array-of-vec3.comp new file mode 100644 index 000000000..615721222 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl-no-opt/packing/array-of-vec3.comp @@ -0,0 +1,13 @@ +#version 450 +#extension GL_EXT_scalar_block_layout : require +layout(local_size_x = 1) in; + +layout(set = 0, binding = 0, scalar) buffer SSBO +{ + vec3 v[16]; +}; + +void main() +{ + v[1] = v[0]; +} diff --git a/3rdparty/spirv-cross/shaders-msl-no-opt/packing/array-of-vec4.comp b/3rdparty/spirv-cross/shaders-msl-no-opt/packing/array-of-vec4.comp new file mode 100644 index 000000000..c5bf5e8a3 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl-no-opt/packing/array-of-vec4.comp @@ -0,0 +1,13 @@ +#version 450 +#extension GL_EXT_scalar_block_layout : require +layout(local_size_x = 1) in; + +layout(set = 0, binding = 0, scalar) buffer SSBO +{ + vec4 v[16]; +}; + +void main() +{ + v[1] = v[0]; +} diff --git a/3rdparty/spirv-cross/shaders-msl/comp/complex-composite-constant-array.comp b/3rdparty/spirv-cross/shaders-msl/comp/complex-composite-constant-array.comp new file mode 100644 index 000000000..96a3f8951 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/comp/complex-composite-constant-array.comp @@ -0,0 +1,19 @@ +#version 450 + +layout(std430, set = 0, binding = 0) buffer SSBO +{ + mat4 a; + uint index; +}; + +const mat4 as[] = mat4[](mat4(1.0), mat4(2.0)); + +void write_global() +{ + a = as[index]; +} + +void main() +{ + write_global(); +} diff --git a/3rdparty/spirv-cross/shaders-msl/frag/array-of-array-lut.frag b/3rdparty/spirv-cross/shaders-msl/frag/array-of-array-lut.frag new file mode 100644 index 000000000..c401a3fe3 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/frag/array-of-array-lut.frag @@ -0,0 +1,12 @@ +#version 450 + +layout(location = 0) out float vOutput; +layout(location = 0) flat in int vIndex1; +layout(location = 1) flat in int vIndex2; + +const float FOO[2][3] = float[][](float[](1.0, 2.0, 3.0), float[](4.0, 5.0, 6.0)); + +void main() +{ + vOutput = FOO[vIndex1][vIndex2]; +} diff --git a/3rdparty/spirv-cross/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag b/3rdparty/spirv-cross/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag new file mode 100644 index 000000000..9a855ac7a --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/frag/sample-depth-propagate-state-from-resource.frag @@ -0,0 +1,29 @@ +#version 450 + +layout(set = 0, binding = 0) uniform texture2D uTexture; +layout(set = 0, binding = 1) uniform sampler uSampler; +layout(set = 0, binding = 2) uniform samplerShadow uSamplerShadow; + +layout(location = 0) out float FragColor; +layout(location = 0) in vec3 vUV; + +float sample_normal2(texture2D tex) +{ + return texture(sampler2D(tex, uSampler), vUV.xy).x; +} + +float sample_normal(texture2D tex) +{ + return sample_normal2(tex); +} + +float sample_comp(texture2D tex) +{ + return texture(sampler2DShadow(tex, uSamplerShadow), vUV); +} + +void main() +{ + FragColor = sample_normal(uTexture); + FragColor += sample_comp(uTexture); +} diff --git a/3rdparty/spirv-cross/shaders-msl/frag/texture-cube-array.frag b/3rdparty/spirv-cross/shaders-msl/frag/texture-cube-array.frag new file mode 100644 index 000000000..91a55f933 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/frag/texture-cube-array.frag @@ -0,0 +1,16 @@ +#version 450 + +layout(set = 0, binding = 0) uniform samplerCube cubeSampler; +layout(set = 0, binding = 1) uniform samplerCubeArray cubeArraySampler; +layout(set = 0, binding = 2) uniform sampler2DArray texArraySampler; + +layout(location = 0) in vec4 vUV; +layout(location = 0) out vec4 FragColor; + +void main() +{ + vec4 a = texture(cubeSampler, vUV.xyz); + vec4 b = texture(cubeArraySampler, vUV); + vec4 c = texture(texArraySampler, vUV.xyz); + FragColor = a + b + c; +} diff --git a/3rdparty/spirv-cross/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag b/3rdparty/spirv-cross/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag new file mode 100644 index 000000000..91a55f933 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/frag/texture-cube-array.ios.emulate-cube-array.frag @@ -0,0 +1,16 @@ +#version 450 + +layout(set = 0, binding = 0) uniform samplerCube cubeSampler; +layout(set = 0, binding = 1) uniform samplerCubeArray cubeArraySampler; +layout(set = 0, binding = 2) uniform sampler2DArray texArraySampler; + +layout(location = 0) in vec4 vUV; +layout(location = 0) out vec4 FragColor; + +void main() +{ + vec4 a = texture(cubeSampler, vUV.xyz); + vec4 b = texture(cubeArraySampler, vUV); + vec4 c = texture(texArraySampler, vUV.xyz); + FragColor = a + b + c; +} diff --git a/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array-of-matrix.tesc b/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array-of-matrix.tesc new file mode 100644 index 000000000..36b16681e --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array-of-matrix.tesc @@ -0,0 +1,12 @@ +#version 450 + +layout(vertices = 4) out; + +layout(location = 0) in mat4 vInputs[gl_MaxPatchVertices]; +layout(location = 0) out mat4 vOutputs[4]; + +void main() +{ + mat4 tmp[gl_MaxPatchVertices] = vInputs; + vOutputs[gl_InvocationID] = tmp[gl_InvocationID]; +} diff --git a/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array-of-struct.tesc b/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array-of-struct.tesc new file mode 100644 index 000000000..4b4d5bfcd --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array-of-struct.tesc @@ -0,0 +1,21 @@ +#version 450 + +layout(vertices = 4) out; + +struct VertexData +{ + mat4 a; + vec4 b[2]; + vec4 c; +}; + +layout(location = 0) in VertexData vInputs[gl_MaxPatchVertices]; +layout(location = 0) out vec4 vOutputs[4]; + +void main() +{ + VertexData tmp[gl_MaxPatchVertices] = vInputs; + VertexData tmp_single = vInputs[gl_InvocationID ^ 1]; + + vOutputs[gl_InvocationID] = tmp[gl_InvocationID].a[1] + tmp[gl_InvocationID].b[1] + tmp[gl_InvocationID].c + tmp_single.c; +} diff --git a/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array.tesc b/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array.tesc new file mode 100644 index 000000000..1a5924b89 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/tesc/load-control-point-array.tesc @@ -0,0 +1,12 @@ +#version 450 + +layout(vertices = 4) out; + +layout(location = 0) in vec4 vInputs[gl_MaxPatchVertices]; +layout(location = 0) out vec4 vOutputs[4]; + +void main() +{ + vec4 tmp[gl_MaxPatchVertices] = vInputs; + vOutputs[gl_InvocationID] = tmp[gl_InvocationID]; +} diff --git a/3rdparty/spirv-cross/shaders-msl/tese/load-control-point-array-of-matrix.tese b/3rdparty/spirv-cross/shaders-msl/tese/load-control-point-array-of-matrix.tese new file mode 100644 index 000000000..479b3e651 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/tese/load-control-point-array-of-matrix.tese @@ -0,0 +1,13 @@ +#version 450 + +layout(cw, quads) in; +layout(location = 0) in mat4 vInputs[gl_MaxPatchVertices]; +layout(location = 4) patch in vec4 vBoo[4]; +layout(location = 8) patch in int vIndex; + +void main() +{ + mat4 tmp[gl_MaxPatchVertices] = vInputs; + gl_Position = tmp[0][vIndex] + tmp[1][vIndex] + vBoo[vIndex]; + +} diff --git a/3rdparty/spirv-cross/shaders-msl/tese/load-control-point-array.tese b/3rdparty/spirv-cross/shaders-msl/tese/load-control-point-array.tese new file mode 100644 index 000000000..4fa0bb124 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/tese/load-control-point-array.tese @@ -0,0 +1,13 @@ +#version 450 + +layout(cw, quads) in; +layout(location = 0) in vec4 vInputs[gl_MaxPatchVertices]; +layout(location = 1) patch in vec4 vBoo[4]; +layout(location = 5) patch in int vIndex; + +void main() +{ + vec4 tmp[gl_MaxPatchVertices] = vInputs; + gl_Position = tmp[0] + tmp[1] + vBoo[vIndex]; + +} diff --git a/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert b/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert new file mode 100644 index 000000000..caa8639a8 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/vert/float-math.invariant-float-math.vert @@ -0,0 +1,25 @@ +#version 450 + +layout(set = 0, binding = 0) uniform Matrices +{ + mat4 vpMatrix; + mat4 wMatrix; + mat4x3 wMatrix4x3; + mat3x4 wMatrix3x4; +}; + +layout(location = 0) in vec3 InPos; +layout(location = 1) in vec3 InNormal; + +layout(location = 0) out vec3 OutNormal; +layout(location = 1) out vec4 OutWorldPos[4]; + +void main() +{ + gl_Position = vpMatrix * wMatrix * vec4(InPos, 1); + OutWorldPos[0] = wMatrix * vec4(InPos, 1); + OutWorldPos[1] = vec4(InPos, 1) * wMatrix; + OutWorldPos[2] = wMatrix3x4 * InPos; + OutWorldPos[3] = InPos * wMatrix4x3; + OutNormal = (wMatrix * vec4(InNormal, 0)).xyz; +} diff --git a/3rdparty/spirv-cross/shaders-msl/vert/float-math.vert b/3rdparty/spirv-cross/shaders-msl/vert/float-math.vert new file mode 100644 index 000000000..caa8639a8 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-msl/vert/float-math.vert @@ -0,0 +1,25 @@ +#version 450 + +layout(set = 0, binding = 0) uniform Matrices +{ + mat4 vpMatrix; + mat4 wMatrix; + mat4x3 wMatrix4x3; + mat3x4 wMatrix3x4; +}; + +layout(location = 0) in vec3 InPos; +layout(location = 1) in vec3 InNormal; + +layout(location = 0) out vec3 OutNormal; +layout(location = 1) out vec4 OutWorldPos[4]; + +void main() +{ + gl_Position = vpMatrix * wMatrix * vec4(InPos, 1); + OutWorldPos[0] = wMatrix * vec4(InPos, 1); + OutWorldPos[1] = vec4(InPos, 1) * wMatrix; + OutWorldPos[2] = wMatrix3x4 * InPos; + OutWorldPos[3] = InPos * wMatrix4x3; + OutNormal = (wMatrix * vec4(InNormal, 0)).xyz; +} diff --git a/3rdparty/spirv-cross/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/3rdparty/spirv-cross/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag new file mode 100644 index 000000000..a9650ddbb --- /dev/null +++ b/3rdparty/spirv-cross/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -0,0 +1,61 @@ +; SPIR-V +; Version: 1.2 +; Generator: Khronos; 0 +; Bound: 43 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %EntryPoint_Main "main" + OpExecutionMode %EntryPoint_Main OriginUpperLeft + OpSource Unknown 100 + OpName %EmptyStructTest "EmptyStructTest" + OpName %EmptyStruct2Test "EmptyStruct2Test" + OpName %GetValue "GetValue" + OpName %GetValue2 "GetValue" + OpName %self "self" + OpName %self2 "self" + OpName %emptyStruct "emptyStruct" + OpName %value "value" + OpName %EntryPoint_Main "EntryPoint_Main" + +%EmptyStructTest = OpTypeStruct +%EmptyStruct2Test = OpTypeStruct %EmptyStructTest +%_ptr_Function_EmptyStruct2Test = OpTypePointer Function %EmptyStruct2Test + %float = OpTypeFloat 32 +%_ptr_Function_float = OpTypePointer Function %float + %5 = OpTypeFunction %float %_ptr_Function_EmptyStruct2Test + %6 = OpTypeFunction %float %EmptyStruct2Test + %void = OpTypeVoid +%_ptr_Function_void = OpTypePointer Function %void + %8 = OpTypeFunction %void %_ptr_Function_EmptyStruct2Test + %9 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %value4 = OpConstantNull %EmptyStruct2Test + + %GetValue = OpFunction %float None %5 + %self = OpFunctionParameter %_ptr_Function_EmptyStruct2Test + %13 = OpLabel + OpReturnValue %float_0 + OpFunctionEnd + + %GetValue2 = OpFunction %float None %6 + %self2 = OpFunctionParameter %EmptyStruct2Test + %14 = OpLabel + OpReturnValue %float_0 + OpFunctionEnd + +%EntryPoint_Main = OpFunction %void None %9 + %37 = OpLabel + %emptyStruct = OpVariable %_ptr_Function_EmptyStruct2Test Function + %18 = OpVariable %_ptr_Function_EmptyStruct2Test Function + %value = OpVariable %_ptr_Function_float Function + %value2 = OpCompositeConstruct %EmptyStructTest + %value3 = OpCompositeConstruct %EmptyStruct2Test %value2 + %22 = OpFunctionCall %float %GetValue %emptyStruct + %23 = OpFunctionCall %float %GetValue2 %value3 + %24 = OpFunctionCall %float %GetValue2 %value4 + OpStore %value %22 + OpStore %value %23 + OpStore %value %24 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/accesschain-invalid-expression.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/accesschain-invalid-expression.asm.frag new file mode 100644 index 000000000..fae211f27 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/accesschain-invalid-expression.asm.frag @@ -0,0 +1,1087 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 572 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %Main "main" %in_var_TEXCOORD0 %in_var_TEXCOORD7 %in_var_TEXCOORD8 %gl_FragCoord %gl_FrontFacing %out_var_SV_Target0 + OpExecutionMode %Main OriginUpperLeft + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_MobileDirectionalLight "type.MobileDirectionalLight" + OpMemberName %type_MobileDirectionalLight 0 "MobileDirectionalLight_DirectionalLightColor" + OpMemberName %type_MobileDirectionalLight 1 "MobileDirectionalLight_DirectionalLightDirectionAndShadowTransition" + OpMemberName %type_MobileDirectionalLight 2 "MobileDirectionalLight_DirectionalLightShadowSize" + OpMemberName %type_MobileDirectionalLight 3 "MobileDirectionalLight_DirectionalLightDistanceFadeMAD" + OpMemberName %type_MobileDirectionalLight 4 "MobileDirectionalLight_DirectionalLightShadowDistances" + OpMemberName %type_MobileDirectionalLight 5 "MobileDirectionalLight_DirectionalLightScreenToShadow" + OpName %MobileDirectionalLight "MobileDirectionalLight" + OpName %type_2d_image "type.2d.image" + OpName %MobileDirectionalLight_DirectionalLightShadowTexture "MobileDirectionalLight_DirectionalLightShadowTexture" + OpName %type_sampler "type.sampler" + OpName %MobileDirectionalLight_DirectionalLightShadowSampler "MobileDirectionalLight_DirectionalLightShadowSampler" + OpName %Material_Texture2D_0 "Material_Texture2D_0" + OpName %Material_Texture2D_0Sampler "Material_Texture2D_0Sampler" + OpName %Material_Texture2D_1 "Material_Texture2D_1" + OpName %Material_Texture2D_1Sampler "Material_Texture2D_1Sampler" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "NumDynamicPointLights" + OpMemberName %type__Globals 1 "LightPositionAndInvRadius" + OpMemberName %type__Globals 2 "LightColorAndFalloffExponent" + OpMemberName %type__Globals 3 "MobileReflectionParams" + OpName %_Globals "$Globals" + OpName %type_cube_image "type.cube.image" + OpName %ReflectionCubemap "ReflectionCubemap" + OpName %ReflectionCubemapSampler "ReflectionCubemapSampler" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_TEXCOORD7 "in.var.TEXCOORD7" + OpName %in_var_TEXCOORD8 "in.var.TEXCOORD8" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %Main "Main" + OpName %type_sampled_image "type.sampled.image" + OpName %type_sampled_image_0 "type.sampled.image" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorateString %in_var_TEXCOORD8 UserSemantic "TEXCOORD8" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_Position" + OpDecorate %gl_FrontFacing BuiltIn FrontFacing + OpDecorateString %gl_FrontFacing UserSemantic "SV_IsFrontFace" + OpDecorate %gl_FrontFacing Flat + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD0 Location 0 + OpDecorate %in_var_TEXCOORD7 Location 1 + OpDecorate %in_var_TEXCOORD8 Location 2 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %MobileDirectionalLight DescriptorSet 0 + OpDecorate %MobileDirectionalLight Binding 1 + OpDecorate %MobileDirectionalLight_DirectionalLightShadowTexture DescriptorSet 0 + OpDecorate %MobileDirectionalLight_DirectionalLightShadowTexture Binding 0 + OpDecorate %MobileDirectionalLight_DirectionalLightShadowSampler DescriptorSet 0 + OpDecorate %MobileDirectionalLight_DirectionalLightShadowSampler Binding 0 + OpDecorate %Material_Texture2D_0 DescriptorSet 0 + OpDecorate %Material_Texture2D_0 Binding 1 + OpDecorate %Material_Texture2D_0Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_0Sampler Binding 1 + OpDecorate %Material_Texture2D_1 DescriptorSet 0 + OpDecorate %Material_Texture2D_1 Binding 2 + OpDecorate %Material_Texture2D_1Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_1Sampler Binding 2 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 2 + OpDecorate %ReflectionCubemap DescriptorSet 0 + OpDecorate %ReflectionCubemap Binding 3 + OpDecorate %ReflectionCubemapSampler DescriptorSet 0 + OpDecorate %ReflectionCubemapSampler Binding 3 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpDecorate %_arr_mat4v4float_uint_4 ArrayStride 64 + OpMemberDecorate %type_MobileDirectionalLight 0 Offset 0 + OpMemberDecorate %type_MobileDirectionalLight 1 Offset 16 + OpMemberDecorate %type_MobileDirectionalLight 2 Offset 32 + OpMemberDecorate %type_MobileDirectionalLight 3 Offset 48 + OpMemberDecorate %type_MobileDirectionalLight 4 Offset 64 + OpMemberDecorate %type_MobileDirectionalLight 5 Offset 80 + OpMemberDecorate %type_MobileDirectionalLight 5 MatrixStride 16 + OpMemberDecorate %type_MobileDirectionalLight 5 ColMajor + OpDecorate %type_MobileDirectionalLight Block + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 2 Offset 80 + OpMemberDecorate %type__Globals 3 Offset 144 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_4 = OpConstant %int 4 + %float_0 = OpConstant %float 0 + %int_3 = OpConstant %int 3 + %47 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 + %bool = OpTypeBool + %int_5 = OpConstant %int 5 + %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 +%float_0_999989986 = OpConstant %float 0.999989986 +%float_65000 = OpConstant %float 65000 + %55 = OpConstantComposite %v3float %float_65000 %float_65000 %float_65000 +%float_0_318309873 = OpConstant %float 0.318309873 + %57 = OpConstantComposite %v3float %float_0_318309873 %float_0_318309873 %float_0_318309873 +%float_65500 = OpConstant %float 65500 + %float_0_5 = OpConstant %float 0.5 + %60 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %float_2 = OpConstant %float 2 + %float_n2 = OpConstant %float -2 + %63 = OpConstantComposite %v2float %float_2 %float_n2 + %64 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%float_0_119999997 = OpConstant %float 0.119999997 + %float_n1 = OpConstant %float -1 +%float_n0_0274999999 = OpConstant %float -0.0274999999 + %68 = OpConstantComposite %v2float %float_n1 %float_n0_0274999999 +%float_0_0425000004 = OpConstant %float 0.0425000004 + %70 = OpConstantComposite %v2float %float_1 %float_0_0425000004 +%float_n9_27999973 = OpConstant %float -9.27999973 + %72 = OpConstantComposite %v2float %float_1 %float_1 + %float_0_25 = OpConstant %float 0.25 + %float_16 = OpConstant %float 16 + %int_31 = OpConstant %int 31 + %int_56 = OpConstant %int 56 + %int_57 = OpConstant %int 57 + %int_64 = OpConstant %int 64 + %int_65 = OpConstant %int 65 + %int_66 = OpConstant %int 66 + %int_67 = OpConstant %int 67 + %int_88 = OpConstant %int 88 + %int_135 = OpConstant %int 135 + %int_139 = OpConstant %int 139 +%mat3v3float = OpTypeMatrix %v3float 3 + %86 = OpConstantComposite %v2float %float_2 %float_2 +%float_0_300000012 = OpConstant %float 0.300000012 + %88 = OpConstantComposite %v3float %float_0_300000012 %float_0_300000012 %float_1 + %float_20 = OpConstant %float 20 + %90 = OpConstantComposite %v2float %float_20 %float_20 +%float_0_400000006 = OpConstant %float 0.400000006 + %float_24 = OpConstant %float 24 +%float_0_294999987 = OpConstant %float 0.294999987 +%float_0_660000026 = OpConstant %float 0.660000026 +%float_0_699999988 = OpConstant %float 0.699999988 +%float_65504 = OpConstant %float 65504 +%float_1_20000005 = OpConstant %float 1.20000005 + %98 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%_arr_mat4v4float_uint_4 = OpTypeArray %mat4v4float %uint_4 +%type_MobileDirectionalLight = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %_arr_mat4v4float_uint_4 +%_ptr_Uniform_type_MobileDirectionalLight = OpTypePointer Uniform %type_MobileDirectionalLight +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%type__Globals = OpTypeStruct %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %v4float +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%type_cube_image = OpTypeImage %float Cube 2 0 0 1 Unknown +%_ptr_UniformConstant_type_cube_image = OpTypePointer UniformConstant %type_cube_image +%_ptr_Input_v2float = OpTypePointer Input %v2float +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_bool = OpTypePointer Input %bool +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %110 = OpTypeFunction %void +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_int = OpTypePointer Uniform %int +%type_sampled_image = OpTypeSampledImage %type_cube_image +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float +%type_sampled_image_0 = OpTypeSampledImage %type_2d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform +%MobileDirectionalLight = OpVariable %_ptr_Uniform_type_MobileDirectionalLight Uniform +%MobileDirectionalLight_DirectionalLightShadowTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%MobileDirectionalLight_DirectionalLightShadowSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%Material_Texture2D_0 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_0Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%Material_Texture2D_1 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_1Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%ReflectionCubemap = OpVariable %_ptr_UniformConstant_type_cube_image UniformConstant +%ReflectionCubemapSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input +%in_var_TEXCOORD7 = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD8 = OpVariable %_ptr_Input_v4float Input +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%gl_FrontFacing = OpVariable %_ptr_Input_bool Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %117 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %118 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %119 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %120 = OpConstantComposite %mat3v3float %117 %118 %119 + %float_10 = OpConstant %float 10 + %122 = OpConstantComposite %v2float %float_10 %float_10 + %float_5 = OpConstant %float 5 + %124 = OpConstantComposite %v2float %float_5 %float_5 +%float_0_00066666666 = OpConstant %float 0.00066666666 + %float_n0_5 = OpConstant %float -0.5 + %127 = OpConstantComposite %v2float %float_n0_5 %float_n0_5 + %128 = OpConstantComposite %v2float %float_0_5 %float_n0_5 + %float_1_5 = OpConstant %float 1.5 + %130 = OpConstantComposite %v2float %float_1_5 %float_n0_5 + %131 = OpConstantComposite %v2float %float_n0_5 %float_0_5 + %132 = OpConstantComposite %v2float %float_1_5 %float_0_5 + %133 = OpConstantComposite %v2float %float_n0_5 %float_1_5 + %134 = OpConstantComposite %v2float %float_0_5 %float_1_5 + %135 = OpConstantComposite %v2float %float_1_5 %float_1_5 + %136 = OpUndef %v3float + %137 = OpUndef %v4float + %138 = OpUndef %float + %139 = OpUndef %v3float + %Main = OpFunction %void None %110 + %140 = OpLabel + %141 = OpLoad %v2float %in_var_TEXCOORD0 + %142 = OpLoad %v4float %in_var_TEXCOORD7 + %143 = OpLoad %v4float %in_var_TEXCOORD8 + %144 = OpLoad %v4float %gl_FragCoord + %145 = OpAccessChain %_ptr_Uniform_v3float %View %int_31 + %146 = OpLoad %v3float %145 + %147 = OpAccessChain %_ptr_Uniform_v4float %View %int_56 + %148 = OpLoad %v4float %147 + %149 = OpAccessChain %_ptr_Uniform_v4float %View %int_57 + %150 = OpLoad %v4float %149 + %151 = OpAccessChain %_ptr_Uniform_v4float %View %int_64 + %152 = OpLoad %v4float %151 + %153 = OpAccessChain %_ptr_Uniform_v4float %View %int_65 + %154 = OpLoad %v4float %153 + %155 = OpAccessChain %_ptr_Uniform_v4float %View %int_66 + %156 = OpLoad %v4float %155 + %157 = OpAccessChain %_ptr_Uniform_v2float %View %int_67 + %158 = OpLoad %v2float %157 + %159 = OpAccessChain %_ptr_Uniform_float %View %int_88 + %160 = OpLoad %float %159 + %161 = OpAccessChain %_ptr_Uniform_v4float %View %int_135 + %162 = OpLoad %v4float %161 + %163 = OpAccessChain %_ptr_Uniform_float %View %int_139 + %164 = OpLoad %float %163 + %165 = OpVectorShuffle %v2float %144 %144 0 1 + %166 = OpVectorShuffle %v2float %148 %148 0 1 + %167 = OpFSub %v2float %165 %166 + %168 = OpVectorShuffle %v2float %150 %150 2 3 + %169 = OpFMul %v2float %167 %168 + %170 = OpFSub %v2float %169 %60 + %171 = OpFMul %v2float %170 %63 + %172 = OpCompositeExtract %float %171 0 + %173 = OpCompositeExtract %float %171 1 + %174 = OpCompositeConstruct %v4float %172 %173 %138 %float_1 + %175 = OpCompositeExtract %float %144 3 + %176 = OpCompositeConstruct %v4float %175 %175 %175 %175 + %177 = OpFMul %v4float %174 %176 + %178 = OpVectorShuffle %v3float %143 %143 0 1 2 + %179 = OpFSub %v3float %178 %146 + %180 = OpFNegate %v3float %178 + %181 = OpExtInst %v3float %1 Normalize %180 + %182 = OpFMul %v2float %141 %60 + %183 = OpFMul %v2float %141 %122 + %184 = OpLoad %type_2d_image %Material_Texture2D_0 + %185 = OpLoad %type_sampler %Material_Texture2D_0Sampler + %186 = OpSampledImage %type_sampled_image_0 %184 %185 + %187 = OpImageSampleImplicitLod %v4float %186 %183 None + %188 = OpVectorShuffle %v2float %187 %187 0 1 + %189 = OpFMul %v2float %188 %86 + %190 = OpFSub %v2float %189 %72 + %191 = OpDot %float %190 %190 + %192 = OpFSub %float %float_1 %191 + %193 = OpExtInst %float %1 FClamp %192 %float_0 %float_1 + %194 = OpExtInst %float %1 Sqrt %193 + %195 = OpCompositeExtract %float %190 0 + %196 = OpCompositeExtract %float %190 1 + %197 = OpCompositeConstruct %v4float %195 %196 %194 %float_1 + %198 = OpVectorShuffle %v3float %197 %197 0 1 2 + %199 = OpFMul %v3float %198 %88 + %200 = OpVectorShuffle %v3float %156 %156 0 1 2 + %201 = OpCompositeExtract %float %156 3 + %202 = OpCompositeConstruct %v3float %201 %201 %201 + %203 = OpFMul %v3float %199 %202 + %204 = OpFAdd %v3float %203 %200 + %205 = OpMatrixTimesVector %v3float %120 %204 + %206 = OpExtInst %v3float %1 Normalize %205 + %207 = OpFNegate %v3float %181 + %208 = OpDot %float %206 %181 + %209 = OpCompositeConstruct %v3float %208 %208 %208 + %210 = OpFMul %v3float %206 %209 + %211 = OpFMul %v3float %210 %98 + %212 = OpFAdd %v3float %207 %211 + %213 = OpFMul %v2float %141 %90 + %214 = OpLoad %type_2d_image %Material_Texture2D_1 + %215 = OpLoad %type_sampler %Material_Texture2D_1Sampler + %216 = OpSampledImage %type_sampled_image_0 %214 %215 + %217 = OpImageSampleImplicitLod %v4float %216 %213 None + %218 = OpCompositeExtract %float %217 0 + %219 = OpExtInst %float %1 FMix %float_0_400000006 %float_1 %218 + %220 = OpFSub %float %float_1 %219 + %221 = OpFMul %v2float %141 %124 + %222 = OpSampledImage %type_sampled_image_0 %214 %215 + %223 = OpImageSampleImplicitLod %v4float %222 %221 None + %224 = OpCompositeExtract %float %177 3 + %225 = OpFSub %float %224 %float_24 + %226 = OpFMul %float %225 %float_0_00066666666 + %227 = OpExtInst %float %1 FMax %226 %float_0 + %228 = OpExtInst %float %1 FMin %227 %float_1 + %229 = OpCompositeExtract %float %223 1 + %230 = OpExtInst %float %1 FMix %229 %float_1 %228 + %231 = OpExtInst %float %1 FMix %219 %220 %230 + %232 = OpSampledImage %type_sampled_image_0 %214 %215 + %233 = OpImageSampleImplicitLod %v4float %232 %182 None + %234 = OpExtInst %float %1 FMix %229 %float_0 %228 + %235 = OpCompositeExtract %float %233 1 + %236 = OpFAdd %float %235 %234 + %237 = OpExtInst %float %1 FMix %236 %float_0_5 %float_0_5 + %238 = OpExtInst %float %1 FMix %float_0_294999987 %float_0_660000026 %237 + %239 = OpFMul %float %238 %float_0_5 + %240 = OpFMul %float %231 %239 + %241 = OpExtInst %float %1 FMix %float_0 %float_0_5 %235 + %242 = OpExtInst %float %1 FMix %float_0_699999988 %float_1 %229 + %243 = OpExtInst %float %1 FMix %242 %float_1 %228 + %244 = OpFAdd %float %241 %243 + %245 = OpExtInst %float %1 FMax %244 %float_0 + %246 = OpExtInst %float %1 FMin %245 %float_1 + %247 = OpCompositeConstruct %v3float %240 %240 %240 + %248 = OpExtInst %v3float %1 FClamp %247 %47 %64 + %249 = OpCompositeExtract %float %158 1 + %250 = OpFMul %float %246 %249 + %251 = OpCompositeExtract %float %158 0 + %252 = OpFAdd %float %250 %251 + %253 = OpExtInst %float %1 FClamp %252 %float_0_119999997 %float_1 + %254 = OpExtInst %float %1 FMax %208 %float_0 + %255 = OpCompositeConstruct %v2float %253 %253 + %256 = OpFMul %v2float %255 %68 + %257 = OpFAdd %v2float %256 %70 + %258 = OpCompositeExtract %float %257 0 + %259 = OpFMul %float %258 %258 + %260 = OpFMul %float %float_n9_27999973 %254 + %261 = OpExtInst %float %1 Exp2 %260 + %262 = OpExtInst %float %1 FMin %259 %261 + %263 = OpFMul %float %262 %258 + %264 = OpCompositeExtract %float %257 1 + %265 = OpFAdd %float %263 %264 + %266 = OpCompositeExtract %float %152 3 + %267 = OpCompositeConstruct %v3float %266 %266 %266 + %268 = OpFMul %v3float %248 %267 + %269 = OpVectorShuffle %v3float %152 %152 0 1 2 + %270 = OpFAdd %v3float %268 %269 + %271 = OpCompositeExtract %float %154 3 + %272 = OpFMul %float %265 %271 + %273 = OpCompositeConstruct %v3float %272 %272 %272 + %274 = OpVectorShuffle %v3float %154 %154 0 1 2 + %275 = OpFAdd %v3float %273 %274 + %276 = OpCompositeExtract %float %275 0 + %277 = OpExtInst %float %1 FClamp %float_1 %float_0 %float_1 + %278 = OpLoad %type_2d_image %MobileDirectionalLight_DirectionalLightShadowTexture + %279 = OpLoad %type_sampler %MobileDirectionalLight_DirectionalLightShadowSampler + %280 = OpAccessChain %_ptr_Uniform_v4float %MobileDirectionalLight %int_1 + %281 = OpAccessChain %_ptr_Uniform_float %MobileDirectionalLight %int_1 %int_3 + %282 = OpLoad %float %281 + %283 = OpAccessChain %_ptr_Uniform_v4float %MobileDirectionalLight %int_2 + %284 = OpLoad %v4float %283 + OpBranch %285 + %285 = OpLabel + %286 = OpPhi %int %int_0 %140 %287 %288 + %289 = OpSLessThan %bool %286 %int_2 + OpLoopMerge %290 %288 None + OpBranchConditional %289 %291 %290 + %291 = OpLabel + %292 = OpBitcast %uint %286 + %293 = OpAccessChain %_ptr_Uniform_float %MobileDirectionalLight %int_4 %292 + %294 = OpLoad %float %293 + %295 = OpFOrdLessThan %bool %224 %294 + OpSelectionMerge %288 None + OpBranchConditional %295 %296 %288 + %296 = OpLabel + %297 = OpCompositeExtract %float %177 0 + %298 = OpCompositeExtract %float %177 1 + %299 = OpCompositeConstruct %v4float %297 %298 %224 %float_1 + %300 = OpAccessChain %_ptr_Uniform_mat4v4float %MobileDirectionalLight %int_5 %286 + %301 = OpLoad %mat4v4float %300 + %302 = OpMatrixTimesVector %v4float %301 %299 + OpBranch %290 + %288 = OpLabel + %287 = OpIAdd %int %286 %int_1 + OpBranch %285 + %290 = OpLabel + %303 = OpPhi %v4float %52 %285 %302 %296 + %304 = OpCompositeExtract %float %303 2 + %305 = OpFOrdGreaterThan %bool %304 %float_0 + OpSelectionMerge %306 None + OpBranchConditional %305 %307 %306 + %307 = OpLabel + %308 = OpExtInst %float %1 FMin %304 %float_0_999989986 + %309 = OpVectorShuffle %v2float %303 %303 0 1 + %310 = OpVectorShuffle %v2float %284 %284 0 1 + %311 = OpFMul %v2float %309 %310 + %312 = OpExtInst %v2float %1 Fract %311 + %313 = OpExtInst %v2float %1 Floor %311 + %314 = OpFAdd %v2float %313 %127 + %315 = OpVectorShuffle %v2float %284 %284 2 3 + %316 = OpFMul %v2float %314 %315 + %317 = OpSampledImage %type_sampled_image_0 %278 %279 + %318 = OpImageSampleExplicitLod %v4float %317 %316 Lod %float_0 + %319 = OpCompositeExtract %float %318 0 + %320 = OpCompositeInsert %v3float %319 %139 0 + %321 = OpFAdd %v2float %313 %128 + %322 = OpFMul %v2float %321 %315 + %323 = OpSampledImage %type_sampled_image_0 %278 %279 + %324 = OpImageSampleExplicitLod %v4float %323 %322 Lod %float_0 + %325 = OpCompositeExtract %float %324 0 + %326 = OpCompositeInsert %v3float %325 %320 1 + %327 = OpFAdd %v2float %313 %130 + %328 = OpFMul %v2float %327 %315 + %329 = OpSampledImage %type_sampled_image_0 %278 %279 + %330 = OpImageSampleExplicitLod %v4float %329 %328 Lod %float_0 + %331 = OpCompositeExtract %float %330 0 + %332 = OpCompositeInsert %v3float %331 %326 2 + %333 = OpFMul %float %308 %282 + %334 = OpFSub %float %333 %float_1 + %335 = OpCompositeConstruct %v3float %282 %282 %282 + %336 = OpFMul %v3float %332 %335 + %337 = OpCompositeConstruct %v3float %334 %334 %334 + %338 = OpFSub %v3float %336 %337 + %339 = OpExtInst %v3float %1 FClamp %338 %47 %64 + %340 = OpFAdd %v2float %313 %131 + %341 = OpFMul %v2float %340 %315 + %342 = OpSampledImage %type_sampled_image_0 %278 %279 + %343 = OpImageSampleExplicitLod %v4float %342 %341 Lod %float_0 + %344 = OpCompositeExtract %float %343 0 + %345 = OpCompositeInsert %v3float %344 %139 0 + %346 = OpFAdd %v2float %313 %60 + %347 = OpFMul %v2float %346 %315 + %348 = OpSampledImage %type_sampled_image_0 %278 %279 + %349 = OpImageSampleExplicitLod %v4float %348 %347 Lod %float_0 + %350 = OpCompositeExtract %float %349 0 + %351 = OpCompositeInsert %v3float %350 %345 1 + %352 = OpFAdd %v2float %313 %132 + %353 = OpFMul %v2float %352 %315 + %354 = OpSampledImage %type_sampled_image_0 %278 %279 + %355 = OpImageSampleExplicitLod %v4float %354 %353 Lod %float_0 + %356 = OpCompositeExtract %float %355 0 + %357 = OpCompositeInsert %v3float %356 %351 2 + %358 = OpFMul %v3float %357 %335 + %359 = OpFSub %v3float %358 %337 + %360 = OpExtInst %v3float %1 FClamp %359 %47 %64 + %361 = OpFAdd %v2float %313 %133 + %362 = OpFMul %v2float %361 %315 + %363 = OpSampledImage %type_sampled_image_0 %278 %279 + %364 = OpImageSampleExplicitLod %v4float %363 %362 Lod %float_0 + %365 = OpCompositeExtract %float %364 0 + %366 = OpCompositeInsert %v3float %365 %139 0 + %367 = OpFAdd %v2float %313 %134 + %368 = OpFMul %v2float %367 %315 + %369 = OpSampledImage %type_sampled_image_0 %278 %279 + %370 = OpImageSampleExplicitLod %v4float %369 %368 Lod %float_0 + %371 = OpCompositeExtract %float %370 0 + %372 = OpCompositeInsert %v3float %371 %366 1 + %373 = OpFAdd %v2float %313 %135 + %374 = OpFMul %v2float %373 %315 + %375 = OpSampledImage %type_sampled_image_0 %278 %279 + %376 = OpImageSampleExplicitLod %v4float %375 %374 Lod %float_0 + %377 = OpCompositeExtract %float %376 0 + %378 = OpCompositeInsert %v3float %377 %372 2 + %379 = OpFMul %v3float %378 %335 + %380 = OpFSub %v3float %379 %337 + %381 = OpExtInst %v3float %1 FClamp %380 %47 %64 + %382 = OpCompositeExtract %float %339 0 + %383 = OpCompositeExtract %float %312 0 + %384 = OpFSub %float %float_1 %383 + %385 = OpFMul %float %382 %384 + %386 = OpCompositeExtract %float %360 0 + %387 = OpFMul %float %386 %384 + %388 = OpCompositeExtract %float %381 0 + %389 = OpFMul %float %388 %384 + %390 = OpCompositeExtract %float %339 1 + %391 = OpFAdd %float %385 %390 + %392 = OpCompositeExtract %float %360 1 + %393 = OpFAdd %float %387 %392 + %394 = OpCompositeExtract %float %381 1 + %395 = OpFAdd %float %389 %394 + %396 = OpCompositeExtract %float %339 2 + %397 = OpFMul %float %396 %383 + %398 = OpFAdd %float %391 %397 + %399 = OpCompositeInsert %v3float %398 %136 0 + %400 = OpCompositeExtract %float %360 2 + %401 = OpFMul %float %400 %383 + %402 = OpFAdd %float %393 %401 + %403 = OpCompositeInsert %v3float %402 %399 1 + %404 = OpCompositeExtract %float %381 2 + %405 = OpFMul %float %404 %383 + %406 = OpFAdd %float %395 %405 + %407 = OpCompositeInsert %v3float %406 %403 2 + %408 = OpCompositeExtract %float %312 1 + %409 = OpFSub %float %float_1 %408 + %410 = OpCompositeConstruct %v3float %409 %float_1 %408 + %411 = OpDot %float %407 %410 + %412 = OpFMul %float %float_0_25 %411 + %413 = OpExtInst %float %1 FClamp %412 %float_0 %float_1 + %414 = OpAccessChain %_ptr_Uniform_float %MobileDirectionalLight %int_3 %int_0 + %415 = OpLoad %float %414 + %416 = OpFMul %float %224 %415 + %417 = OpAccessChain %_ptr_Uniform_float %MobileDirectionalLight %int_3 %int_1 + %418 = OpLoad %float %417 + %419 = OpFAdd %float %416 %418 + %420 = OpExtInst %float %1 FClamp %419 %float_0 %float_1 + %421 = OpFMul %float %420 %420 + %422 = OpExtInst %float %1 FMix %413 %float_1 %421 + OpBranch %306 + %306 = OpLabel + %423 = OpPhi %float %float_1 %290 %422 %307 + %424 = OpLoad %v4float %280 + %425 = OpVectorShuffle %v3float %424 %424 0 1 2 + %426 = OpDot %float %206 %425 + %427 = OpExtInst %float %1 FMax %float_0 %426 + %428 = OpFAdd %v3float %181 %425 + %429 = OpExtInst %v3float %1 Normalize %428 + %430 = OpDot %float %206 %429 + %431 = OpExtInst %float %1 FMax %float_0 %430 + %432 = OpFMul %float %423 %427 + %433 = OpCompositeConstruct %v3float %432 %432 %432 + %434 = OpAccessChain %_ptr_Uniform_v4float %MobileDirectionalLight %int_0 + %435 = OpLoad %v4float %434 + %436 = OpVectorShuffle %v3float %435 %435 0 1 2 + %437 = OpFMul %v3float %433 %436 + %438 = OpFMul %float %253 %float_0_25 + %439 = OpFAdd %float %438 %float_0_25 + %440 = OpExtInst %v3float %1 Cross %206 %429 + %441 = OpDot %float %440 %440 + %442 = OpFMul %float %253 %253 + %443 = OpFMul %float %431 %442 + %444 = OpFMul %float %443 %443 + %445 = OpFAdd %float %441 %444 + %446 = OpFDiv %float %442 %445 + %447 = OpFMul %float %446 %446 + %448 = OpExtInst %float %1 FMin %447 %float_65504 + %449 = OpFMul %float %439 %448 + %450 = OpFMul %float %276 %449 + %451 = OpCompositeConstruct %v3float %450 %450 %450 + %452 = OpFAdd %v3float %270 %451 + %453 = OpFMul %v3float %437 %452 + %454 = OpAccessChain %_ptr_Uniform_float %_Globals %int_3 %int_3 + %455 = OpLoad %float %454 + %456 = OpFOrdGreaterThan %bool %455 %float_0 + %457 = OpSelect %float %456 %float_1 %float_0 + %458 = OpFOrdNotEqual %bool %457 %float_0 + %459 = OpSelect %float %458 %455 %164 + %460 = OpExtInst %float %1 Log2 %253 + %461 = OpFMul %float %float_1_20000005 %460 + %462 = OpFSub %float %float_1 %461 + %463 = OpFSub %float %459 %float_1 + %464 = OpFSub %float %463 %462 + %465 = OpLoad %type_cube_image %ReflectionCubemap + %466 = OpLoad %type_sampler %ReflectionCubemapSampler + %467 = OpSampledImage %type_sampled_image %465 %466 + %468 = OpImageSampleExplicitLod %v4float %467 %212 Lod %464 + OpSelectionMerge %469 None + OpBranchConditional %458 %470 %471 + %471 = OpLabel + %472 = OpVectorShuffle %v3float %468 %468 0 1 2 + %473 = OpCompositeExtract %float %468 3 + %474 = OpFMul %float %473 %float_16 + %475 = OpCompositeConstruct %v3float %474 %474 %474 + %476 = OpFMul %v3float %472 %475 + %477 = OpFMul %v3float %476 %476 + OpBranch %469 + %470 = OpLabel + %478 = OpVectorShuffle %v3float %468 %468 0 1 2 + %479 = OpVectorShuffle %v3float %162 %162 0 1 2 + %480 = OpFMul %v3float %478 %479 + OpBranch %469 + %469 = OpLabel + %481 = OpPhi %v3float %477 %471 %480 %470 + %482 = OpCompositeConstruct %v3float %277 %277 %277 + %483 = OpFMul %v3float %481 %482 + %484 = OpCompositeConstruct %v3float %276 %276 %276 + %485 = OpFMul %v3float %483 %484 + %486 = OpFAdd %v3float %453 %485 + OpBranch %487 + %487 = OpLabel + %488 = OpPhi %v3float %486 %469 %489 %490 + %491 = OpPhi %int %int_0 %469 %492 %490 + %493 = OpAccessChain %_ptr_Uniform_int %_Globals %int_0 + %494 = OpLoad %int %493 + %495 = OpSLessThan %bool %491 %494 + OpLoopMerge %496 %490 None + OpBranchConditional %495 %497 %496 + %497 = OpLabel + %498 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_1 %491 + %499 = OpLoad %v4float %498 + %500 = OpVectorShuffle %v3float %499 %499 0 1 2 + %501 = OpFSub %v3float %500 %179 + %502 = OpDot %float %501 %501 + %503 = OpExtInst %float %1 InverseSqrt %502 + %504 = OpCompositeConstruct %v3float %503 %503 %503 + %505 = OpFMul %v3float %501 %504 + %506 = OpFAdd %v3float %181 %505 + %507 = OpExtInst %v3float %1 Normalize %506 + %508 = OpDot %float %206 %505 + %509 = OpExtInst %float %1 FMax %float_0 %508 + %510 = OpDot %float %206 %507 + %511 = OpExtInst %float %1 FMax %float_0 %510 + %512 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_2 %491 + %513 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 %491 %int_3 + %514 = OpLoad %float %513 + %515 = OpFOrdEqual %bool %514 %float_0 + OpSelectionMerge %490 None + OpBranchConditional %515 %516 %517 + %517 = OpLabel + %518 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %491 %int_3 + %519 = OpLoad %float %518 + %520 = OpCompositeConstruct %v3float %519 %519 %519 + %521 = OpFMul %v3float %501 %520 + %522 = OpDot %float %521 %521 + %523 = OpExtInst %float %1 FClamp %522 %float_0 %float_1 + %524 = OpFSub %float %float_1 %523 + %525 = OpExtInst %float %1 Pow %524 %514 + OpBranch %490 + %516 = OpLabel + %526 = OpFAdd %float %502 %float_1 + %527 = OpFDiv %float %float_1 %526 + %528 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %491 %int_3 + %529 = OpLoad %float %528 + %530 = OpFMul %float %529 %529 + %531 = OpFMul %float %502 %530 + %532 = OpFMul %float %531 %531 + %533 = OpFSub %float %float_1 %532 + %534 = OpExtInst %float %1 FClamp %533 %float_0 %float_1 + %535 = OpFMul %float %534 %534 + %536 = OpFMul %float %527 %535 + OpBranch %490 + %490 = OpLabel + %537 = OpPhi %float %525 %517 %536 %516 + %538 = OpFMul %float %537 %509 + %539 = OpCompositeConstruct %v3float %538 %538 %538 + %540 = OpLoad %v4float %512 + %541 = OpVectorShuffle %v3float %540 %540 0 1 2 + %542 = OpFMul %v3float %539 %541 + %543 = OpFMul %v3float %542 %57 + %544 = OpExtInst %v3float %1 Cross %206 %507 + %545 = OpDot %float %544 %544 + %546 = OpFMul %float %511 %442 + %547 = OpFMul %float %546 %546 + %548 = OpFAdd %float %545 %547 + %549 = OpFDiv %float %442 %548 + %550 = OpFMul %float %549 %549 + %551 = OpExtInst %float %1 FMin %550 %float_65504 + %552 = OpFMul %float %439 %551 + %553 = OpFMul %float %276 %552 + %554 = OpCompositeConstruct %v3float %553 %553 %553 + %555 = OpFAdd %v3float %270 %554 + %556 = OpFMul %v3float %543 %555 + %557 = OpExtInst %v3float %1 FMin %55 %556 + %489 = OpFAdd %v3float %488 %557 + %492 = OpIAdd %int %491 %int_1 + OpBranch %487 + %496 = OpLabel + %558 = OpExtInst %v3float %1 FMax %47 %47 + %559 = OpFAdd %v3float %488 %558 + %560 = OpFAdd %v3float %270 %484 + %561 = OpCompositeConstruct %v3float %160 %160 %160 + %562 = OpExtInst %v3float %1 FMix %559 %560 %561 + %563 = OpCompositeExtract %float %142 3 + %564 = OpCompositeConstruct %v3float %563 %563 %563 + %565 = OpFMul %v3float %562 %564 + %566 = OpVectorShuffle %v3float %142 %142 0 1 2 + %567 = OpFAdd %v3float %565 %566 + %568 = OpVectorShuffle %v4float %137 %567 4 5 6 3 + %569 = OpCompositeExtract %float %143 3 + %570 = OpExtInst %float %1 FMin %569 %float_65500 + %571 = OpCompositeInsert %v4float %570 %568 3 + OpStore %out_var_SV_Target0 %571 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/array-copy-error.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/array-copy-error.asm.frag new file mode 100644 index 000000000..eba220ba4 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/array-copy-error.asm.frag @@ -0,0 +1,878 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 353 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %MainPixelShader "main" %gl_FragCoord %in_var_TEXCOORD6 %in_var_TEXCOORD7 %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_TEXCOORD0 %in_var_PRIMITIVE_ID %gl_FrontFacing %gl_FragDepth %out_var_SV_Target0 + OpExecutionMode %MainPixelShader OriginUpperLeft + OpExecutionMode %MainPixelShader DepthReplacing + OpExecutionMode %MainPixelShader DepthLess + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_PrimitiveDither "type.PrimitiveDither" + OpMemberName %type_PrimitiveDither 0 "PrimitiveDither_LODFactor" + OpName %PrimitiveDither "PrimitiveDither" + OpName %type_PrimitiveFade "type.PrimitiveFade" + OpMemberName %type_PrimitiveFade 0 "PrimitiveFade_FadeTimeScaleBias" + OpName %PrimitiveFade "PrimitiveFade" + OpName %type_Material "type.Material" + OpMemberName %type_Material 0 "Material_VectorExpressions" + OpMemberName %type_Material 1 "Material_ScalarExpressions" + OpName %Material "Material" + OpName %type_2d_image "type.2d.image" + OpName %Material_Texture2D_0 "Material_Texture2D_0" + OpName %type_sampler "type.sampler" + OpName %Material_Texture2D_0Sampler "Material_Texture2D_0Sampler" + OpName %Material_Texture2D_3 "Material_Texture2D_3" + OpName %Material_Texture2D_3Sampler "Material_Texture2D_3Sampler" + OpName %in_var_TEXCOORD6 "in.var.TEXCOORD6" + OpName %in_var_TEXCOORD7 "in.var.TEXCOORD7" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_PRIMITIVE_ID "in.var.PRIMITIVE_ID" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %MainPixelShader "MainPixelShader" + OpName %type_sampled_image "type.sampled.image" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_Position" + OpDecorateString %in_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %in_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorate %in_var_PRIMITIVE_ID Flat + OpDecorate %gl_FrontFacing BuiltIn FrontFacing + OpDecorateString %gl_FrontFacing UserSemantic "SV_IsFrontFace" + OpDecorate %gl_FrontFacing Flat + OpDecorate %gl_FragDepth BuiltIn FragDepth + OpDecorateString %gl_FragDepth UserSemantic "SV_DepthLessEqual" + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD6 Location 0 + OpDecorate %in_var_TEXCOORD7 Location 1 + OpDecorate %in_var_TEXCOORD10_centroid Location 2 + OpDecorate %in_var_TEXCOORD11_centroid Location 3 + OpDecorate %in_var_TEXCOORD0 Location 4 + OpDecorate %in_var_PRIMITIVE_ID Location 5 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %PrimitiveDither DescriptorSet 0 + OpDecorate %PrimitiveDither Binding 1 + OpDecorate %PrimitiveFade DescriptorSet 0 + OpDecorate %PrimitiveFade Binding 2 + OpDecorate %Material DescriptorSet 0 + OpDecorate %Material Binding 3 + OpDecorate %Material_Texture2D_0 DescriptorSet 0 + OpDecorate %Material_Texture2D_0 Binding 0 + OpDecorate %Material_Texture2D_0Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_0Sampler Binding 0 + OpDecorate %Material_Texture2D_3 DescriptorSet 0 + OpDecorate %Material_Texture2D_3 Binding 1 + OpDecorate %Material_Texture2D_3Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_3Sampler Binding 1 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpDecorate %type_View Block + OpMemberDecorate %type_PrimitiveDither 0 Offset 0 + OpDecorate %type_PrimitiveDither Block + OpMemberDecorate %type_PrimitiveFade 0 Offset 0 + OpDecorate %type_PrimitiveFade Block + OpDecorate %_arr_v4float_uint_9 ArrayStride 16 + OpDecorate %_arr_v4float_uint_3 ArrayStride 16 + OpMemberDecorate %type_Material 0 Offset 0 + OpMemberDecorate %type_Material 1 Offset 144 + OpDecorate %type_Material Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 +%float_0_00100000005 = OpConstant %float 0.00100000005 + %int_2 = OpConstant %int 2 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_0 = OpConstant %float 0 + %49 = OpConstantComposite %v2float %float_0 %float_0 + %float_1 = OpConstant %float 1 + %int_4 = OpConstant %int 4 + %int_11 = OpConstant %int 11 +%float_0_249500006 = OpConstant %float 0.249500006 + %54 = OpConstantComposite %v2float %float_0_249500006 %float_0_249500006 +%float_0_499992371 = OpConstant %float 0.499992371 + %56 = OpConstantComposite %v2float %float_0_499992371 %float_0_499992371 + %int_32 = OpConstant %int 32 + %int_53 = OpConstant %int 53 + %int_57 = OpConstant %int 57 + %int_80 = OpConstant %int 80 + %int_82 = OpConstant %int 82 + %int_98 = OpConstant %int 98 + %uint_1 = OpConstant %uint 1 +%mat3v3float = OpTypeMatrix %v3float 3 + %float_2 = OpConstant %float 2 + %float_n1 = OpConstant %float -1 + %67 = OpConstantComposite %v2float %float_n1 %float_n1 + %bool = OpTypeBool + %float_n0_5 = OpConstant %float -0.5 + %70 = OpConstantComposite %v3float %float_0 %float_0 %float_1 +%float_0_333299994 = OpConstant %float 0.333299994 + %uint_5 = OpConstant %uint 5 +%float_347_834503 = OpConstant %float 347.834503 +%float_3343_28369 = OpConstant %float 3343.28369 + %75 = OpConstantComposite %v2float %float_347_834503 %float_3343_28369 + %float_1000 = OpConstant %float 1000 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_PrimitiveDither = OpTypeStruct %float +%_ptr_Uniform_type_PrimitiveDither = OpTypePointer Uniform %type_PrimitiveDither +%type_PrimitiveFade = OpTypeStruct %v2float +%_ptr_Uniform_type_PrimitiveFade = OpTypePointer Uniform %type_PrimitiveFade + %uint_9 = OpConstant %uint 9 +%_arr_v4float_uint_9 = OpTypeArray %v4float %uint_9 + %uint_3 = OpConstant %uint 3 +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%type_Material = OpTypeStruct %_arr_v4float_uint_9 %_arr_v4float_uint_3 +%_ptr_Uniform_type_Material = OpTypePointer Uniform %type_Material +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%_ptr_Input__arr_v4float_uint_1 = OpTypePointer Input %_arr_v4float_uint_1 +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Input_bool = OpTypePointer Input %bool +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %93 = OpTypeFunction %void +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%type_sampled_image = OpTypeSampledImage %type_2d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform +%PrimitiveDither = OpVariable %_ptr_Uniform_type_PrimitiveDither Uniform +%PrimitiveFade = OpVariable %_ptr_Uniform_type_PrimitiveFade Uniform + %Material = OpVariable %_ptr_Uniform_type_Material Uniform +%Material_Texture2D_0 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_0Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%Material_Texture2D_3 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_3Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD6 = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD7 = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input__arr_v4float_uint_1 Input +%in_var_PRIMITIVE_ID = OpVariable %_ptr_Input_uint Input +%gl_FrontFacing = OpVariable %_ptr_Input_bool Input +%gl_FragDepth = OpVariable %_ptr_Output_float Output +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %98 = OpUndef %float + %99 = OpConstantNull %v2float +%float_0_015625 = OpConstant %float 0.015625 + %101 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 +%float_0_166666672 = OpConstant %float 0.166666672 + %103 = OpUndef %float + %104 = OpConstantNull %v3float +%MainPixelShader = OpFunction %void None %93 + %105 = OpLabel + %106 = OpLoad %v4float %gl_FragCoord + %107 = OpLoad %v4float %in_var_TEXCOORD6 + %108 = OpLoad %v4float %in_var_TEXCOORD7 + %109 = OpLoad %v4float %in_var_TEXCOORD10_centroid + %110 = OpLoad %v4float %in_var_TEXCOORD11_centroid + %111 = OpLoad %_arr_v4float_uint_1 %in_var_TEXCOORD0 + %112 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_4 + %113 = OpLoad %mat4v4float %112 + %114 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_11 + %115 = OpLoad %mat4v4float %114 + %116 = OpAccessChain %_ptr_Uniform_v3float %View %int_32 + %117 = OpLoad %v3float %116 + %118 = OpAccessChain %_ptr_Uniform_v4float %View %int_53 + %119 = OpLoad %v4float %118 + %120 = OpAccessChain %_ptr_Uniform_v4float %View %int_57 + %121 = OpLoad %v4float %120 + %122 = OpAccessChain %_ptr_Uniform_float %View %int_80 + %123 = OpLoad %float %122 + %124 = OpCompositeExtract %v4float %111 0 + %125 = OpVectorShuffle %v2float %99 %124 2 3 + %126 = OpVectorShuffle %v3float %109 %109 0 1 2 + %127 = OpVectorShuffle %v3float %110 %110 0 1 2 + %128 = OpExtInst %v3float %1 Cross %127 %126 + %129 = OpCompositeExtract %float %110 3 + %130 = OpCompositeConstruct %v3float %129 %129 %129 + %131 = OpFMul %v3float %128 %130 + %132 = OpCompositeConstruct %mat3v3float %126 %131 %127 + %133 = OpVectorShuffle %v2float %106 %106 0 1 + %134 = OpVectorShuffle %v2float %121 %121 0 1 + %135 = OpFSub %v2float %133 %134 + %136 = OpCompositeExtract %float %106 2 + %137 = OpCompositeConstruct %v4float %103 %103 %136 %float_1 + %138 = OpCompositeExtract %float %106 3 + %139 = OpCompositeConstruct %v4float %138 %138 %138 %138 + %140 = OpFMul %v4float %137 %139 + %141 = OpCompositeExtract %float %106 0 + %142 = OpCompositeExtract %float %106 1 + %143 = OpCompositeConstruct %v4float %141 %142 %136 %float_1 + %144 = OpMatrixTimesVector %v4float %115 %143 + %145 = OpVectorShuffle %v3float %144 %144 0 1 2 + %146 = OpCompositeExtract %float %144 3 + %147 = OpCompositeConstruct %v3float %146 %146 %146 + %148 = OpFDiv %v3float %145 %147 + %149 = OpFSub %v3float %148 %117 + %150 = OpFNegate %v3float %148 + %151 = OpExtInst %v3float %1 Normalize %150 + %152 = OpVectorTimesMatrix %v3float %151 %132 + %153 = OpVectorShuffle %v2float %152 %152 0 1 + %154 = OpFMul %v2float %153 %67 + %155 = OpCompositeExtract %float %152 2 + %156 = OpCompositeConstruct %v2float %155 %155 + %157 = OpFDiv %v2float %154 %156 + %158 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_0 + %159 = OpLoad %float %158 + %160 = OpCompositeConstruct %v2float %159 %159 + %161 = OpFMul %v2float %160 %157 + %162 = OpDot %float %151 %127 + %163 = OpExtInst %float %1 FAbs %162 + %164 = OpExtInst %float %1 FMax %163 %float_0 + %165 = OpExtInst %float %1 FMin %164 %float_1 + %166 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_1 + %167 = OpLoad %float %166 + %168 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_2 + %169 = OpLoad %float %168 + %170 = OpExtInst %float %1 FMix %167 %169 %165 + %171 = OpExtInst %float %1 Floor %170 + %172 = OpFDiv %float %float_1 %170 + %173 = OpCompositeConstruct %v2float %172 %172 + %174 = OpFMul %v2float %161 %173 + %175 = OpDPdx %v2float %125 + %176 = OpDPdy %v2float %125 + %177 = OpLoad %type_2d_image %Material_Texture2D_0 + %178 = OpLoad %type_sampler %Material_Texture2D_0Sampler + OpBranch %179 + %179 = OpLabel + %180 = OpPhi %float %float_1 %105 %181 %182 + %183 = OpPhi %v2float %49 %105 %184 %182 + %185 = OpPhi %int %int_0 %105 %186 %182 + %187 = OpPhi %float %float_1 %105 %188 %182 + %189 = OpPhi %float %float_1 %105 %180 %182 + %190 = OpConvertSToF %float %185 + %191 = OpFAdd %float %171 %float_2 + %192 = OpFOrdLessThan %bool %190 %191 + OpLoopMerge %193 %182 None + OpBranchConditional %192 %194 %193 + %194 = OpLabel + %195 = OpFAdd %v2float %125 %183 + %196 = OpSampledImage %type_sampled_image %177 %178 + %197 = OpImageSampleExplicitLod %v4float %196 %195 Grad %175 %176 + %188 = OpCompositeExtract %float %197 1 + %198 = OpFOrdLessThan %bool %180 %188 + OpSelectionMerge %182 None + OpBranchConditional %198 %199 %182 + %199 = OpLabel + %200 = OpFSub %float %189 %187 + %201 = OpFSub %float %188 %180 + %202 = OpFAdd %float %200 %201 + %203 = OpFDiv %float %201 %202 + %204 = OpFMul %float %189 %203 + %205 = OpFSub %float %float_1 %203 + %206 = OpFMul %float %180 %205 + %207 = OpFAdd %float %204 %206 + %208 = OpCompositeConstruct %v2float %203 %203 + %209 = OpFMul %v2float %208 %174 + %210 = OpFSub %v2float %183 %209 + OpBranch %193 + %182 = OpLabel + %181 = OpFSub %float %180 %172 + %184 = OpFAdd %v2float %183 %174 + %186 = OpIAdd %int %185 %int_1 + OpBranch %179 + %193 = OpLabel + %211 = OpPhi %float %98 %179 %207 %199 + %212 = OpPhi %v2float %183 %179 %210 %199 + %213 = OpVectorShuffle %v2float %212 %104 0 1 + %214 = OpFAdd %v2float %125 %213 + %215 = OpAccessChain %_ptr_Uniform_float %View %int_82 + %216 = OpLoad %float %215 + %217 = OpSampledImage %type_sampled_image %177 %178 + %218 = OpImageSampleImplicitLod %v4float %217 %214 Bias %216 + %219 = OpCompositeExtract %float %218 0 + %220 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_2 %int_1 + %221 = OpLoad %float %220 + %222 = OpFMul %float %219 %221 + %223 = OpFSub %float %float_1 %222 + %224 = OpExtInst %float %1 FMax %223 %float_0 + %225 = OpExtInst %float %1 FMin %224 %float_1 + %226 = OpAccessChain %_ptr_Uniform_float %View %int_98 %int_0 + %227 = OpLoad %float %226 + %228 = OpCompositeConstruct %v2float %227 %227 + %229 = OpFAdd %v2float %135 %228 + %230 = OpCompositeExtract %float %229 0 + %231 = OpConvertFToU %uint %230 + %232 = OpCompositeExtract %float %229 1 + %233 = OpConvertFToU %uint %232 + %234 = OpIMul %uint %uint_2 %233 + %235 = OpIAdd %uint %231 %234 + %236 = OpUMod %uint %235 %uint_5 + %237 = OpConvertUToF %float %236 + %238 = OpFMul %v2float %135 %101 + %239 = OpLoad %type_2d_image %Material_Texture2D_3 + %240 = OpLoad %type_sampler %Material_Texture2D_3Sampler + %241 = OpSampledImage %type_sampled_image %239 %240 + %242 = OpImageSampleImplicitLod %v4float %241 %238 Bias %216 + %243 = OpCompositeExtract %float %242 0 + %244 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_2 %int_2 + %245 = OpLoad %float %244 + %246 = OpFMul %float %243 %245 + %247 = OpFAdd %float %237 %246 + %248 = OpFMul %float %247 %float_0_166666672 + %249 = OpFAdd %float %225 %248 + %250 = OpFAdd %float %249 %float_n0_5 + %251 = OpCompositeExtract %float %218 2 + %252 = OpFAdd %float %251 %250 + %253 = OpSampledImage %type_sampled_image %239 %240 + %254 = OpImageSampleImplicitLod %v4float %253 %238 Bias %216 + %255 = OpCompositeExtract %float %254 0 + %256 = OpFAdd %float %237 %255 + %257 = OpFMul %float %256 %float_0_166666672 + %258 = OpAccessChain %_ptr_Uniform_float %PrimitiveFade %int_0 %int_0 + %259 = OpLoad %float %258 + %260 = OpFMul %float %123 %259 + %261 = OpAccessChain %_ptr_Uniform_float %PrimitiveFade %int_0 %int_1 + %262 = OpLoad %float %261 + %263 = OpFAdd %float %260 %262 + %264 = OpExtInst %float %1 FClamp %263 %float_0 %float_1 + %265 = OpFAdd %float %264 %257 + %266 = OpFAdd %float %265 %float_n0_5 + %267 = OpFMul %float %252 %266 + %268 = OpFSub %float %float_1 %211 + %269 = OpFMul %float %268 %159 + %270 = OpCompositeExtract %float %212 0 + %271 = OpCompositeExtract %float %212 1 + %272 = OpCompositeConstruct %v3float %270 %271 %269 + %273 = OpDot %float %272 %272 + %274 = OpExtInst %float %1 Sqrt %273 + %275 = OpDPdx %v2float %125 + %276 = OpExtInst %v2float %1 FAbs %275 + %277 = OpDot %float %276 %276 + %278 = OpExtInst %float %1 Sqrt %277 + %279 = OpDPdx %v3float %149 + %280 = OpDot %float %279 %279 + %281 = OpExtInst %float %1 Sqrt %280 + %282 = OpFDiv %float %278 %281 + %283 = OpDPdy %v2float %125 + %284 = OpExtInst %v2float %1 FAbs %283 + %285 = OpDot %float %284 %284 + %286 = OpExtInst %float %1 Sqrt %285 + %287 = OpDPdy %v3float %149 + %288 = OpDot %float %287 %287 + %289 = OpExtInst %float %1 Sqrt %288 + %290 = OpFDiv %float %286 %289 + %291 = OpExtInst %float %1 FMax %282 %290 + %292 = OpCompositeExtract %v4float %113 0 + %293 = OpVectorShuffle %v3float %292 %292 0 1 2 + %294 = OpCompositeExtract %v4float %113 1 + %295 = OpVectorShuffle %v3float %294 %294 0 1 2 + %296 = OpCompositeExtract %v4float %113 2 + %297 = OpVectorShuffle %v3float %296 %296 0 1 2 + %298 = OpCompositeConstruct %mat3v3float %293 %295 %297 + %299 = OpMatrixTimesVector %v3float %298 %70 + %300 = OpDot %float %299 %151 + %301 = OpExtInst %float %1 FAbs %300 + %302 = OpFDiv %float %291 %301 + %303 = OpFDiv %float %274 %302 + %304 = OpAccessChain %_ptr_Uniform_float %PrimitiveDither %int_0 + %305 = OpLoad %float %304 + %306 = OpFOrdNotEqual %bool %305 %float_0 + OpSelectionMerge %307 None + OpBranchConditional %306 %308 %307 + %308 = OpLabel + %309 = OpExtInst %float %1 FAbs %305 + %310 = OpFOrdGreaterThan %bool %309 %float_0_00100000005 + OpSelectionMerge %311 None + OpBranchConditional %310 %312 %311 + %312 = OpLabel + %313 = OpExtInst %v2float %1 Floor %133 + %314 = OpDot %float %313 %75 + %315 = OpExtInst %float %1 Cos %314 + %316 = OpFMul %float %315 %float_1000 + %317 = OpExtInst %float %1 Fract %316 + %318 = OpFOrdLessThan %bool %305 %float_0 + %319 = OpFAdd %float %305 %float_1 + %320 = OpFOrdGreaterThan %bool %319 %317 + %321 = OpFOrdLessThan %bool %305 %317 + %322 = OpSelect %bool %318 %320 %321 + %323 = OpSelect %float %322 %float_1 %float_0 + %324 = OpFSub %float %323 %float_0_00100000005 + %325 = OpFOrdLessThan %bool %324 %float_0 + OpSelectionMerge %326 None + OpBranchConditional %325 %327 %326 + %327 = OpLabel + OpKill + %326 = OpLabel + OpBranch %311 + %311 = OpLabel + OpBranch %307 + %307 = OpLabel + %328 = OpFSub %float %267 %float_0_333299994 + %329 = OpFOrdLessThan %bool %328 %float_0 + OpSelectionMerge %330 None + OpBranchConditional %329 %331 %330 + %331 = OpLabel + OpKill + %330 = OpLabel + %332 = OpCompositeExtract %float %140 2 + %333 = OpCompositeExtract %float %140 3 + %334 = OpFAdd %float %333 %303 + %335 = OpFDiv %float %332 %334 + %336 = OpExtInst %float %1 FMin %335 %136 + %337 = OpVectorShuffle %v2float %107 %107 0 1 + %338 = OpCompositeExtract %float %107 3 + %339 = OpCompositeConstruct %v2float %338 %338 + %340 = OpFDiv %v2float %337 %339 + %341 = OpVectorShuffle %v2float %119 %119 0 1 + %342 = OpFSub %v2float %340 %341 + %343 = OpVectorShuffle %v2float %108 %108 0 1 + %344 = OpCompositeExtract %float %108 3 + %345 = OpCompositeConstruct %v2float %344 %344 + %346 = OpFDiv %v2float %343 %345 + %347 = OpVectorShuffle %v2float %119 %119 2 3 + %348 = OpFSub %v2float %346 %347 + %349 = OpFSub %v2float %342 %348 + %350 = OpFMul %v2float %349 %54 + %351 = OpFAdd %v2float %350 %56 + %352 = OpVectorShuffle %v4float %351 %49 0 1 2 3 + OpStore %gl_FragDepth %336 + OpStore %out_var_SV_Target0 %352 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/depth-compare.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/depth-compare.asm.frag new file mode 100644 index 000000000..603d4f28c --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/depth-compare.asm.frag @@ -0,0 +1,961 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 452 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %MainOnePassPointLightPS "main" %gl_FragCoord %out_var_SV_Target0 + OpExecutionMode %MainOnePassPointLightPS OriginUpperLeft + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_2d_image "type.2d.image" + OpName %SceneTexturesStruct_SceneDepthTexture "SceneTexturesStruct_SceneDepthTexture" + OpName %type_sampler "type.sampler" + OpName %SceneTexturesStruct_SceneDepthTextureSampler "SceneTexturesStruct_SceneDepthTextureSampler" + OpName %SceneTexturesStruct_GBufferATexture "SceneTexturesStruct_GBufferATexture" + OpName %SceneTexturesStruct_GBufferBTexture "SceneTexturesStruct_GBufferBTexture" + OpName %SceneTexturesStruct_GBufferDTexture "SceneTexturesStruct_GBufferDTexture" + OpName %SceneTexturesStruct_GBufferATextureSampler "SceneTexturesStruct_GBufferATextureSampler" + OpName %SceneTexturesStruct_GBufferBTextureSampler "SceneTexturesStruct_GBufferBTextureSampler" + OpName %SceneTexturesStruct_GBufferDTextureSampler "SceneTexturesStruct_GBufferDTextureSampler" + OpName %ShadowDepthTextureSampler "ShadowDepthTextureSampler" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "SoftTransitionScale" + OpMemberName %type__Globals 1 "ShadowViewProjectionMatrices" + OpMemberName %type__Globals 2 "InvShadowmapResolution" + OpMemberName %type__Globals 3 "ShadowFadeFraction" + OpMemberName %type__Globals 4 "ShadowSharpen" + OpMemberName %type__Globals 5 "LightPositionAndInvRadius" + OpMemberName %type__Globals 6 "ProjectionDepthBiasParameters" + OpMemberName %type__Globals 7 "PointLightDepthBiasAndProjParameters" + OpName %_Globals "$Globals" + OpName %type_cube_image "type.cube.image" + OpName %ShadowDepthCubeTexture "ShadowDepthCubeTexture" + OpName %ShadowDepthCubeTextureSampler "ShadowDepthCubeTextureSampler" + OpName %SSProfilesTexture "SSProfilesTexture" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %MainOnePassPointLightPS "MainOnePassPointLightPS" + OpName %type_sampled_image "type.sampled.image" + OpName %type_sampled_image_0 "type.sampled.image" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_POSITION" + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %SceneTexturesStruct_SceneDepthTexture DescriptorSet 0 + OpDecorate %SceneTexturesStruct_SceneDepthTexture Binding 0 + OpDecorate %SceneTexturesStruct_SceneDepthTextureSampler DescriptorSet 0 + OpDecorate %SceneTexturesStruct_SceneDepthTextureSampler Binding 0 + OpDecorate %SceneTexturesStruct_GBufferATexture DescriptorSet 0 + OpDecorate %SceneTexturesStruct_GBufferATexture Binding 1 + OpDecorate %SceneTexturesStruct_GBufferBTexture DescriptorSet 0 + OpDecorate %SceneTexturesStruct_GBufferBTexture Binding 2 + OpDecorate %SceneTexturesStruct_GBufferDTexture DescriptorSet 0 + OpDecorate %SceneTexturesStruct_GBufferDTexture Binding 3 + OpDecorate %SceneTexturesStruct_GBufferATextureSampler DescriptorSet 0 + OpDecorate %SceneTexturesStruct_GBufferATextureSampler Binding 1 + OpDecorate %SceneTexturesStruct_GBufferBTextureSampler DescriptorSet 0 + OpDecorate %SceneTexturesStruct_GBufferBTextureSampler Binding 2 + OpDecorate %SceneTexturesStruct_GBufferDTextureSampler DescriptorSet 0 + OpDecorate %SceneTexturesStruct_GBufferDTextureSampler Binding 3 + OpDecorate %ShadowDepthTextureSampler DescriptorSet 0 + OpDecorate %ShadowDepthTextureSampler Binding 4 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 1 + OpDecorate %ShadowDepthCubeTexture DescriptorSet 0 + OpDecorate %ShadowDepthCubeTexture Binding 4 + OpDecorate %ShadowDepthCubeTextureSampler DescriptorSet 0 + OpDecorate %ShadowDepthCubeTextureSampler Binding 5 + OpDecorate %SSProfilesTexture DescriptorSet 0 + OpDecorate %SSProfilesTexture Binding 5 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpDecorate %_arr_mat4v4float_uint_6 ArrayStride 64 + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 1 MatrixStride 16 + OpMemberDecorate %type__Globals 1 ColMajor + OpMemberDecorate %type__Globals 2 Offset 400 + OpMemberDecorate %type__Globals 3 Offset 404 + OpMemberDecorate %type__Globals 4 Offset 408 + OpMemberDecorate %type__Globals 5 Offset 416 + OpMemberDecorate %type__Globals 6 Offset 432 + OpMemberDecorate %type__Globals 7 Offset 448 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %float_0 = OpConstant %float 0 + %float_2_5 = OpConstant %float 2.5 +%float_2_37764096 = OpConstant %float 2.37764096 +%float_0_772542 = OpConstant %float 0.772542 +%float_1_46946299 = OpConstant %float 1.46946299 +%float_n2_02254295 = OpConstant %float -2.02254295 +%float_n1_46946299 = OpConstant %float -1.46946299 +%float_n2_022542 = OpConstant %float -2.022542 +%float_n2_37764096 = OpConstant %float -2.37764096 +%float_0_772543013 = OpConstant %float 0.772543013 + %float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 + %int_7 = OpConstant %int 7 + %int_58 = OpConstant %int 58 + %int_24 = OpConstant %int 24 + %int_11 = OpConstant %int 11 + %int_5 = OpConstant %int 5 + %float_0_5 = OpConstant %float 0.5 + %int_4 = OpConstant %int 4 + %int_2 = OpConstant %int 2 + %62 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %bool = OpTypeBool + %uint_5 = OpConstant %uint 5 + %65 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %66 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %float_10 = OpConstant %float 10 + %float_5 = OpConstant %float 5 + %uint_0 = OpConstant %uint 0 + %int_23 = OpConstant %int 23 + %uint_1 = OpConstant %uint 1 + %uint_3 = OpConstant %uint 3 + %uint_16 = OpConstant %uint 16 +%float_0_150000006 = OpConstant %float 0.150000006 + %float_0_25 = OpConstant %float 0.25 + %float_2 = OpConstant %float 2 + %77 = OpConstantComposite %v3float %float_2 %float_2 %float_2 + %float_255 = OpConstant %float 255 + %uint_15 = OpConstant %uint 15 +%uint_4294967280 = OpConstant %uint 4294967280 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler + %uint_6 = OpConstant %uint 6 +%_arr_mat4v4float_uint_6 = OpTypeArray %mat4v4float %uint_6 +%type__Globals = OpTypeStruct %v3float %_arr_mat4v4float_uint_6 %float %float %float %v4float %v2float %v4float +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%type_cube_image = OpTypeImage %float Cube 2 0 0 1 Unknown +%_ptr_UniformConstant_type_cube_image = OpTypePointer UniformConstant %type_cube_image + %v2int = OpTypeVector %int 2 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %91 = OpTypeFunction %void +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%type_sampled_image = OpTypeSampledImage %type_cube_image + %v3int = OpTypeVector %int 3 +%type_sampled_image_0 = OpTypeSampledImage %type_2d_image + %v4bool = OpTypeVector %bool 4 + %View = OpVariable %_ptr_Uniform_type_View Uniform +%SceneTexturesStruct_SceneDepthTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%SceneTexturesStruct_SceneDepthTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%SceneTexturesStruct_GBufferATexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%SceneTexturesStruct_GBufferBTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%SceneTexturesStruct_GBufferDTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%SceneTexturesStruct_GBufferATextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%SceneTexturesStruct_GBufferBTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%SceneTexturesStruct_GBufferDTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%ShadowDepthTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%ShadowDepthCubeTexture = OpVariable %_ptr_UniformConstant_type_cube_image UniformConstant +%ShadowDepthCubeTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%SSProfilesTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output +%float_0_200000003 = OpConstant %float 0.200000003 + %98 = OpConstantComposite %v3float %float_2_5 %float_2_5 %float_2_5 + %99 = OpConstantComposite %v3float %float_2_37764096 %float_2_37764096 %float_2_37764096 + %100 = OpConstantComposite %v3float %float_0_772542 %float_0_772542 %float_0_772542 + %101 = OpConstantComposite %v3float %float_1_46946299 %float_1_46946299 %float_1_46946299 + %102 = OpConstantComposite %v3float %float_n2_02254295 %float_n2_02254295 %float_n2_02254295 + %103 = OpConstantComposite %v3float %float_n1_46946299 %float_n1_46946299 %float_n1_46946299 + %104 = OpConstantComposite %v3float %float_n2_022542 %float_n2_022542 %float_n2_022542 + %105 = OpConstantComposite %v3float %float_n2_37764096 %float_n2_37764096 %float_n2_37764096 + %106 = OpConstantComposite %v3float %float_0_772543013 %float_0_772543013 %float_0_772543013 + %107 = OpUndef %v4float +%MainOnePassPointLightPS = OpFunction %void None %91 + %108 = OpLabel + %109 = OpLoad %v4float %gl_FragCoord + %110 = OpVectorShuffle %v2float %109 %109 0 1 + %111 = OpAccessChain %_ptr_Uniform_v4float %View %int_58 + %112 = OpLoad %v4float %111 + %113 = OpVectorShuffle %v2float %112 %112 2 3 + %114 = OpFMul %v2float %110 %113 + %115 = OpLoad %type_2d_image %SceneTexturesStruct_SceneDepthTexture + %116 = OpLoad %type_sampler %SceneTexturesStruct_SceneDepthTextureSampler + %117 = OpSampledImage %type_sampled_image_0 %115 %116 + %118 = OpImageSampleExplicitLod %v4float %117 %114 Lod %float_0 + %119 = OpCompositeExtract %float %118 0 + %120 = OpAccessChain %_ptr_Uniform_float %View %int_23 %uint_0 + %121 = OpLoad %float %120 + %122 = OpFMul %float %119 %121 + %123 = OpAccessChain %_ptr_Uniform_float %View %int_23 %uint_1 + %124 = OpLoad %float %123 + %125 = OpFAdd %float %122 %124 + %126 = OpAccessChain %_ptr_Uniform_float %View %int_23 %uint_2 + %127 = OpLoad %float %126 + %128 = OpFMul %float %119 %127 + %129 = OpAccessChain %_ptr_Uniform_float %View %int_23 %uint_3 + %130 = OpLoad %float %129 + %131 = OpFSub %float %128 %130 + %132 = OpFDiv %float %float_1 %131 + %133 = OpFAdd %float %125 %132 + %134 = OpAccessChain %_ptr_Uniform_v4float %View %int_24 + %135 = OpLoad %v4float %134 + %136 = OpVectorShuffle %v2float %135 %135 3 2 + %137 = OpFSub %v2float %114 %136 + %138 = OpVectorShuffle %v2float %135 %135 0 1 + %139 = OpFDiv %v2float %137 %138 + %140 = OpCompositeConstruct %v2float %133 %133 + %141 = OpFMul %v2float %139 %140 + %142 = OpCompositeExtract %float %141 0 + %143 = OpCompositeExtract %float %141 1 + %144 = OpCompositeConstruct %v4float %142 %143 %133 %float_1 + %145 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_11 + %146 = OpLoad %mat4v4float %145 + %147 = OpMatrixTimesVector %v4float %146 %144 + %148 = OpVectorShuffle %v3float %147 %147 0 1 2 + %149 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_5 + %150 = OpLoad %v4float %149 + %151 = OpVectorShuffle %v3float %150 %150 0 1 2 + %152 = OpFSub %v3float %151 %148 + %153 = OpAccessChain %_ptr_Uniform_float %_Globals %int_5 %int_3 + %154 = OpLoad %float %153 + %155 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_7 + %156 = OpAccessChain %_ptr_Uniform_float %_Globals %int_7 %int_0 + %157 = OpLoad %float %156 + %158 = OpExtInst %float %1 Length %152 + %159 = OpFMul %float %158 %154 + %160 = OpFOrdLessThan %bool %159 %float_1 + OpSelectionMerge %161 DontFlatten + OpBranchConditional %160 %162 %161 + %162 = OpLabel + %163 = OpCompositeConstruct %v3float %158 %158 %158 + %164 = OpFDiv %v3float %152 %163 + %165 = OpExtInst %v3float %1 FAbs %152 + %166 = OpCompositeExtract %float %165 0 + %167 = OpCompositeExtract %float %165 1 + %168 = OpCompositeExtract %float %165 2 + %169 = OpExtInst %float %1 FMax %167 %168 + %170 = OpExtInst %float %1 FMax %166 %169 + %171 = OpFOrdEqual %bool %170 %166 + OpSelectionMerge %172 None + OpBranchConditional %171 %173 %174 + %174 = OpLabel + %175 = OpFOrdEqual %bool %170 %167 + OpSelectionMerge %176 None + OpBranchConditional %175 %177 %178 + %178 = OpLabel + %179 = OpCompositeExtract %float %152 2 + %180 = OpFOrdEqual %bool %168 %179 + %181 = OpSelect %int %180 %int_4 %int_5 + OpBranch %176 + %177 = OpLabel + %182 = OpCompositeExtract %float %152 1 + %183 = OpFOrdEqual %bool %167 %182 + %184 = OpSelect %int %183 %int_2 %int_3 + OpBranch %176 + %176 = OpLabel + %185 = OpPhi %int %184 %177 %181 %178 + OpBranch %172 + %173 = OpLabel + %186 = OpCompositeExtract %float %152 0 + %187 = OpFOrdEqual %bool %166 %186 + %188 = OpSelect %int %187 %int_0 %int_1 + OpBranch %172 + %172 = OpLabel + %189 = OpPhi %int %188 %173 %185 %176 + %190 = OpCompositeExtract %float %147 0 + %191 = OpCompositeExtract %float %147 1 + %192 = OpCompositeExtract %float %147 2 + %193 = OpCompositeConstruct %v4float %190 %191 %192 %float_1 + %194 = OpAccessChain %_ptr_Uniform_mat4v4float %_Globals %int_1 %189 + %195 = OpLoad %mat4v4float %194 + %196 = OpMatrixTimesVector %v4float %195 %193 + %197 = OpCompositeExtract %float %196 2 + %198 = OpCompositeExtract %float %196 3 + %199 = OpFDiv %float %197 %198 + %200 = OpFNegate %float %157 + %201 = OpFDiv %float %200 %198 + %202 = OpLoad %type_cube_image %ShadowDepthCubeTexture + %203 = OpLoad %type_sampler %ShadowDepthCubeTextureSampler + %204 = OpFAdd %float %199 %201 + %205 = OpSampledImage %type_sampled_image %202 %203 + %206 = OpImageSampleDrefExplicitLod %float %205 %164 %204 Lod %float_0 + OpBranch %161 + %161 = OpLabel + %207 = OpPhi %float %float_1 %108 %206 %172 + %208 = OpFSub %float %207 %float_0_5 + %209 = OpAccessChain %_ptr_Uniform_float %_Globals %int_4 + %210 = OpLoad %float %209 + %211 = OpFMul %float %208 %210 + %212 = OpFAdd %float %211 %float_0_5 + %213 = OpExtInst %float %1 FClamp %212 %float_0 %float_1 + %214 = OpFMul %float %213 %213 + %215 = OpAccessChain %_ptr_Uniform_float %_Globals %int_3 + %216 = OpLoad %float %215 + %217 = OpExtInst %float %1 FMix %float_1 %214 %216 + %218 = OpExtInst %float %1 Sqrt %217 + %219 = OpCompositeInsert %v4float %218 %107 2 + %220 = OpVectorShuffle %v4float %219 %62 4 5 2 6 + %221 = OpLoad %type_2d_image %SceneTexturesStruct_GBufferATexture + %222 = OpLoad %type_sampler %SceneTexturesStruct_GBufferATextureSampler + %223 = OpSampledImage %type_sampled_image_0 %221 %222 + %224 = OpImageSampleExplicitLod %v4float %223 %114 Lod %float_0 + %225 = OpLoad %type_2d_image %SceneTexturesStruct_GBufferBTexture + %226 = OpLoad %type_sampler %SceneTexturesStruct_GBufferBTextureSampler + %227 = OpSampledImage %type_sampled_image_0 %225 %226 + %228 = OpImageSampleExplicitLod %v4float %227 %114 Lod %float_0 + %229 = OpLoad %type_2d_image %SceneTexturesStruct_GBufferDTexture + %230 = OpLoad %type_sampler %SceneTexturesStruct_GBufferDTextureSampler + %231 = OpSampledImage %type_sampled_image_0 %229 %230 + %232 = OpImageSampleExplicitLod %v4float %231 %114 Lod %float_0 + %233 = OpVectorShuffle %v3float %224 %224 0 1 2 + %234 = OpFMul %v3float %233 %77 + %235 = OpFSub %v3float %234 %62 + %236 = OpExtInst %v3float %1 Normalize %235 + %237 = OpCompositeExtract %float %228 3 + %238 = OpFMul %float %237 %float_255 + %239 = OpExtInst %float %1 Round %238 + %240 = OpConvertFToU %uint %239 + %241 = OpBitwiseAnd %uint %240 %uint_15 + %242 = OpBitwiseAnd %uint %240 %uint_4294967280 + %243 = OpBitwiseAnd %uint %242 %uint_16 + %244 = OpINotEqual %bool %243 %uint_0 + %245 = OpLogicalNot %bool %244 + %246 = OpCompositeConstruct %v4bool %245 %245 %245 %245 + %247 = OpSelect %v4float %246 %232 %66 + %248 = OpIEqual %bool %241 %uint_5 + OpSelectionMerge %249 None + OpBranchConditional %248 %250 %249 + %250 = OpLabel + %251 = OpLoad %v4float %155 + %252 = OpCompositeExtract %float %247 0 + %253 = OpFMul %float %252 %float_255 + %254 = OpFAdd %float %253 %float_0_5 + %255 = OpConvertFToU %uint %254 + %256 = OpBitcast %int %255 + %257 = OpCompositeConstruct %v3int %int_1 %256 %int_0 + %258 = OpVectorShuffle %v2int %257 %257 0 1 + %259 = OpLoad %type_2d_image %SSProfilesTexture + %260 = OpImageFetch %v4float %259 %258 Lod %int_0 + %261 = OpCompositeExtract %float %260 0 + %262 = OpCompositeExtract %float %260 1 + %263 = OpFMul %float %262 %float_0_5 + %264 = OpCompositeConstruct %v3float %263 %263 %263 + %265 = OpFMul %v3float %236 %264 + %266 = OpFSub %v3float %148 %265 + %267 = OpDot %float %152 %152 + %268 = OpExtInst %float %1 InverseSqrt %267 + %269 = OpCompositeConstruct %v3float %268 %268 %268 + %270 = OpFMul %v3float %152 %269 + %271 = OpFNegate %v3float %270 + %272 = OpDot %float %271 %236 + %273 = OpExtInst %float %1 FClamp %272 %float_0 %float_1 + %274 = OpExtInst %float %1 Pow %273 %float_1 + OpSelectionMerge %275 DontFlatten + OpBranchConditional %160 %276 %275 + %276 = OpLabel + %277 = OpCompositeConstruct %v3float %158 %158 %158 + %278 = OpFDiv %v3float %152 %277 + %279 = OpExtInst %v3float %1 Cross %278 %65 + %280 = OpExtInst %v3float %1 Normalize %279 + %281 = OpExtInst %v3float %1 Cross %280 %278 + %282 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 + %283 = OpLoad %float %282 + %284 = OpCompositeConstruct %v3float %283 %283 %283 + %285 = OpFMul %v3float %280 %284 + %286 = OpFMul %v3float %281 %284 + %287 = OpExtInst %v3float %1 FAbs %278 + %288 = OpCompositeExtract %float %287 0 + %289 = OpCompositeExtract %float %287 1 + %290 = OpCompositeExtract %float %287 2 + %291 = OpExtInst %float %1 FMax %289 %290 + %292 = OpExtInst %float %1 FMax %288 %291 + %293 = OpFOrdEqual %bool %292 %288 + OpSelectionMerge %294 None + OpBranchConditional %293 %295 %296 + %296 = OpLabel + %297 = OpFOrdEqual %bool %292 %289 + OpSelectionMerge %298 None + OpBranchConditional %297 %299 %300 + %300 = OpLabel + %301 = OpCompositeExtract %float %278 2 + %302 = OpFOrdEqual %bool %290 %301 + %303 = OpSelect %int %302 %int_4 %int_5 + OpBranch %298 + %299 = OpLabel + %304 = OpCompositeExtract %float %278 1 + %305 = OpFOrdEqual %bool %289 %304 + %306 = OpSelect %int %305 %int_2 %int_3 + OpBranch %298 + %298 = OpLabel + %307 = OpPhi %int %306 %299 %303 %300 + OpBranch %294 + %295 = OpLabel + %308 = OpCompositeExtract %float %278 0 + %309 = OpFOrdEqual %bool %288 %308 + %310 = OpSelect %int %309 %int_0 %int_1 + OpBranch %294 + %294 = OpLabel + %311 = OpPhi %int %310 %295 %307 %298 + %312 = OpCompositeExtract %float %266 0 + %313 = OpCompositeExtract %float %266 1 + %314 = OpCompositeExtract %float %266 2 + %315 = OpCompositeConstruct %v4float %312 %313 %314 %float_1 + %316 = OpAccessChain %_ptr_Uniform_mat4v4float %_Globals %int_1 %311 + %317 = OpLoad %mat4v4float %316 + %318 = OpMatrixTimesVector %v4float %317 %315 + %319 = OpCompositeExtract %float %318 2 + %320 = OpCompositeExtract %float %318 3 + %321 = OpFDiv %float %319 %320 + %322 = OpFDiv %float %float_10 %154 + %323 = OpFMul %float %261 %322 + %324 = OpCompositeExtract %float %251 2 + %325 = OpFMul %float %321 %324 + %326 = OpCompositeExtract %float %251 3 + %327 = OpFSub %float %325 %326 + %328 = OpFDiv %float %float_1 %327 + %329 = OpFMul %float %328 %154 + %330 = OpFMul %v3float %286 %98 + %331 = OpFAdd %v3float %278 %330 + %332 = OpLoad %type_cube_image %ShadowDepthCubeTexture + %333 = OpLoad %type_sampler %ShadowDepthTextureSampler + %334 = OpSampledImage %type_sampled_image %332 %333 + %335 = OpImageSampleExplicitLod %v4float %334 %331 Lod %float_0 + %336 = OpCompositeExtract %float %335 0 + %337 = OpFMul %float %336 %324 + %338 = OpFSub %float %337 %326 + %339 = OpFDiv %float %float_1 %338 + %340 = OpFMul %float %339 %154 + %341 = OpFSub %float %329 %340 + %342 = OpFMul %float %341 %323 + %343 = OpFOrdGreaterThan %bool %342 %float_0 + %344 = OpFAdd %float %342 %263 + %345 = OpFMul %float %342 %274 + %346 = OpFAdd %float %345 %263 + %347 = OpExtInst %float %1 FMax %float_0 %346 + %348 = OpSelect %float %343 %344 %347 + %349 = OpExtInst %float %1 FAbs %348 + %350 = OpExtInst %float %1 FClamp %349 %float_0_150000006 %float_5 + %351 = OpFAdd %float %350 %float_0_25 + %352 = OpFMul %v3float %285 %99 + %353 = OpFAdd %v3float %278 %352 + %354 = OpFMul %v3float %286 %100 + %355 = OpFAdd %v3float %353 %354 + %356 = OpSampledImage %type_sampled_image %332 %333 + %357 = OpImageSampleExplicitLod %v4float %356 %355 Lod %float_0 + %358 = OpCompositeExtract %float %357 0 + %359 = OpFMul %float %358 %324 + %360 = OpFSub %float %359 %326 + %361 = OpFDiv %float %float_1 %360 + %362 = OpFMul %float %361 %154 + %363 = OpFSub %float %329 %362 + %364 = OpFMul %float %363 %323 + %365 = OpFOrdGreaterThan %bool %364 %float_0 + %366 = OpFAdd %float %364 %263 + %367 = OpFMul %float %364 %274 + %368 = OpFAdd %float %367 %263 + %369 = OpExtInst %float %1 FMax %float_0 %368 + %370 = OpSelect %float %365 %366 %369 + %371 = OpExtInst %float %1 FAbs %370 + %372 = OpExtInst %float %1 FClamp %371 %float_0_150000006 %float_5 + %373 = OpFAdd %float %372 %float_0_25 + %374 = OpFAdd %float %351 %373 + %375 = OpFMul %v3float %285 %101 + %376 = OpFAdd %v3float %278 %375 + %377 = OpFMul %v3float %286 %102 + %378 = OpFAdd %v3float %376 %377 + %379 = OpSampledImage %type_sampled_image %332 %333 + %380 = OpImageSampleExplicitLod %v4float %379 %378 Lod %float_0 + %381 = OpCompositeExtract %float %380 0 + %382 = OpFMul %float %381 %324 + %383 = OpFSub %float %382 %326 + %384 = OpFDiv %float %float_1 %383 + %385 = OpFMul %float %384 %154 + %386 = OpFSub %float %329 %385 + %387 = OpFMul %float %386 %323 + %388 = OpFOrdGreaterThan %bool %387 %float_0 + %389 = OpFAdd %float %387 %263 + %390 = OpFMul %float %387 %274 + %391 = OpFAdd %float %390 %263 + %392 = OpExtInst %float %1 FMax %float_0 %391 + %393 = OpSelect %float %388 %389 %392 + %394 = OpExtInst %float %1 FAbs %393 + %395 = OpExtInst %float %1 FClamp %394 %float_0_150000006 %float_5 + %396 = OpFAdd %float %395 %float_0_25 + %397 = OpFAdd %float %374 %396 + %398 = OpFMul %v3float %285 %103 + %399 = OpFAdd %v3float %278 %398 + %400 = OpFMul %v3float %286 %104 + %401 = OpFAdd %v3float %399 %400 + %402 = OpSampledImage %type_sampled_image %332 %333 + %403 = OpImageSampleExplicitLod %v4float %402 %401 Lod %float_0 + %404 = OpCompositeExtract %float %403 0 + %405 = OpFMul %float %404 %324 + %406 = OpFSub %float %405 %326 + %407 = OpFDiv %float %float_1 %406 + %408 = OpFMul %float %407 %154 + %409 = OpFSub %float %329 %408 + %410 = OpFMul %float %409 %323 + %411 = OpFOrdGreaterThan %bool %410 %float_0 + %412 = OpFAdd %float %410 %263 + %413 = OpFMul %float %410 %274 + %414 = OpFAdd %float %413 %263 + %415 = OpExtInst %float %1 FMax %float_0 %414 + %416 = OpSelect %float %411 %412 %415 + %417 = OpExtInst %float %1 FAbs %416 + %418 = OpExtInst %float %1 FClamp %417 %float_0_150000006 %float_5 + %419 = OpFAdd %float %418 %float_0_25 + %420 = OpFAdd %float %397 %419 + %421 = OpFMul %v3float %285 %105 + %422 = OpFAdd %v3float %278 %421 + %423 = OpFMul %v3float %286 %106 + %424 = OpFAdd %v3float %422 %423 + %425 = OpSampledImage %type_sampled_image %332 %333 + %426 = OpImageSampleExplicitLod %v4float %425 %424 Lod %float_0 + %427 = OpCompositeExtract %float %426 0 + %428 = OpFMul %float %427 %324 + %429 = OpFSub %float %428 %326 + %430 = OpFDiv %float %float_1 %429 + %431 = OpFMul %float %430 %154 + %432 = OpFSub %float %329 %431 + %433 = OpFMul %float %432 %323 + %434 = OpFOrdGreaterThan %bool %433 %float_0 + %435 = OpFAdd %float %433 %263 + %436 = OpFMul %float %433 %274 + %437 = OpFAdd %float %436 %263 + %438 = OpExtInst %float %1 FMax %float_0 %437 + %439 = OpSelect %float %434 %435 %438 + %440 = OpExtInst %float %1 FAbs %439 + %441 = OpExtInst %float %1 FClamp %440 %float_0_150000006 %float_5 + %442 = OpFAdd %float %441 %float_0_25 + %443 = OpFAdd %float %420 %442 + %444 = OpFMul %float %443 %float_0_200000003 + OpBranch %275 + %275 = OpLabel + %445 = OpPhi %float %float_1 %250 %444 %294 + %446 = OpFMul %float %445 %float_0_200000003 + %447 = OpFSub %float %float_1 %446 + OpBranch %249 + %249 = OpLabel + %448 = OpPhi %float %float_1 %161 %447 %275 + %449 = OpExtInst %float %1 Sqrt %448 + %450 = OpSelect %float %248 %449 %218 + %451 = OpCompositeInsert %v4float %450 %220 3 + OpStore %out_var_SV_Target0 %451 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/global-constant-arrays.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/global-constant-arrays.asm.frag new file mode 100644 index 000000000..47db9ebc5 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/global-constant-arrays.asm.frag @@ -0,0 +1,3556 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 3005 +; Schema: 0 + OpCapability Shader + OpCapability Geometry + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %MainPS "main" %in_var_TEXCOORD0 %gl_FragCoord %gl_Layer %out_var_SV_Target0 + OpExecutionMode %MainPS OriginUpperLeft + OpSource HLSL 600 + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "MappingPolynomial" + OpMemberName %type__Globals 1 "InverseGamma" + OpMemberName %type__Globals 2 "ColorMatrixR_ColorCurveCd1" + OpMemberName %type__Globals 3 "ColorMatrixG_ColorCurveCd3Cm3" + OpMemberName %type__Globals 4 "ColorMatrixB_ColorCurveCm2" + OpMemberName %type__Globals 5 "ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3" + OpMemberName %type__Globals 6 "ColorCurve_Ch1_Ch2" + OpMemberName %type__Globals 7 "ColorShadow_Luma" + OpMemberName %type__Globals 8 "ColorShadow_Tint1" + OpMemberName %type__Globals 9 "ColorShadow_Tint2" + OpMemberName %type__Globals 10 "FilmSlope" + OpMemberName %type__Globals 11 "FilmToe" + OpMemberName %type__Globals 12 "FilmShoulder" + OpMemberName %type__Globals 13 "FilmBlackClip" + OpMemberName %type__Globals 14 "FilmWhiteClip" + OpMemberName %type__Globals 15 "ColorScale" + OpMemberName %type__Globals 16 "OverlayColor" + OpMemberName %type__Globals 17 "WhiteTemp" + OpMemberName %type__Globals 18 "WhiteTint" + OpMemberName %type__Globals 19 "ColorSaturation" + OpMemberName %type__Globals 20 "ColorContrast" + OpMemberName %type__Globals 21 "ColorGamma" + OpMemberName %type__Globals 22 "ColorGain" + OpMemberName %type__Globals 23 "ColorOffset" + OpMemberName %type__Globals 24 "ColorSaturationShadows" + OpMemberName %type__Globals 25 "ColorContrastShadows" + OpMemberName %type__Globals 26 "ColorGammaShadows" + OpMemberName %type__Globals 27 "ColorGainShadows" + OpMemberName %type__Globals 28 "ColorOffsetShadows" + OpMemberName %type__Globals 29 "ColorSaturationMidtones" + OpMemberName %type__Globals 30 "ColorContrastMidtones" + OpMemberName %type__Globals 31 "ColorGammaMidtones" + OpMemberName %type__Globals 32 "ColorGainMidtones" + OpMemberName %type__Globals 33 "ColorOffsetMidtones" + OpMemberName %type__Globals 34 "ColorSaturationHighlights" + OpMemberName %type__Globals 35 "ColorContrastHighlights" + OpMemberName %type__Globals 36 "ColorGammaHighlights" + OpMemberName %type__Globals 37 "ColorGainHighlights" + OpMemberName %type__Globals 38 "ColorOffsetHighlights" + OpMemberName %type__Globals 39 "ColorCorrectionShadowsMax" + OpMemberName %type__Globals 40 "ColorCorrectionHighlightsMin" + OpMemberName %type__Globals 41 "OutputDevice" + OpMemberName %type__Globals 42 "OutputGamut" + OpMemberName %type__Globals 43 "BlueCorrection" + OpMemberName %type__Globals 44 "ExpandGamut" + OpName %_Globals "$Globals" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %MainPS "MainPS" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorate %in_var_TEXCOORD0 NoPerspective + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_POSITION" + OpDecorate %gl_Layer BuiltIn Layer + OpDecorateString %gl_Layer UserSemantic "SV_RenderTargetArrayIndex" + OpDecorate %gl_Layer Flat + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD0 Location 0 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 0 + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 2 Offset 32 + OpMemberDecorate %type__Globals 3 Offset 48 + OpMemberDecorate %type__Globals 4 Offset 64 + OpMemberDecorate %type__Globals 5 Offset 80 + OpMemberDecorate %type__Globals 6 Offset 96 + OpMemberDecorate %type__Globals 7 Offset 112 + OpMemberDecorate %type__Globals 8 Offset 128 + OpMemberDecorate %type__Globals 9 Offset 144 + OpMemberDecorate %type__Globals 10 Offset 160 + OpMemberDecorate %type__Globals 11 Offset 164 + OpMemberDecorate %type__Globals 12 Offset 168 + OpMemberDecorate %type__Globals 13 Offset 172 + OpMemberDecorate %type__Globals 14 Offset 176 + OpMemberDecorate %type__Globals 15 Offset 180 + OpMemberDecorate %type__Globals 16 Offset 192 + OpMemberDecorate %type__Globals 17 Offset 208 + OpMemberDecorate %type__Globals 18 Offset 212 + OpMemberDecorate %type__Globals 19 Offset 224 + OpMemberDecorate %type__Globals 20 Offset 240 + OpMemberDecorate %type__Globals 21 Offset 256 + OpMemberDecorate %type__Globals 22 Offset 272 + OpMemberDecorate %type__Globals 23 Offset 288 + OpMemberDecorate %type__Globals 24 Offset 304 + OpMemberDecorate %type__Globals 25 Offset 320 + OpMemberDecorate %type__Globals 26 Offset 336 + OpMemberDecorate %type__Globals 27 Offset 352 + OpMemberDecorate %type__Globals 28 Offset 368 + OpMemberDecorate %type__Globals 29 Offset 384 + OpMemberDecorate %type__Globals 30 Offset 400 + OpMemberDecorate %type__Globals 31 Offset 416 + OpMemberDecorate %type__Globals 32 Offset 432 + OpMemberDecorate %type__Globals 33 Offset 448 + OpMemberDecorate %type__Globals 34 Offset 464 + OpMemberDecorate %type__Globals 35 Offset 480 + OpMemberDecorate %type__Globals 36 Offset 496 + OpMemberDecorate %type__Globals 37 Offset 512 + OpMemberDecorate %type__Globals 38 Offset 528 + OpMemberDecorate %type__Globals 39 Offset 544 + OpMemberDecorate %type__Globals 40 Offset 548 + OpMemberDecorate %type__Globals 41 Offset 552 + OpMemberDecorate %type__Globals 42 Offset 556 + OpMemberDecorate %type__Globals 43 Offset 560 + OpMemberDecorate %type__Globals 44 Offset 564 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 +%float_0_952552378 = OpConstant %float 0.952552378 + %float_0 = OpConstant %float 0 + +; HACK: Needed to hack this constant since MSVC and GNU libc are off by 1 ULP when converting to string (it probably still works fine though in a roundtrip ...) +%float_9_36786018en05 = OpConstant %float 9.25 + +%float_0_343966454 = OpConstant %float 0.343966454 +%float_0_728166103 = OpConstant %float 0.728166103 +%float_n0_0721325427 = OpConstant %float -0.0721325427 +%float_1_00882518 = OpConstant %float 1.00882518 +%float_1_04981101 = OpConstant %float 1.04981101 +%float_n9_74845025en05 = OpConstant %float -9.74845025e-05 +%float_n0_495903015 = OpConstant %float -0.495903015 +%float_1_37331307 = OpConstant %float 1.37331307 +%float_0_0982400328 = OpConstant %float 0.0982400328 +%float_0_991252005 = OpConstant %float 0.991252005 +%float_0_662454188 = OpConstant %float 0.662454188 +%float_0_134004205 = OpConstant %float 0.134004205 +%float_0_156187683 = OpConstant %float 0.156187683 +%float_0_272228718 = OpConstant %float 0.272228718 +%float_0_674081743 = OpConstant %float 0.674081743 +%float_0_0536895171 = OpConstant %float 0.0536895171 +%float_n0_00557464967 = OpConstant %float -0.00557464967 +%float_0_0040607336 = OpConstant %float 0.0040607336 +%float_1_01033914 = OpConstant %float 1.01033914 +%float_1_6410234 = OpConstant %float 1.6410234 +%float_n0_324803293 = OpConstant %float -0.324803293 +%float_n0_236424699 = OpConstant %float -0.236424699 +%float_n0_663662851 = OpConstant %float -0.663662851 +%float_1_61533165 = OpConstant %float 1.61533165 +%float_0_0167563483 = OpConstant %float 0.0167563483 +%float_0_0117218941 = OpConstant %float 0.0117218941 +%float_n0_00828444213 = OpConstant %float -0.00828444213 +%float_0_988394856 = OpConstant %float 0.988394856 +%float_1_45143926 = OpConstant %float 1.45143926 +%float_n0_236510754 = OpConstant %float -0.236510754 +%float_n0_214928567 = OpConstant %float -0.214928567 +%float_n0_0765537769 = OpConstant %float -0.0765537769 +%float_1_17622972 = OpConstant %float 1.17622972 +%float_n0_0996759236 = OpConstant %float -0.0996759236 +%float_0_00831614807 = OpConstant %float 0.00831614807 +%float_n0_00603244966 = OpConstant %float -0.00603244966 +%float_0_997716308 = OpConstant %float 0.997716308 +%float_0_695452213 = OpConstant %float 0.695452213 +%float_0_140678704 = OpConstant %float 0.140678704 +%float_0_163869068 = OpConstant %float 0.163869068 +%float_0_0447945632 = OpConstant %float 0.0447945632 +%float_0_859671116 = OpConstant %float 0.859671116 +%float_0_0955343172 = OpConstant %float 0.0955343172 +%float_n0_00552588282 = OpConstant %float -0.00552588282 +%float_0_00402521016 = OpConstant %float 0.00402521016 +%float_1_00150073 = OpConstant %float 1.00150073 + %67 = OpConstantComposite %v3float %float_0_272228718 %float_0_674081743 %float_0_0536895171 +%float_3_2409699 = OpConstant %float 3.2409699 +%float_n1_5373832 = OpConstant %float -1.5373832 +%float_n0_498610765 = OpConstant %float -0.498610765 +%float_n0_969243646 = OpConstant %float -0.969243646 +%float_1_8759675 = OpConstant %float 1.8759675 +%float_0_0415550582 = OpConstant %float 0.0415550582 +%float_0_0556300804 = OpConstant %float 0.0556300804 +%float_n0_203976959 = OpConstant %float -0.203976959 +%float_1_05697155 = OpConstant %float 1.05697155 +%float_0_412456393 = OpConstant %float 0.412456393 +%float_0_357576102 = OpConstant %float 0.357576102 +%float_0_180437505 = OpConstant %float 0.180437505 +%float_0_212672904 = OpConstant %float 0.212672904 +%float_0_715152204 = OpConstant %float 0.715152204 +%float_0_0721750036 = OpConstant %float 0.0721750036 +%float_0_0193339009 = OpConstant %float 0.0193339009 +%float_0_119191997 = OpConstant %float 0.119191997 +%float_0_950304091 = OpConstant %float 0.950304091 +%float_1_71660841 = OpConstant %float 1.71660841 +%float_n0_355662107 = OpConstant %float -0.355662107 +%float_n0_253360093 = OpConstant %float -0.253360093 +%float_n0_666682899 = OpConstant %float -0.666682899 +%float_1_61647761 = OpConstant %float 1.61647761 +%float_0_0157685 = OpConstant %float 0.0157685 +%float_0_0176422 = OpConstant %float 0.0176422 +%float_n0_0427763015 = OpConstant %float -0.0427763015 +%float_0_942228675 = OpConstant %float 0.942228675 +%float_2_49339628 = OpConstant %float 2.49339628 +%float_n0_93134588 = OpConstant %float -0.93134588 +%float_n0_402694494 = OpConstant %float -0.402694494 +%float_n0_829486787 = OpConstant %float -0.829486787 +%float_1_76265967 = OpConstant %float 1.76265967 +%float_0_0236246008 = OpConstant %float 0.0236246008 +%float_0_0358507 = OpConstant %float 0.0358507 +%float_n0_0761827007 = OpConstant %float -0.0761827007 +%float_0_957014024 = OpConstant %float 0.957014024 +%float_1_01303005 = OpConstant %float 1.01303005 +%float_0_00610530982 = OpConstant %float 0.00610530982 +%float_n0_0149710001 = OpConstant %float -0.0149710001 +%float_0_00769822998 = OpConstant %float 0.00769822998 +%float_0_998165011 = OpConstant %float 0.998165011 +%float_n0_00503202993 = OpConstant %float -0.00503202993 +%float_n0_00284131011 = OpConstant %float -0.00284131011 +%float_0_00468515977 = OpConstant %float 0.00468515977 +%float_0_924507022 = OpConstant %float 0.924507022 +%float_0_987223983 = OpConstant %float 0.987223983 +%float_n0_00611326983 = OpConstant %float -0.00611326983 +%float_0_0159533005 = OpConstant %float 0.0159533005 +%float_n0_00759836007 = OpConstant %float -0.00759836007 +%float_1_00186002 = OpConstant %float 1.00186002 +%float_0_0053300201 = OpConstant %float 0.0053300201 +%float_0_00307257008 = OpConstant %float 0.00307257008 +%float_n0_00509594986 = OpConstant %float -0.00509594986 +%float_1_08168006 = OpConstant %float 1.08168006 + %float_0_5 = OpConstant %float 0.5 + %float_n1 = OpConstant %float -1 + %float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 +%float_0_015625 = OpConstant %float 0.015625 + %128 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 + %129 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int_42 = OpConstant %int 42 + %uint_3 = OpConstant %uint 3 + %132 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %int_9 = OpConstant %int 9 + %int_3 = OpConstant %int 3 + %135 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %float_n4 = OpConstant %float -4 + %int_44 = OpConstant %int 44 +%float_0_544169128 = OpConstant %float 0.544169128 +%float_0_239592597 = OpConstant %float 0.239592597 +%float_0_166694298 = OpConstant %float 0.166694298 +%float_0_239465594 = OpConstant %float 0.239465594 +%float_0_702153027 = OpConstant %float 0.702153027 +%float_0_058381401 = OpConstant %float 0.058381401 +%float_n0_00234390004 = OpConstant %float -0.00234390004 +%float_0_0361833982 = OpConstant %float 0.0361833982 +%float_1_05521834 = OpConstant %float 1.05521834 +%float_0_940437257 = OpConstant %float 0.940437257 +%float_n0_0183068793 = OpConstant %float -0.0183068793 +%float_0_077869609 = OpConstant %float 0.077869609 +%float_0_00837869663 = OpConstant %float 0.00837869663 +%float_0_828660011 = OpConstant %float 0.828660011 +%float_0_162961304 = OpConstant %float 0.162961304 +%float_0_00054712611 = OpConstant %float 0.00054712611 +%float_n0_000883374596 = OpConstant %float -0.000883374596 +%float_1_00033629 = OpConstant %float 1.00033629 +%float_1_06317997 = OpConstant %float 1.06317997 +%float_0_0233955998 = OpConstant %float 0.0233955998 +%float_n0_0865726024 = OpConstant %float -0.0865726024 +%float_n0_0106336996 = OpConstant %float -0.0106336996 +%float_1_20632005 = OpConstant %float 1.20632005 +%float_n0_195690006 = OpConstant %float -0.195690006 +%float_n0_000590886979 = OpConstant %float -0.000590886979 +%float_0_00105247996 = OpConstant %float 0.00105247996 +%float_0_999538004 = OpConstant %float 0.999538004 + %int_43 = OpConstant %int 43 + %int_15 = OpConstant %int 15 + %int_16 = OpConstant %int 16 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %uint_5 = OpConstant %uint 5 + %uint_6 = OpConstant %uint 6 + %int_2 = OpConstant %int 2 +%mat3v3float = OpTypeMatrix %v3float 3 + %int_41 = OpConstant %int 41 +%float_0_159301758 = OpConstant %float 0.159301758 +%float_78_84375 = OpConstant %float 78.84375 +%float_0_8359375 = OpConstant %float 0.8359375 +%float_18_8515625 = OpConstant %float 18.8515625 +%float_18_6875 = OpConstant %float 18.6875 +%float_10000 = OpConstant %float 10000 +%float_0_0126833133 = OpConstant %float 0.0126833133 + %182 = OpConstantComposite %v3float %float_0_0126833133 %float_0_0126833133 %float_0_0126833133 + %183 = OpConstantComposite %v3float %float_0_8359375 %float_0_8359375 %float_0_8359375 + %184 = OpConstantComposite %v3float %float_18_8515625 %float_18_8515625 %float_18_8515625 + %185 = OpConstantComposite %v3float %float_18_6875 %float_18_6875 %float_18_6875 +%float_6_27739477 = OpConstant %float 6.27739477 + %187 = OpConstantComposite %v3float %float_6_27739477 %float_6_27739477 %float_6_27739477 + %188 = OpConstantComposite %v3float %float_10000 %float_10000 %float_10000 + %float_14 = OpConstant %float 14 +%float_0_180000007 = OpConstant %float 0.180000007 +%float_0_434017599 = OpConstant %float 0.434017599 + %192 = OpConstantComposite %v3float %float_0_434017599 %float_0_434017599 %float_0_434017599 + %193 = OpConstantComposite %v3float %float_14 %float_14 %float_14 + %194 = OpConstantComposite %v3float %float_0_180000007 %float_0_180000007 %float_0_180000007 + %int_17 = OpConstant %int 17 + %float_4000 = OpConstant %float 4000 +%float_0_312700003 = OpConstant %float 0.312700003 +%float_0_328999996 = OpConstant %float 0.328999996 + %int_18 = OpConstant %int 18 + %int_24 = OpConstant %int 24 + %int_19 = OpConstant %int 19 + %int_25 = OpConstant %int 25 + %int_20 = OpConstant %int 20 + %int_26 = OpConstant %int 26 + %int_21 = OpConstant %int 21 + %int_27 = OpConstant %int 27 + %int_22 = OpConstant %int 22 + %int_28 = OpConstant %int 28 + %int_23 = OpConstant %int 23 + %int_39 = OpConstant %int 39 + %int_34 = OpConstant %int 34 + %int_35 = OpConstant %int 35 + %int_36 = OpConstant %int 36 + %int_37 = OpConstant %int 37 + %int_38 = OpConstant %int 38 + %int_40 = OpConstant %int 40 + %int_29 = OpConstant %int 29 + %int_30 = OpConstant %int 30 + %int_31 = OpConstant %int 31 + %int_32 = OpConstant %int 32 + %int_33 = OpConstant %int 33 +%float_0_0500000007 = OpConstant %float 0.0500000007 + %float_1_75 = OpConstant %float 1.75 +%float_0_400000006 = OpConstant %float 0.400000006 +%float_0_0299999993 = OpConstant %float 0.0299999993 + %float_2 = OpConstant %float 2 +%float_0_959999979 = OpConstant %float 0.959999979 + %228 = OpConstantComposite %v3float %float_0_959999979 %float_0_959999979 %float_0_959999979 + %int_13 = OpConstant %int 13 + %int_11 = OpConstant %int 11 + %int_14 = OpConstant %int 14 + %int_12 = OpConstant %int 12 +%float_0_800000012 = OpConstant %float 0.800000012 + %int_10 = OpConstant %int 10 + %float_10 = OpConstant %float 10 + %float_n2 = OpConstant %float -2 + %float_3 = OpConstant %float 3 + %238 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %239 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%float_0_930000007 = OpConstant %float 0.930000007 + %241 = OpConstantComposite %v3float %float_0_930000007 %float_0_930000007 %float_0_930000007 + %int_4 = OpConstant %int 4 + %int_8 = OpConstant %int 8 + %int_7 = OpConstant %int 7 + %int_5 = OpConstant %int 5 + %int_6 = OpConstant %int 6 +%float_0_00200000009 = OpConstant %float 0.00200000009 + %248 = OpConstantComposite %v3float %float_0_00200000009 %float_0_00200000009 %float_0_00200000009 +%float_6_10351999en05 = OpConstant %float 6.10351999e-05 + %250 = OpConstantComposite %v3float %float_6_10351999en05 %float_6_10351999en05 %float_6_10351999en05 + %float_4_5 = OpConstant %float 4.5 + %252 = OpConstantComposite %v3float %float_4_5 %float_4_5 %float_4_5 +%float_0_0179999992 = OpConstant %float 0.0179999992 + %254 = OpConstantComposite %v3float %float_0_0179999992 %float_0_0179999992 %float_0_0179999992 +%float_0_449999988 = OpConstant %float 0.449999988 + %256 = OpConstantComposite %v3float %float_0_449999988 %float_0_449999988 %float_0_449999988 +%float_1_09899998 = OpConstant %float 1.09899998 + %258 = OpConstantComposite %v3float %float_1_09899998 %float_1_09899998 %float_1_09899998 +%float_0_0989999995 = OpConstant %float 0.0989999995 + %260 = OpConstantComposite %v3float %float_0_0989999995 %float_0_0989999995 %float_0_0989999995 + %float_1_5 = OpConstant %float 1.5 + %262 = OpConstantComposite %v3float %float_1_5 %float_1_5 %float_1_5 + %263 = OpConstantComposite %v3float %float_0_159301758 %float_0_159301758 %float_0_159301758 + %264 = OpConstantComposite %v3float %float_78_84375 %float_78_84375 %float_78_84375 +%float_1_00055635 = OpConstant %float 1.00055635 + %float_7000 = OpConstant %float 7000 +%float_0_244063005 = OpConstant %float 0.244063005 +%float_99_1100006 = OpConstant %float 99.1100006 +%float_2967800 = OpConstant %float 2967800 +%float_0_237039998 = OpConstant %float 0.237039998 +%float_247_479996 = OpConstant %float 247.479996 +%float_1901800 = OpConstant %float 1901800 + %float_n3 = OpConstant %float -3 +%float_2_86999989 = OpConstant %float 2.86999989 +%float_0_275000006 = OpConstant %float 0.275000006 +%float_0_860117733 = OpConstant %float 0.860117733 +%float_0_000154118257 = OpConstant %float 0.000154118257 +%float_1_28641219en07 = OpConstant %float 1.28641219e-07 +%float_0_00084242021 = OpConstant %float 0.00084242021 +%float_7_08145137en07 = OpConstant %float 7.08145137e-07 +%float_0_317398727 = OpConstant %float 0.317398727 + +; HACK: Needed to hack this constant since MSVC and GNU libc are off by 1 ULP when converting to string (it probably still works fine though in a roundtrip ...) +%float_4_22806261en05 = OpConstant %float 4.25 + +%float_4_20481676en08 = OpConstant %float 4.20481676e-08 +%float_2_8974182en05 = OpConstant %float 2.8974182e-05 +%float_1_61456057en07 = OpConstant %float 1.61456057e-07 + %float_8 = OpConstant %float 8 + %float_4 = OpConstant %float 4 +%float_0_895099998 = OpConstant %float 0.895099998 +%float_0_266400009 = OpConstant %float 0.266400009 +%float_n0_161400005 = OpConstant %float -0.161400005 +%float_n0_750199974 = OpConstant %float -0.750199974 +%float_1_71350002 = OpConstant %float 1.71350002 +%float_0_0366999991 = OpConstant %float 0.0366999991 +%float_0_0388999991 = OpConstant %float 0.0388999991 +%float_n0_0684999973 = OpConstant %float -0.0684999973 +%float_1_02960002 = OpConstant %float 1.02960002 +%float_0_986992896 = OpConstant %float 0.986992896 +%float_n0_1470543 = OpConstant %float -0.1470543 +%float_0_159962699 = OpConstant %float 0.159962699 +%float_0_432305306 = OpConstant %float 0.432305306 +%float_0_518360317 = OpConstant %float 0.518360317 +%float_0_0492912009 = OpConstant %float 0.0492912009 +%float_n0_0085287001 = OpConstant %float -0.0085287001 +%float_0_040042799 = OpConstant %float 0.040042799 +%float_0_968486726 = OpConstant %float 0.968486726 +%float_5_55555534 = OpConstant %float 5.55555534 + %307 = OpConstantComposite %v3float %float_5_55555534 %float_5_55555534 %float_5_55555534 +%float_1_00000001en10 = OpConstant %float 1.00000001e-10 +%float_0_00999999978 = OpConstant %float 0.00999999978 +%float_0_666666687 = OpConstant %float 0.666666687 + %float_180 = OpConstant %float 180 + %float_360 = OpConstant %float 360 +%float_65535 = OpConstant %float 65535 + %314 = OpConstantComposite %v3float %float_65535 %float_65535 %float_65535 +%float_n4_97062206 = OpConstant %float -4.97062206 +%float_n3_02937818 = OpConstant %float -3.02937818 +%float_n2_12619996 = OpConstant %float -2.12619996 +%float_n1_51049995 = OpConstant %float -1.51049995 +%float_n1_05780005 = OpConstant %float -1.05780005 +%float_n0_466800004 = OpConstant %float -0.466800004 +%float_0_119379997 = OpConstant %float 0.119379997 +%float_0_708813429 = OpConstant %float 0.708813429 +%float_1_29118657 = OpConstant %float 1.29118657 +%float_0_808913231 = OpConstant %float 0.808913231 +%float_1_19108677 = OpConstant %float 1.19108677 +%float_1_56830001 = OpConstant %float 1.56830001 +%float_1_9483 = OpConstant %float 1.9483 +%float_2_30830002 = OpConstant %float 2.30830002 +%float_2_63840008 = OpConstant %float 2.63840008 +%float_2_85949993 = OpConstant %float 2.85949993 +%float_2_98726082 = OpConstant %float 2.98726082 +%float_3_01273918 = OpConstant %float 3.01273918 +%float_0_179999992 = OpConstant %float 0.179999992 +%float_9_99999975en05 = OpConstant %float 9.99999975e-05 + %float_1000 = OpConstant %float 1000 +%float_0_0599999987 = OpConstant %float 0.0599999987 +%float_3_50738446en05 = OpConstant %float 3.50738446e-05 + %338 = OpConstantComposite %v3float %float_3_50738446en05 %float_3_50738446en05 %float_3_50738446en05 +%float_n2_30102992 = OpConstant %float -2.30102992 +%float_n1_93120003 = OpConstant %float -1.93120003 +%float_n1_52049994 = OpConstant %float -1.52049994 +%float_0_801995218 = OpConstant %float 0.801995218 +%float_1_19800484 = OpConstant %float 1.19800484 +%float_1_59430003 = OpConstant %float 1.59430003 +%float_1_99730003 = OpConstant %float 1.99730003 +%float_2_37829995 = OpConstant %float 2.37829995 +%float_2_76839995 = OpConstant %float 2.76839995 +%float_3_05150008 = OpConstant %float 3.05150008 +%float_3_27462935 = OpConstant %float 3.27462935 +%float_3_32743073 = OpConstant %float 3.32743073 +%float_0_00499999989 = OpConstant %float 0.00499999989 + %float_11 = OpConstant %float 11 + %float_2000 = OpConstant %float 2000 +%float_0_119999997 = OpConstant %float 0.119999997 +%float_0_00313066994 = OpConstant %float 0.00313066994 +%float_12_9200001 = OpConstant %float 12.9200001 +%float_0_416666657 = OpConstant %float 0.416666657 +%float_1_05499995 = OpConstant %float 1.05499995 +%float_0_0549999997 = OpConstant %float 0.0549999997 +%float_n0_166666672 = OpConstant %float -0.166666672 + %float_n0_5 = OpConstant %float -0.5 +%float_0_166666672 = OpConstant %float 0.166666672 +%float_n3_15737653 = OpConstant %float -3.15737653 +%float_n0_485249996 = OpConstant %float -0.485249996 +%float_1_84773242 = OpConstant %float 1.84773242 +%float_n0_718548238 = OpConstant %float -0.718548238 +%float_2_08103061 = OpConstant %float 2.08103061 +%float_3_6681242 = OpConstant %float 3.6681242 + %float_18 = OpConstant %float 18 + %float_7 = OpConstant %float 7 +%type__Globals = OpTypeStruct %v4float %v3float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %float %float %float %float %float %v3float %v4float %float %float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %float %float %uint %uint %float %float +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%_ptr_Input_v2float = OpTypePointer Input %v2float +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %377 = OpTypeFunction %void +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %bool = OpTypeBool +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 + %uint_10 = OpConstant %uint 10 +%_arr_float_uint_10 = OpTypeArray %float %uint_10 +%_arr_float_uint_6 = OpTypeArray %float %uint_6 + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %gl_Layer = OpVariable %_ptr_Input_uint Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output +%_ptr_Function__arr_float_uint_6 = OpTypePointer Function %_arr_float_uint_6 +%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10 + %391 = OpUndef %v3float + %392 = OpConstantComposite %v3float %float_0_952552378 %float_0 %float_9_36786018en05 + %393 = OpConstantComposite %v3float %float_0_343966454 %float_0_728166103 %float_n0_0721325427 + %394 = OpConstantComposite %v3float %float_0 %float_0 %float_1_00882518 + %395 = OpConstantComposite %mat3v3float %392 %393 %394 + %396 = OpConstantComposite %v3float %float_1_04981101 %float_0 %float_n9_74845025en05 + %397 = OpConstantComposite %v3float %float_n0_495903015 %float_1_37331307 %float_0_0982400328 + %398 = OpConstantComposite %v3float %float_0 %float_0 %float_0_991252005 + %399 = OpConstantComposite %mat3v3float %396 %397 %398 + %400 = OpConstantComposite %v3float %float_0_662454188 %float_0_134004205 %float_0_156187683 + %401 = OpConstantComposite %v3float %float_n0_00557464967 %float_0_0040607336 %float_1_01033914 + %402 = OpConstantComposite %mat3v3float %400 %67 %401 + %403 = OpConstantComposite %v3float %float_1_6410234 %float_n0_324803293 %float_n0_236424699 + %404 = OpConstantComposite %v3float %float_n0_663662851 %float_1_61533165 %float_0_0167563483 + %405 = OpConstantComposite %v3float %float_0_0117218941 %float_n0_00828444213 %float_0_988394856 + %406 = OpConstantComposite %mat3v3float %403 %404 %405 + %407 = OpConstantComposite %v3float %float_1_45143926 %float_n0_236510754 %float_n0_214928567 + %408 = OpConstantComposite %v3float %float_n0_0765537769 %float_1_17622972 %float_n0_0996759236 + %409 = OpConstantComposite %v3float %float_0_00831614807 %float_n0_00603244966 %float_0_997716308 + %410 = OpConstantComposite %mat3v3float %407 %408 %409 + %411 = OpConstantComposite %v3float %float_0_695452213 %float_0_140678704 %float_0_163869068 + %412 = OpConstantComposite %v3float %float_0_0447945632 %float_0_859671116 %float_0_0955343172 + %413 = OpConstantComposite %v3float %float_n0_00552588282 %float_0_00402521016 %float_1_00150073 + %414 = OpConstantComposite %mat3v3float %411 %412 %413 + %415 = OpConstantComposite %v3float %float_3_2409699 %float_n1_5373832 %float_n0_498610765 + %416 = OpConstantComposite %v3float %float_n0_969243646 %float_1_8759675 %float_0_0415550582 + %417 = OpConstantComposite %v3float %float_0_0556300804 %float_n0_203976959 %float_1_05697155 + %418 = OpConstantComposite %mat3v3float %415 %416 %417 + %419 = OpConstantComposite %v3float %float_0_412456393 %float_0_357576102 %float_0_180437505 + %420 = OpConstantComposite %v3float %float_0_212672904 %float_0_715152204 %float_0_0721750036 + %421 = OpConstantComposite %v3float %float_0_0193339009 %float_0_119191997 %float_0_950304091 + %422 = OpConstantComposite %mat3v3float %419 %420 %421 + %423 = OpConstantComposite %v3float %float_1_71660841 %float_n0_355662107 %float_n0_253360093 + %424 = OpConstantComposite %v3float %float_n0_666682899 %float_1_61647761 %float_0_0157685 + %425 = OpConstantComposite %v3float %float_0_0176422 %float_n0_0427763015 %float_0_942228675 + %426 = OpConstantComposite %mat3v3float %423 %424 %425 + %427 = OpConstantComposite %v3float %float_2_49339628 %float_n0_93134588 %float_n0_402694494 + %428 = OpConstantComposite %v3float %float_n0_829486787 %float_1_76265967 %float_0_0236246008 + %429 = OpConstantComposite %v3float %float_0_0358507 %float_n0_0761827007 %float_0_957014024 + %430 = OpConstantComposite %mat3v3float %427 %428 %429 + %431 = OpConstantComposite %v3float %float_1_01303005 %float_0_00610530982 %float_n0_0149710001 + %432 = OpConstantComposite %v3float %float_0_00769822998 %float_0_998165011 %float_n0_00503202993 + %433 = OpConstantComposite %v3float %float_n0_00284131011 %float_0_00468515977 %float_0_924507022 + %434 = OpConstantComposite %mat3v3float %431 %432 %433 + %435 = OpConstantComposite %v3float %float_0_987223983 %float_n0_00611326983 %float_0_0159533005 + %436 = OpConstantComposite %v3float %float_n0_00759836007 %float_1_00186002 %float_0_0053300201 + %437 = OpConstantComposite %v3float %float_0_00307257008 %float_n0_00509594986 %float_1_08168006 + %438 = OpConstantComposite %mat3v3float %435 %436 %437 + %439 = OpConstantComposite %v3float %float_0_5 %float_n1 %float_0_5 + %440 = OpConstantComposite %v3float %float_n1 %float_1 %float_0_5 + %441 = OpConstantComposite %v3float %float_0_5 %float_0 %float_0 + %442 = OpConstantComposite %mat3v3float %439 %440 %441 + %443 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %444 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %445 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %446 = OpConstantComposite %mat3v3float %443 %444 %445 +%float_n6_07624626 = OpConstant %float -6.07624626 + %448 = OpConstantComposite %v3float %float_n6_07624626 %float_n6_07624626 %float_n6_07624626 + %449 = OpConstantComposite %v3float %float_0_895099998 %float_0_266400009 %float_n0_161400005 + %450 = OpConstantComposite %v3float %float_n0_750199974 %float_1_71350002 %float_0_0366999991 + %451 = OpConstantComposite %v3float %float_0_0388999991 %float_n0_0684999973 %float_1_02960002 + %452 = OpConstantComposite %mat3v3float %449 %450 %451 + %453 = OpConstantComposite %v3float %float_0_986992896 %float_n0_1470543 %float_0_159962699 + %454 = OpConstantComposite %v3float %float_0_432305306 %float_0_518360317 %float_0_0492912009 + %455 = OpConstantComposite %v3float %float_n0_0085287001 %float_0_040042799 %float_0_968486726 + %456 = OpConstantComposite %mat3v3float %453 %454 %455 +%float_0_358299971 = OpConstant %float 0.358299971 + %458 = OpConstantComposite %v3float %float_0_544169128 %float_0_239592597 %float_0_166694298 + %459 = OpConstantComposite %v3float %float_0_239465594 %float_0_702153027 %float_0_058381401 + %460 = OpConstantComposite %v3float %float_n0_00234390004 %float_0_0361833982 %float_1_05521834 + %461 = OpConstantComposite %mat3v3float %458 %459 %460 + %462 = OpConstantComposite %v3float %float_0_940437257 %float_n0_0183068793 %float_0_077869609 + %463 = OpConstantComposite %v3float %float_0_00837869663 %float_0_828660011 %float_0_162961304 + %464 = OpConstantComposite %v3float %float_0_00054712611 %float_n0_000883374596 %float_1_00033629 + %465 = OpConstantComposite %mat3v3float %462 %463 %464 + %466 = OpConstantComposite %v3float %float_1_06317997 %float_0_0233955998 %float_n0_0865726024 + %467 = OpConstantComposite %v3float %float_n0_0106336996 %float_1_20632005 %float_n0_195690006 + %468 = OpConstantComposite %v3float %float_n0_000590886979 %float_0_00105247996 %float_0_999538004 + %469 = OpConstantComposite %mat3v3float %466 %467 %468 +%float_0_0533333346 = OpConstant %float 0.0533333346 +%float_0_159999996 = OpConstant %float 0.159999996 +%float_57_2957764 = OpConstant %float 57.2957764 +%float_n67_5 = OpConstant %float -67.5 + %float_67_5 = OpConstant %float 67.5 + %475 = OpConstantComposite %_arr_float_uint_6 %float_n4 %float_n4 %float_n3_15737653 %float_n0_485249996 %float_1_84773242 %float_1_84773242 + %476 = OpConstantComposite %_arr_float_uint_6 %float_n0_718548238 %float_2_08103061 %float_3_6681242 %float_4 %float_4 %float_4 + %float_n15 = OpConstant %float -15 + %float_n14 = OpConstant %float -14 + %479 = OpConstantComposite %_arr_float_uint_10 %float_n4_97062206 %float_n3_02937818 %float_n2_12619996 %float_n1_51049995 %float_n1_05780005 %float_n0_466800004 %float_0_119379997 %float_0_708813429 %float_1_29118657 %float_1_29118657 + %480 = OpConstantComposite %_arr_float_uint_10 %float_0_808913231 %float_1_19108677 %float_1_56830001 %float_1_9483 %float_2_30830002 %float_2_63840008 %float_2_85949993 %float_2_98726082 %float_3_01273918 %float_3_01273918 + %float_n12 = OpConstant %float -12 + %482 = OpConstantComposite %_arr_float_uint_10 %float_n2_30102992 %float_n2_30102992 %float_n1_93120003 %float_n1_52049994 %float_n1_05780005 %float_n0_466800004 %float_0_119379997 %float_0_708813429 %float_1_29118657 %float_1_29118657 + %483 = OpConstantComposite %_arr_float_uint_10 %float_0_801995218 %float_1_19800484 %float_1_59430003 %float_1_99730003 %float_2_37829995 %float_2_76839995 %float_3_05150008 %float_3_27462935 %float_3_32743073 %float_3_32743073 +%float_0_0322580636 = OpConstant %float 0.0322580636 +%float_1_03225803 = OpConstant %float 1.03225803 + %486 = OpConstantComposite %v2float %float_1_03225803 %float_1_03225803 +%float_4_60443853e_09 = OpConstant %float 4.60443853e+09 +%float_2_00528435e_09 = OpConstant %float 2.00528435e+09 +%float_0_333333343 = OpConstant %float 0.333333343 + %float_5 = OpConstant %float 5 + %float_2_5 = OpConstant %float 2.5 +%float_0_0250000004 = OpConstant %float 0.0250000004 +%float_0_239999995 = OpConstant %float 0.239999995 +%float_0_0148148146 = OpConstant %float 0.0148148146 +%float_0_819999993 = OpConstant %float 0.819999993 + %496 = OpConstantComposite %v3float %float_9_99999975en05 %float_9_99999975en05 %float_9_99999975en05 +%float_0_0296296291 = OpConstant %float 0.0296296291 +%float_0_952381015 = OpConstant %float 0.952381015 + %499 = OpConstantComposite %v3float %float_0_952381015 %float_0_952381015 %float_0_952381015 + %MainPS = OpFunction %void None %377 + %500 = OpLabel + %501 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %502 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %503 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %504 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %505 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %506 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %507 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %508 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %509 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %510 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %511 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %512 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %513 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %514 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %515 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %516 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %517 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %518 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %519 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %520 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %521 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %522 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %523 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %524 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %525 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %526 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %527 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %528 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %529 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %530 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %531 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %532 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %533 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %534 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %535 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %536 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %537 = OpLoad %v2float %in_var_TEXCOORD0 + %538 = OpLoad %uint %gl_Layer + %539 = OpFSub %v2float %537 %128 + %540 = OpFMul %v2float %539 %486 + %541 = OpCompositeExtract %float %540 0 + %542 = OpCompositeExtract %float %540 1 + %543 = OpConvertUToF %float %538 + %544 = OpFMul %float %543 %float_0_0322580636 + %545 = OpCompositeConstruct %v4float %541 %542 %544 %float_0 + %546 = OpMatrixTimesMatrix %mat3v3float %422 %434 + %547 = OpMatrixTimesMatrix %mat3v3float %546 %406 + %548 = OpMatrixTimesMatrix %mat3v3float %402 %438 + %549 = OpMatrixTimesMatrix %mat3v3float %548 %418 + %550 = OpMatrixTimesMatrix %mat3v3float %395 %406 + %551 = OpMatrixTimesMatrix %mat3v3float %402 %399 + %552 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_42 + %553 = OpLoad %uint %552 + OpBranch %554 + %554 = OpLabel + OpLoopMerge %555 %556 None + OpBranch %557 + %557 = OpLabel + %558 = OpMatrixTimesMatrix %mat3v3float %548 %430 + %559 = OpMatrixTimesMatrix %mat3v3float %548 %426 + %560 = OpIEqual %bool %553 %uint_1 + OpSelectionMerge %561 None + OpBranchConditional %560 %562 %563 + %563 = OpLabel + %564 = OpIEqual %bool %553 %uint_2 + OpSelectionMerge %565 None + OpBranchConditional %564 %566 %567 + %567 = OpLabel + %568 = OpIEqual %bool %553 %uint_3 + OpSelectionMerge %569 None + OpBranchConditional %568 %570 %571 + %571 = OpLabel + %572 = OpIEqual %bool %553 %uint_4 + OpSelectionMerge %573 None + OpBranchConditional %572 %574 %575 + %575 = OpLabel + OpBranch %555 + %574 = OpLabel + OpBranch %555 + %573 = OpLabel + OpUnreachable + %570 = OpLabel + OpBranch %555 + %569 = OpLabel + OpUnreachable + %566 = OpLabel + OpBranch %555 + %565 = OpLabel + OpUnreachable + %562 = OpLabel + OpBranch %555 + %561 = OpLabel + OpUnreachable + %556 = OpLabel + OpBranch %554 + %555 = OpLabel + %576 = OpPhi %mat3v3float %549 %575 %446 %574 %414 %570 %559 %566 %558 %562 + %577 = OpVectorShuffle %v3float %545 %545 0 1 2 + %578 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_41 + %579 = OpLoad %uint %578 + %580 = OpUGreaterThanEqual %bool %579 %uint_3 + OpSelectionMerge %581 None + OpBranchConditional %580 %582 %583 + %583 = OpLabel + %584 = OpFSub %v3float %577 %192 + %585 = OpFMul %v3float %584 %193 + %586 = OpExtInst %v3float %1 Exp2 %585 + %587 = OpFMul %v3float %586 %194 + %588 = OpExtInst %v3float %1 Exp2 %448 + %589 = OpFMul %v3float %588 %194 + %590 = OpFSub %v3float %587 %589 + OpBranch %581 + %582 = OpLabel + %591 = OpExtInst %v3float %1 Pow %577 %182 + %592 = OpFSub %v3float %591 %183 + %593 = OpExtInst %v3float %1 FMax %132 %592 + %594 = OpFMul %v3float %185 %591 + %595 = OpFSub %v3float %184 %594 + %596 = OpFDiv %v3float %593 %595 + %597 = OpExtInst %v3float %1 Pow %596 %187 + %598 = OpFMul %v3float %597 %188 + OpBranch %581 + %581 = OpLabel + %599 = OpPhi %v3float %590 %583 %598 %582 + %600 = OpAccessChain %_ptr_Uniform_float %_Globals %int_17 + %601 = OpLoad %float %600 + %602 = OpFMul %float %601 %float_1_00055635 + %603 = OpFOrdLessThanEqual %bool %602 %float_7000 + %604 = OpFDiv %float %float_4_60443853e_09 %601 + %605 = OpFSub %float %float_2967800 %604 + %606 = OpFDiv %float %605 %602 + %607 = OpFAdd %float %float_99_1100006 %606 + %608 = OpFDiv %float %607 %602 + %609 = OpFAdd %float %float_0_244063005 %608 + %610 = OpFDiv %float %float_2_00528435e_09 %601 + %611 = OpFSub %float %float_1901800 %610 + %612 = OpFDiv %float %611 %602 + %613 = OpFAdd %float %float_247_479996 %612 + %614 = OpFDiv %float %613 %602 + %615 = OpFAdd %float %float_0_237039998 %614 + %616 = OpSelect %float %603 %609 %615 + %617 = OpFMul %float %float_n3 %616 + %618 = OpFMul %float %617 %616 + %619 = OpFMul %float %float_2_86999989 %616 + %620 = OpFAdd %float %618 %619 + %621 = OpFSub %float %620 %float_0_275000006 + %622 = OpCompositeConstruct %v2float %616 %621 + %623 = OpFMul %float %float_0_000154118257 %601 + %624 = OpFAdd %float %float_0_860117733 %623 + %625 = OpFMul %float %float_1_28641219en07 %601 + %626 = OpFMul %float %625 %601 + %627 = OpFAdd %float %624 %626 + %628 = OpFMul %float %float_0_00084242021 %601 + %629 = OpFAdd %float %float_1 %628 + %630 = OpFMul %float %float_7_08145137en07 %601 + %631 = OpFMul %float %630 %601 + %632 = OpFAdd %float %629 %631 + %633 = OpFDiv %float %627 %632 + %634 = OpFMul %float %float_4_22806261en05 %601 + %635 = OpFAdd %float %float_0_317398727 %634 + %636 = OpFMul %float %float_4_20481676en08 %601 + %637 = OpFMul %float %636 %601 + %638 = OpFAdd %float %635 %637 + %639 = OpFMul %float %float_2_8974182en05 %601 + %640 = OpFSub %float %float_1 %639 + %641 = OpFMul %float %float_1_61456057en07 %601 + %642 = OpFMul %float %641 %601 + %643 = OpFAdd %float %640 %642 + %644 = OpFDiv %float %638 %643 + %645 = OpFMul %float %float_3 %633 + %646 = OpFMul %float %float_2 %633 + %647 = OpFMul %float %float_8 %644 + %648 = OpFSub %float %646 %647 + %649 = OpFAdd %float %648 %float_4 + %650 = OpFDiv %float %645 %649 + %651 = OpFMul %float %float_2 %644 + %652 = OpFDiv %float %651 %649 + %653 = OpCompositeConstruct %v2float %650 %652 + %654 = OpFOrdLessThan %bool %601 %float_4000 + %655 = OpCompositeConstruct %v2bool %654 %654 + %656 = OpSelect %v2float %655 %653 %622 + %657 = OpAccessChain %_ptr_Uniform_float %_Globals %int_18 + %658 = OpLoad %float %657 + %659 = OpCompositeConstruct %v2float %633 %644 + %660 = OpExtInst %v2float %1 Normalize %659 + %661 = OpCompositeExtract %float %660 1 + %662 = OpFNegate %float %661 + %663 = OpFMul %float %662 %658 + %664 = OpFMul %float %663 %float_0_0500000007 + %665 = OpFAdd %float %633 %664 + %666 = OpCompositeExtract %float %660 0 + %667 = OpFMul %float %666 %658 + %668 = OpFMul %float %667 %float_0_0500000007 + %669 = OpFAdd %float %644 %668 + %670 = OpFMul %float %float_3 %665 + %671 = OpFMul %float %float_2 %665 + %672 = OpFMul %float %float_8 %669 + %673 = OpFSub %float %671 %672 + %674 = OpFAdd %float %673 %float_4 + %675 = OpFDiv %float %670 %674 + %676 = OpFMul %float %float_2 %669 + %677 = OpFDiv %float %676 %674 + %678 = OpCompositeConstruct %v2float %675 %677 + %679 = OpFSub %v2float %678 %653 + %680 = OpFAdd %v2float %656 %679 + %681 = OpCompositeExtract %float %680 0 + %682 = OpCompositeExtract %float %680 1 + %683 = OpExtInst %float %1 FMax %682 %float_1_00000001en10 + %684 = OpFDiv %float %681 %683 + %685 = OpCompositeInsert %v3float %684 %391 0 + %686 = OpCompositeInsert %v3float %float_1 %685 1 + %687 = OpFSub %float %float_1 %681 + %688 = OpFSub %float %687 %682 + %689 = OpFDiv %float %688 %683 + %690 = OpCompositeInsert %v3float %689 %686 2 + %691 = OpExtInst %float %1 FMax %float_0_328999996 %float_1_00000001en10 + %692 = OpFDiv %float %float_0_312700003 %691 + %693 = OpCompositeInsert %v3float %692 %391 0 + %694 = OpCompositeInsert %v3float %float_1 %693 1 + %695 = OpFDiv %float %float_0_358299971 %691 + %696 = OpCompositeInsert %v3float %695 %694 2 + %697 = OpVectorTimesMatrix %v3float %690 %452 + %698 = OpVectorTimesMatrix %v3float %696 %452 + %699 = OpCompositeExtract %float %698 0 + %700 = OpCompositeExtract %float %697 0 + %701 = OpFDiv %float %699 %700 + %702 = OpCompositeConstruct %v3float %701 %float_0 %float_0 + %703 = OpCompositeExtract %float %698 1 + %704 = OpCompositeExtract %float %697 1 + %705 = OpFDiv %float %703 %704 + %706 = OpCompositeConstruct %v3float %float_0 %705 %float_0 + %707 = OpCompositeExtract %float %698 2 + %708 = OpCompositeExtract %float %697 2 + %709 = OpFDiv %float %707 %708 + %710 = OpCompositeConstruct %v3float %float_0 %float_0 %709 + %711 = OpCompositeConstruct %mat3v3float %702 %706 %710 + %712 = OpMatrixTimesMatrix %mat3v3float %452 %711 + %713 = OpMatrixTimesMatrix %mat3v3float %712 %456 + %714 = OpMatrixTimesMatrix %mat3v3float %422 %713 + %715 = OpMatrixTimesMatrix %mat3v3float %714 %418 + %716 = OpVectorTimesMatrix %v3float %599 %715 + %717 = OpVectorTimesMatrix %v3float %716 %547 + %718 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_9 + %719 = OpAccessChain %_ptr_Uniform_float %_Globals %int_9 %int_3 + %720 = OpLoad %float %719 + %721 = OpFOrdNotEqual %bool %720 %float_0 + OpSelectionMerge %722 None + OpBranchConditional %721 %723 %722 + %723 = OpLabel + %724 = OpDot %float %717 %67 + %725 = OpCompositeConstruct %v3float %724 %724 %724 + %726 = OpFDiv %v3float %717 %725 + %727 = OpFSub %v3float %726 %135 + %728 = OpDot %float %727 %727 + %729 = OpFMul %float %float_n4 %728 + %730 = OpExtInst %float %1 Exp2 %729 + %731 = OpFSub %float %float_1 %730 + %732 = OpAccessChain %_ptr_Uniform_float %_Globals %int_44 + %733 = OpLoad %float %732 + %734 = OpFMul %float %float_n4 %733 + %735 = OpFMul %float %734 %724 + %736 = OpFMul %float %735 %724 + %737 = OpExtInst %float %1 Exp2 %736 + %738 = OpFSub %float %float_1 %737 + %739 = OpFMul %float %731 %738 + %740 = OpMatrixTimesMatrix %mat3v3float %461 %406 + %741 = OpMatrixTimesMatrix %mat3v3float %549 %740 + %742 = OpVectorTimesMatrix %v3float %717 %741 + %743 = OpCompositeConstruct %v3float %739 %739 %739 + %744 = OpExtInst %v3float %1 FMix %717 %742 %743 + OpBranch %722 + %722 = OpLabel + %745 = OpPhi %v3float %717 %581 %744 %723 + %746 = OpDot %float %745 %67 + %747 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_24 + %748 = OpLoad %v4float %747 + %749 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_19 + %750 = OpLoad %v4float %749 + %751 = OpFMul %v4float %748 %750 + %752 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_25 + %753 = OpLoad %v4float %752 + %754 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_20 + %755 = OpLoad %v4float %754 + %756 = OpFMul %v4float %753 %755 + %757 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_26 + %758 = OpLoad %v4float %757 + %759 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_21 + %760 = OpLoad %v4float %759 + %761 = OpFMul %v4float %758 %760 + %762 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_27 + %763 = OpLoad %v4float %762 + %764 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_22 + %765 = OpLoad %v4float %764 + %766 = OpFMul %v4float %763 %765 + %767 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_28 + %768 = OpLoad %v4float %767 + %769 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_23 + %770 = OpLoad %v4float %769 + %771 = OpFAdd %v4float %768 %770 + %772 = OpCompositeConstruct %v3float %746 %746 %746 + %773 = OpVectorShuffle %v3float %751 %751 0 1 2 + %774 = OpCompositeExtract %float %751 3 + %775 = OpCompositeConstruct %v3float %774 %774 %774 + %776 = OpFMul %v3float %773 %775 + %777 = OpExtInst %v3float %1 FMix %772 %745 %776 + %778 = OpExtInst %v3float %1 FMax %132 %777 + %779 = OpFMul %v3float %778 %307 + %780 = OpVectorShuffle %v3float %756 %756 0 1 2 + %781 = OpCompositeExtract %float %756 3 + %782 = OpCompositeConstruct %v3float %781 %781 %781 + %783 = OpFMul %v3float %780 %782 + %784 = OpExtInst %v3float %1 Pow %779 %783 + %785 = OpFMul %v3float %784 %194 + %786 = OpVectorShuffle %v3float %761 %761 0 1 2 + %787 = OpCompositeExtract %float %761 3 + %788 = OpCompositeConstruct %v3float %787 %787 %787 + %789 = OpFMul %v3float %786 %788 + %790 = OpFDiv %v3float %135 %789 + %791 = OpExtInst %v3float %1 Pow %785 %790 + %792 = OpVectorShuffle %v3float %766 %766 0 1 2 + %793 = OpCompositeExtract %float %766 3 + %794 = OpCompositeConstruct %v3float %793 %793 %793 + %795 = OpFMul %v3float %792 %794 + %796 = OpFMul %v3float %791 %795 + %797 = OpVectorShuffle %v3float %771 %771 0 1 2 + %798 = OpCompositeExtract %float %771 3 + %799 = OpCompositeConstruct %v3float %798 %798 %798 + %800 = OpFAdd %v3float %797 %799 + %801 = OpFAdd %v3float %796 %800 + %802 = OpAccessChain %_ptr_Uniform_float %_Globals %int_39 + %803 = OpLoad %float %802 + %804 = OpExtInst %float %1 SmoothStep %float_0 %803 %746 + %805 = OpFSub %float %float_1 %804 + %806 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_34 + %807 = OpLoad %v4float %806 + %808 = OpFMul %v4float %807 %750 + %809 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_35 + %810 = OpLoad %v4float %809 + %811 = OpFMul %v4float %810 %755 + %812 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_36 + %813 = OpLoad %v4float %812 + %814 = OpFMul %v4float %813 %760 + %815 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_37 + %816 = OpLoad %v4float %815 + %817 = OpFMul %v4float %816 %765 + %818 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_38 + %819 = OpLoad %v4float %818 + %820 = OpFAdd %v4float %819 %770 + %821 = OpVectorShuffle %v3float %808 %808 0 1 2 + %822 = OpCompositeExtract %float %808 3 + %823 = OpCompositeConstruct %v3float %822 %822 %822 + %824 = OpFMul %v3float %821 %823 + %825 = OpExtInst %v3float %1 FMix %772 %745 %824 + %826 = OpExtInst %v3float %1 FMax %132 %825 + %827 = OpFMul %v3float %826 %307 + %828 = OpVectorShuffle %v3float %811 %811 0 1 2 + %829 = OpCompositeExtract %float %811 3 + %830 = OpCompositeConstruct %v3float %829 %829 %829 + %831 = OpFMul %v3float %828 %830 + %832 = OpExtInst %v3float %1 Pow %827 %831 + %833 = OpFMul %v3float %832 %194 + %834 = OpVectorShuffle %v3float %814 %814 0 1 2 + %835 = OpCompositeExtract %float %814 3 + %836 = OpCompositeConstruct %v3float %835 %835 %835 + %837 = OpFMul %v3float %834 %836 + %838 = OpFDiv %v3float %135 %837 + %839 = OpExtInst %v3float %1 Pow %833 %838 + %840 = OpVectorShuffle %v3float %817 %817 0 1 2 + %841 = OpCompositeExtract %float %817 3 + %842 = OpCompositeConstruct %v3float %841 %841 %841 + %843 = OpFMul %v3float %840 %842 + %844 = OpFMul %v3float %839 %843 + %845 = OpVectorShuffle %v3float %820 %820 0 1 2 + %846 = OpCompositeExtract %float %820 3 + %847 = OpCompositeConstruct %v3float %846 %846 %846 + %848 = OpFAdd %v3float %845 %847 + %849 = OpFAdd %v3float %844 %848 + %850 = OpAccessChain %_ptr_Uniform_float %_Globals %int_40 + %851 = OpLoad %float %850 + %852 = OpExtInst %float %1 SmoothStep %851 %float_1 %746 + %853 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_29 + %854 = OpLoad %v4float %853 + %855 = OpFMul %v4float %854 %750 + %856 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_30 + %857 = OpLoad %v4float %856 + %858 = OpFMul %v4float %857 %755 + %859 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_31 + %860 = OpLoad %v4float %859 + %861 = OpFMul %v4float %860 %760 + %862 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_32 + %863 = OpLoad %v4float %862 + %864 = OpFMul %v4float %863 %765 + %865 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_33 + %866 = OpLoad %v4float %865 + %867 = OpFAdd %v4float %866 %770 + %868 = OpVectorShuffle %v3float %855 %855 0 1 2 + %869 = OpCompositeExtract %float %855 3 + %870 = OpCompositeConstruct %v3float %869 %869 %869 + %871 = OpFMul %v3float %868 %870 + %872 = OpExtInst %v3float %1 FMix %772 %745 %871 + %873 = OpExtInst %v3float %1 FMax %132 %872 + %874 = OpFMul %v3float %873 %307 + %875 = OpVectorShuffle %v3float %858 %858 0 1 2 + %876 = OpCompositeExtract %float %858 3 + %877 = OpCompositeConstruct %v3float %876 %876 %876 + %878 = OpFMul %v3float %875 %877 + %879 = OpExtInst %v3float %1 Pow %874 %878 + %880 = OpFMul %v3float %879 %194 + %881 = OpVectorShuffle %v3float %861 %861 0 1 2 + %882 = OpCompositeExtract %float %861 3 + %883 = OpCompositeConstruct %v3float %882 %882 %882 + %884 = OpFMul %v3float %881 %883 + %885 = OpFDiv %v3float %135 %884 + %886 = OpExtInst %v3float %1 Pow %880 %885 + %887 = OpVectorShuffle %v3float %864 %864 0 1 2 + %888 = OpCompositeExtract %float %864 3 + %889 = OpCompositeConstruct %v3float %888 %888 %888 + %890 = OpFMul %v3float %887 %889 + %891 = OpFMul %v3float %886 %890 + %892 = OpVectorShuffle %v3float %867 %867 0 1 2 + %893 = OpCompositeExtract %float %867 3 + %894 = OpCompositeConstruct %v3float %893 %893 %893 + %895 = OpFAdd %v3float %892 %894 + %896 = OpFAdd %v3float %891 %895 + %897 = OpFSub %float %804 %852 + %898 = OpCompositeConstruct %v3float %805 %805 %805 + %899 = OpFMul %v3float %801 %898 + %900 = OpCompositeConstruct %v3float %897 %897 %897 + %901 = OpFMul %v3float %896 %900 + %902 = OpFAdd %v3float %899 %901 + %903 = OpCompositeConstruct %v3float %852 %852 %852 + %904 = OpFMul %v3float %849 %903 + %905 = OpFAdd %v3float %902 %904 + %906 = OpVectorTimesMatrix %v3float %905 %549 + %907 = OpMatrixTimesMatrix %mat3v3float %551 %465 + %908 = OpMatrixTimesMatrix %mat3v3float %907 %550 + %909 = OpMatrixTimesMatrix %mat3v3float %551 %469 + %910 = OpMatrixTimesMatrix %mat3v3float %909 %550 + %911 = OpVectorTimesMatrix %v3float %905 %908 + %912 = OpAccessChain %_ptr_Uniform_float %_Globals %int_43 + %913 = OpLoad %float %912 + %914 = OpCompositeConstruct %v3float %913 %913 %913 + %915 = OpExtInst %v3float %1 FMix %905 %911 %914 + %916 = OpVectorTimesMatrix %v3float %915 %551 + %917 = OpCompositeExtract %float %916 0 + %918 = OpCompositeExtract %float %916 1 + %919 = OpExtInst %float %1 FMin %917 %918 + %920 = OpCompositeExtract %float %916 2 + %921 = OpExtInst %float %1 FMin %919 %920 + %922 = OpExtInst %float %1 FMax %917 %918 + %923 = OpExtInst %float %1 FMax %922 %920 + %924 = OpExtInst %float %1 FMax %923 %float_1_00000001en10 + %925 = OpExtInst %float %1 FMax %921 %float_1_00000001en10 + %926 = OpFSub %float %924 %925 + %927 = OpExtInst %float %1 FMax %923 %float_0_00999999978 + %928 = OpFDiv %float %926 %927 + %929 = OpFSub %float %920 %918 + %930 = OpFMul %float %920 %929 + %931 = OpFSub %float %918 %917 + %932 = OpFMul %float %918 %931 + %933 = OpFAdd %float %930 %932 + %934 = OpFSub %float %917 %920 + %935 = OpFMul %float %917 %934 + %936 = OpFAdd %float %933 %935 + %937 = OpExtInst %float %1 Sqrt %936 + %938 = OpFAdd %float %920 %918 + %939 = OpFAdd %float %938 %917 + %940 = OpFMul %float %float_1_75 %937 + %941 = OpFAdd %float %939 %940 + %942 = OpFMul %float %941 %float_0_333333343 + %943 = OpFSub %float %928 %float_0_400000006 + %944 = OpFMul %float %943 %float_5 + %945 = OpFMul %float %943 %float_2_5 + %946 = OpExtInst %float %1 FAbs %945 + %947 = OpFSub %float %float_1 %946 + %948 = OpExtInst %float %1 FMax %947 %float_0 + %949 = OpExtInst %float %1 FSign %944 + %950 = OpConvertFToS %int %949 + %951 = OpConvertSToF %float %950 + %952 = OpFMul %float %948 %948 + %953 = OpFSub %float %float_1 %952 + %954 = OpFMul %float %951 %953 + %955 = OpFAdd %float %float_1 %954 + %956 = OpFMul %float %955 %float_0_0250000004 + %957 = OpFOrdLessThanEqual %bool %942 %float_0_0533333346 + OpSelectionMerge %958 None + OpBranchConditional %957 %959 %960 + %960 = OpLabel + %961 = OpFOrdGreaterThanEqual %bool %942 %float_0_159999996 + OpSelectionMerge %962 None + OpBranchConditional %961 %963 %964 + %964 = OpLabel + %965 = OpFDiv %float %float_0_239999995 %941 + %966 = OpFSub %float %965 %float_0_5 + %967 = OpFMul %float %956 %966 + OpBranch %962 + %963 = OpLabel + OpBranch %962 + %962 = OpLabel + %968 = OpPhi %float %967 %964 %float_0 %963 + OpBranch %958 + %959 = OpLabel + OpBranch %958 + %958 = OpLabel + %969 = OpPhi %float %968 %962 %956 %959 + %970 = OpFAdd %float %float_1 %969 + %971 = OpCompositeConstruct %v3float %970 %970 %970 + %972 = OpFMul %v3float %916 %971 + %973 = OpCompositeExtract %float %972 0 + %974 = OpCompositeExtract %float %972 1 + %975 = OpFOrdEqual %bool %973 %974 + %976 = OpCompositeExtract %float %972 2 + %977 = OpFOrdEqual %bool %974 %976 + %978 = OpLogicalAnd %bool %975 %977 + OpSelectionMerge %979 None + OpBranchConditional %978 %980 %981 + %981 = OpLabel + %982 = OpExtInst %float %1 Sqrt %float_3 + %983 = OpFSub %float %974 %976 + %984 = OpFMul %float %982 %983 + %985 = OpFMul %float %float_2 %973 + %986 = OpFSub %float %985 %974 + %987 = OpFSub %float %986 %976 + %988 = OpExtInst %float %1 Atan2 %984 %987 + %989 = OpFMul %float %float_57_2957764 %988 + OpBranch %979 + %980 = OpLabel + OpBranch %979 + %979 = OpLabel + %990 = OpPhi %float %989 %981 %float_0 %980 + %991 = OpFOrdLessThan %bool %990 %float_0 + OpSelectionMerge %992 None + OpBranchConditional %991 %993 %992 + %993 = OpLabel + %994 = OpFAdd %float %990 %float_360 + OpBranch %992 + %992 = OpLabel + %995 = OpPhi %float %990 %979 %994 %993 + %996 = OpExtInst %float %1 FClamp %995 %float_0 %float_360 + %997 = OpFOrdGreaterThan %bool %996 %float_180 + OpSelectionMerge %998 None + OpBranchConditional %997 %999 %998 + %999 = OpLabel + %1000 = OpFSub %float %996 %float_360 + OpBranch %998 + %998 = OpLabel + %1001 = OpPhi %float %996 %992 %1000 %999 + %1002 = OpFMul %float %1001 %float_0_0148148146 + %1003 = OpExtInst %float %1 FAbs %1002 + %1004 = OpFSub %float %float_1 %1003 + %1005 = OpExtInst %float %1 SmoothStep %float_0 %float_1 %1004 + %1006 = OpFMul %float %1005 %1005 + %1007 = OpFMul %float %1006 %928 + %1008 = OpFSub %float %float_0_0299999993 %973 + %1009 = OpFMul %float %1007 %1008 + %1010 = OpFMul %float %1009 %float_0_180000007 + %1011 = OpFAdd %float %973 %1010 + %1012 = OpCompositeInsert %v3float %1011 %972 0 + %1013 = OpVectorTimesMatrix %v3float %1012 %410 + %1014 = OpExtInst %v3float %1 FMax %132 %1013 + %1015 = OpDot %float %1014 %67 + %1016 = OpCompositeConstruct %v3float %1015 %1015 %1015 + %1017 = OpExtInst %v3float %1 FMix %1016 %1014 %228 + %1018 = OpAccessChain %_ptr_Uniform_float %_Globals %int_13 + %1019 = OpLoad %float %1018 + %1020 = OpFAdd %float %float_1 %1019 + %1021 = OpAccessChain %_ptr_Uniform_float %_Globals %int_11 + %1022 = OpLoad %float %1021 + %1023 = OpFSub %float %1020 %1022 + %1024 = OpAccessChain %_ptr_Uniform_float %_Globals %int_14 + %1025 = OpLoad %float %1024 + %1026 = OpFAdd %float %float_1 %1025 + %1027 = OpAccessChain %_ptr_Uniform_float %_Globals %int_12 + %1028 = OpLoad %float %1027 + %1029 = OpFSub %float %1026 %1028 + %1030 = OpFOrdGreaterThan %bool %1022 %float_0_800000012 + OpSelectionMerge %1031 None + OpBranchConditional %1030 %1032 %1033 + %1033 = OpLabel + %1034 = OpFAdd %float %float_0_180000007 %1019 + %1035 = OpFDiv %float %1034 %1023 + %1036 = OpExtInst %float %1 Log %float_0_180000007 + %1037 = OpExtInst %float %1 Log %float_10 + %1038 = OpFDiv %float %1036 %1037 + %1039 = OpFSub %float %float_2 %1035 + %1040 = OpFDiv %float %1035 %1039 + %1041 = OpExtInst %float %1 Log %1040 + %1042 = OpFMul %float %float_0_5 %1041 + %1043 = OpAccessChain %_ptr_Uniform_float %_Globals %int_10 + %1044 = OpLoad %float %1043 + %1045 = OpFDiv %float %1023 %1044 + %1046 = OpFMul %float %1042 %1045 + %1047 = OpFSub %float %1038 %1046 + OpBranch %1031 + %1032 = OpLabel + %1048 = OpFSub %float %float_0_819999993 %1022 + %1049 = OpAccessChain %_ptr_Uniform_float %_Globals %int_10 + %1050 = OpLoad %float %1049 + %1051 = OpFDiv %float %1048 %1050 + %1052 = OpExtInst %float %1 Log %float_0_180000007 + %1053 = OpExtInst %float %1 Log %float_10 + %1054 = OpFDiv %float %1052 %1053 + %1055 = OpFAdd %float %1051 %1054 + OpBranch %1031 + %1031 = OpLabel + %1056 = OpPhi %float %1047 %1033 %1055 %1032 + %1057 = OpFSub %float %float_1 %1022 + %1058 = OpAccessChain %_ptr_Uniform_float %_Globals %int_10 + %1059 = OpLoad %float %1058 + %1060 = OpFDiv %float %1057 %1059 + %1061 = OpFSub %float %1060 %1056 + %1062 = OpFDiv %float %1028 %1059 + %1063 = OpFSub %float %1062 %1061 + %1064 = OpExtInst %v3float %1 Log %1017 + %1065 = OpExtInst %float %1 Log %float_10 + %1066 = OpCompositeConstruct %v3float %1065 %1065 %1065 + %1067 = OpFDiv %v3float %1064 %1066 + %1068 = OpCompositeConstruct %v3float %1059 %1059 %1059 + %1069 = OpCompositeConstruct %v3float %1061 %1061 %1061 + %1070 = OpFAdd %v3float %1067 %1069 + %1071 = OpFMul %v3float %1068 %1070 + %1072 = OpFNegate %float %1019 + %1073 = OpCompositeConstruct %v3float %1072 %1072 %1072 + %1074 = OpFMul %float %float_2 %1023 + %1075 = OpCompositeConstruct %v3float %1074 %1074 %1074 + %1076 = OpFMul %float %float_n2 %1059 + %1077 = OpFDiv %float %1076 %1023 + %1078 = OpCompositeConstruct %v3float %1077 %1077 %1077 + %1079 = OpCompositeConstruct %v3float %1056 %1056 %1056 + %1080 = OpFSub %v3float %1067 %1079 + %1081 = OpFMul %v3float %1078 %1080 + %1082 = OpExtInst %v3float %1 Exp %1081 + %1083 = OpFAdd %v3float %135 %1082 + %1084 = OpFDiv %v3float %1075 %1083 + %1085 = OpFAdd %v3float %1073 %1084 + %1086 = OpCompositeConstruct %v3float %1026 %1026 %1026 + %1087 = OpFMul %float %float_2 %1029 + %1088 = OpCompositeConstruct %v3float %1087 %1087 %1087 + %1089 = OpFMul %float %float_2 %1059 + %1090 = OpFDiv %float %1089 %1029 + %1091 = OpCompositeConstruct %v3float %1090 %1090 %1090 + %1092 = OpCompositeConstruct %v3float %1063 %1063 %1063 + %1093 = OpFSub %v3float %1067 %1092 + %1094 = OpFMul %v3float %1091 %1093 + %1095 = OpExtInst %v3float %1 Exp %1094 + %1096 = OpFAdd %v3float %135 %1095 + %1097 = OpFDiv %v3float %1088 %1096 + %1098 = OpFSub %v3float %1086 %1097 + %1099 = OpFOrdLessThan %v3bool %1067 %1079 + %1100 = OpSelect %v3float %1099 %1085 %1071 + %1101 = OpFOrdGreaterThan %v3bool %1067 %1092 + %1102 = OpSelect %v3float %1101 %1098 %1071 + %1103 = OpFSub %float %1063 %1056 + %1104 = OpCompositeConstruct %v3float %1103 %1103 %1103 + %1105 = OpFDiv %v3float %1080 %1104 + %1106 = OpExtInst %v3float %1 FClamp %1105 %132 %135 + %1107 = OpFOrdLessThan %bool %1063 %1056 + %1108 = OpFSub %v3float %135 %1106 + %1109 = OpCompositeConstruct %v3bool %1107 %1107 %1107 + %1110 = OpSelect %v3float %1109 %1108 %1106 + %1111 = OpFMul %v3float %239 %1110 + %1112 = OpFSub %v3float %238 %1111 + %1113 = OpFMul %v3float %1112 %1110 + %1114 = OpFMul %v3float %1113 %1110 + %1115 = OpExtInst %v3float %1 FMix %1100 %1102 %1114 + %1116 = OpDot %float %1115 %67 + %1117 = OpCompositeConstruct %v3float %1116 %1116 %1116 + %1118 = OpExtInst %v3float %1 FMix %1117 %1115 %241 + %1119 = OpExtInst %v3float %1 FMax %132 %1118 + %1120 = OpVectorTimesMatrix %v3float %1119 %910 + %1121 = OpExtInst %v3float %1 FMix %1119 %1120 %914 + %1122 = OpVectorTimesMatrix %v3float %1121 %549 + %1123 = OpExtInst %v3float %1 FMax %132 %1122 + %1124 = OpFOrdEqual %bool %720 %float_0 + OpSelectionMerge %1125 DontFlatten + OpBranchConditional %1124 %1126 %1125 + %1126 = OpLabel + %1127 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_2 + %1128 = OpLoad %v4float %1127 + %1129 = OpVectorShuffle %v3float %1128 %1128 0 1 2 + %1130 = OpDot %float %906 %1129 + %1131 = OpCompositeInsert %v3float %1130 %391 0 + %1132 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_3 + %1133 = OpLoad %v4float %1132 + %1134 = OpVectorShuffle %v3float %1133 %1133 0 1 2 + %1135 = OpDot %float %906 %1134 + %1136 = OpCompositeInsert %v3float %1135 %1131 1 + %1137 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_4 + %1138 = OpLoad %v4float %1137 + %1139 = OpVectorShuffle %v3float %1138 %1138 0 1 2 + %1140 = OpDot %float %906 %1139 + %1141 = OpCompositeInsert %v3float %1140 %1136 2 + %1142 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_8 + %1143 = OpLoad %v4float %1142 + %1144 = OpVectorShuffle %v3float %1143 %1143 0 1 2 + %1145 = OpLoad %v4float %718 + %1146 = OpVectorShuffle %v3float %1145 %1145 0 1 2 + %1147 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_7 + %1148 = OpLoad %v4float %1147 + %1149 = OpVectorShuffle %v3float %1148 %1148 0 1 2 + %1150 = OpDot %float %906 %1149 + %1151 = OpFAdd %float %1150 %float_1 + %1152 = OpFDiv %float %float_1 %1151 + %1153 = OpCompositeConstruct %v3float %1152 %1152 %1152 + %1154 = OpFMul %v3float %1146 %1153 + %1155 = OpFAdd %v3float %1144 %1154 + %1156 = OpFMul %v3float %1141 %1155 + %1157 = OpExtInst %v3float %1 FMax %132 %1156 + %1158 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_5 + %1159 = OpLoad %v4float %1158 + %1160 = OpVectorShuffle %v3float %1159 %1159 0 0 0 + %1161 = OpFSub %v3float %1160 %1157 + %1162 = OpExtInst %v3float %1 FMax %132 %1161 + %1163 = OpVectorShuffle %v3float %1159 %1159 2 2 2 + %1164 = OpExtInst %v3float %1 FMax %1157 %1163 + %1165 = OpExtInst %v3float %1 FClamp %1157 %1160 %1163 + %1166 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_6 + %1167 = OpLoad %v4float %1166 + %1168 = OpVectorShuffle %v3float %1167 %1167 0 0 0 + %1169 = OpFMul %v3float %1164 %1168 + %1170 = OpVectorShuffle %v3float %1167 %1167 1 1 1 + %1171 = OpFAdd %v3float %1169 %1170 + %1172 = OpVectorShuffle %v3float %1159 %1159 3 3 3 + %1173 = OpFAdd %v3float %1164 %1172 + %1174 = OpFDiv %v3float %135 %1173 + %1175 = OpFMul %v3float %1171 %1174 + %1176 = OpVectorShuffle %v3float %1138 %1138 3 3 3 + %1177 = OpFMul %v3float %1165 %1176 + %1178 = OpVectorShuffle %v3float %1128 %1128 3 3 3 + %1179 = OpFMul %v3float %1162 %1178 + %1180 = OpVectorShuffle %v3float %1159 %1159 1 1 1 + %1181 = OpFAdd %v3float %1162 %1180 + %1182 = OpFDiv %v3float %135 %1181 + %1183 = OpFMul %v3float %1179 %1182 + %1184 = OpVectorShuffle %v3float %1133 %1133 3 3 3 + %1185 = OpFAdd %v3float %1183 %1184 + %1186 = OpFAdd %v3float %1177 %1185 + %1187 = OpFAdd %v3float %1175 %1186 + %1188 = OpFSub %v3float %1187 %248 + OpBranch %1125 + %1125 = OpLabel + %1189 = OpPhi %v3float %1123 %1031 %1188 %1126 + %1190 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_0 + %1191 = OpLoad %float %1190 + %1192 = OpCompositeConstruct %v3float %1191 %1191 %1191 + %1193 = OpFMul %v3float %1189 %1189 + %1194 = OpFMul %v3float %1192 %1193 + %1195 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_1 + %1196 = OpLoad %float %1195 + %1197 = OpCompositeConstruct %v3float %1196 %1196 %1196 + %1198 = OpFMul %v3float %1197 %1189 + %1199 = OpFAdd %v3float %1194 %1198 + %1200 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_2 + %1201 = OpLoad %float %1200 + %1202 = OpCompositeConstruct %v3float %1201 %1201 %1201 + %1203 = OpFAdd %v3float %1199 %1202 + %1204 = OpAccessChain %_ptr_Uniform_v3float %_Globals %int_15 + %1205 = OpLoad %v3float %1204 + %1206 = OpFMul %v3float %1203 %1205 + %1207 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_16 + %1208 = OpLoad %v4float %1207 + %1209 = OpVectorShuffle %v3float %1208 %1208 0 1 2 + %1210 = OpAccessChain %_ptr_Uniform_float %_Globals %int_16 %int_3 + %1211 = OpLoad %float %1210 + %1212 = OpCompositeConstruct %v3float %1211 %1211 %1211 + %1213 = OpExtInst %v3float %1 FMix %1206 %1209 %1212 + %1214 = OpExtInst %v3float %1 FMax %132 %1213 + %1215 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %int_1 + %1216 = OpLoad %float %1215 + %1217 = OpCompositeConstruct %v3float %1216 %1216 %1216 + %1218 = OpExtInst %v3float %1 Pow %1214 %1217 + %1219 = OpIEqual %bool %579 %uint_0 + OpSelectionMerge %1220 DontFlatten + OpBranchConditional %1219 %1221 %1222 + %1222 = OpLabel + %1223 = OpIEqual %bool %579 %uint_1 + OpSelectionMerge %1224 None + OpBranchConditional %1223 %1225 %1226 + %1226 = OpLabel + %1227 = OpIEqual %bool %579 %uint_3 + %1228 = OpIEqual %bool %579 %uint_5 + %1229 = OpLogicalOr %bool %1227 %1228 + OpSelectionMerge %1230 None + OpBranchConditional %1229 %1231 %1232 + %1232 = OpLabel + %1233 = OpIEqual %bool %579 %uint_4 + %1234 = OpIEqual %bool %579 %uint_6 + %1235 = OpLogicalOr %bool %1233 %1234 + OpSelectionMerge %1236 None + OpBranchConditional %1235 %1237 %1238 + %1238 = OpLabel + %1239 = OpIEqual %bool %579 %uint_7 + OpSelectionMerge %1240 None + OpBranchConditional %1239 %1241 %1242 + %1242 = OpLabel + %1243 = OpVectorTimesMatrix %v3float %1218 %547 + %1244 = OpVectorTimesMatrix %v3float %1243 %576 + %1245 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %int_2 + %1246 = OpLoad %float %1245 + %1247 = OpCompositeConstruct %v3float %1246 %1246 %1246 + %1248 = OpExtInst %v3float %1 Pow %1244 %1247 + OpBranch %1240 + %1241 = OpLabel + %1249 = OpVectorTimesMatrix %v3float %906 %547 + %1250 = OpVectorTimesMatrix %v3float %1249 %576 + %1251 = OpFMul %v3float %1250 %496 + %1252 = OpExtInst %v3float %1 Pow %1251 %263 + %1253 = OpFMul %v3float %184 %1252 + %1254 = OpFAdd %v3float %183 %1253 + %1255 = OpFMul %v3float %185 %1252 + %1256 = OpFAdd %v3float %135 %1255 + %1257 = OpFDiv %v3float %135 %1256 + %1258 = OpFMul %v3float %1254 %1257 + %1259 = OpExtInst %v3float %1 Pow %1258 %264 + OpBranch %1240 + %1240 = OpLabel + %1260 = OpPhi %v3float %1248 %1242 %1259 %1241 + OpBranch %1236 + %1237 = OpLabel + %1261 = OpMatrixTimesMatrix %mat3v3float %546 %399 + %1262 = OpFMul %v3float %906 %262 + %1263 = OpVectorTimesMatrix %v3float %1262 %1261 + %1264 = OpCompositeExtract %float %1263 0 + %1265 = OpCompositeExtract %float %1263 1 + %1266 = OpExtInst %float %1 FMin %1264 %1265 + %1267 = OpCompositeExtract %float %1263 2 + %1268 = OpExtInst %float %1 FMin %1266 %1267 + %1269 = OpExtInst %float %1 FMax %1264 %1265 + %1270 = OpExtInst %float %1 FMax %1269 %1267 + %1271 = OpExtInst %float %1 FMax %1270 %float_1_00000001en10 + %1272 = OpExtInst %float %1 FMax %1268 %float_1_00000001en10 + %1273 = OpFSub %float %1271 %1272 + %1274 = OpExtInst %float %1 FMax %1270 %float_0_00999999978 + %1275 = OpFDiv %float %1273 %1274 + %1276 = OpFSub %float %1267 %1265 + %1277 = OpFMul %float %1267 %1276 + %1278 = OpFSub %float %1265 %1264 + %1279 = OpFMul %float %1265 %1278 + %1280 = OpFAdd %float %1277 %1279 + %1281 = OpFSub %float %1264 %1267 + %1282 = OpFMul %float %1264 %1281 + %1283 = OpFAdd %float %1280 %1282 + %1284 = OpExtInst %float %1 Sqrt %1283 + %1285 = OpFAdd %float %1267 %1265 + %1286 = OpFAdd %float %1285 %1264 + %1287 = OpFMul %float %float_1_75 %1284 + %1288 = OpFAdd %float %1286 %1287 + %1289 = OpFMul %float %1288 %float_0_333333343 + %1290 = OpFSub %float %1275 %float_0_400000006 + %1291 = OpFMul %float %1290 %float_5 + %1292 = OpFMul %float %1290 %float_2_5 + %1293 = OpExtInst %float %1 FAbs %1292 + %1294 = OpFSub %float %float_1 %1293 + %1295 = OpExtInst %float %1 FMax %1294 %float_0 + %1296 = OpExtInst %float %1 FSign %1291 + %1297 = OpConvertFToS %int %1296 + %1298 = OpConvertSToF %float %1297 + %1299 = OpFMul %float %1295 %1295 + %1300 = OpFSub %float %float_1 %1299 + %1301 = OpFMul %float %1298 %1300 + %1302 = OpFAdd %float %float_1 %1301 + %1303 = OpFMul %float %1302 %float_0_0250000004 + %1304 = OpFOrdLessThanEqual %bool %1289 %float_0_0533333346 + OpSelectionMerge %1305 None + OpBranchConditional %1304 %1306 %1307 + %1307 = OpLabel + %1308 = OpFOrdGreaterThanEqual %bool %1289 %float_0_159999996 + OpSelectionMerge %1309 None + OpBranchConditional %1308 %1310 %1311 + %1311 = OpLabel + %1312 = OpFDiv %float %float_0_239999995 %1288 + %1313 = OpFSub %float %1312 %float_0_5 + %1314 = OpFMul %float %1303 %1313 + OpBranch %1309 + %1310 = OpLabel + OpBranch %1309 + %1309 = OpLabel + %1315 = OpPhi %float %1314 %1311 %float_0 %1310 + OpBranch %1305 + %1306 = OpLabel + OpBranch %1305 + %1305 = OpLabel + %1316 = OpPhi %float %1315 %1309 %1303 %1306 + %1317 = OpFAdd %float %float_1 %1316 + %1318 = OpCompositeConstruct %v3float %1317 %1317 %1317 + %1319 = OpFMul %v3float %1263 %1318 + %1320 = OpCompositeExtract %float %1319 0 + %1321 = OpCompositeExtract %float %1319 1 + %1322 = OpFOrdEqual %bool %1320 %1321 + %1323 = OpCompositeExtract %float %1319 2 + %1324 = OpFOrdEqual %bool %1321 %1323 + %1325 = OpLogicalAnd %bool %1322 %1324 + OpSelectionMerge %1326 None + OpBranchConditional %1325 %1327 %1328 + %1328 = OpLabel + %1329 = OpExtInst %float %1 Sqrt %float_3 + %1330 = OpFSub %float %1321 %1323 + %1331 = OpFMul %float %1329 %1330 + %1332 = OpFMul %float %float_2 %1320 + %1333 = OpFSub %float %1332 %1321 + %1334 = OpFSub %float %1333 %1323 + %1335 = OpExtInst %float %1 Atan2 %1331 %1334 + %1336 = OpFMul %float %float_57_2957764 %1335 + OpBranch %1326 + %1327 = OpLabel + OpBranch %1326 + %1326 = OpLabel + %1337 = OpPhi %float %1336 %1328 %float_0 %1327 + %1338 = OpFOrdLessThan %bool %1337 %float_0 + OpSelectionMerge %1339 None + OpBranchConditional %1338 %1340 %1339 + %1340 = OpLabel + %1341 = OpFAdd %float %1337 %float_360 + OpBranch %1339 + %1339 = OpLabel + %1342 = OpPhi %float %1337 %1326 %1341 %1340 + %1343 = OpExtInst %float %1 FClamp %1342 %float_0 %float_360 + %1344 = OpFOrdGreaterThan %bool %1343 %float_180 + OpSelectionMerge %1345 None + OpBranchConditional %1344 %1346 %1345 + %1346 = OpLabel + %1347 = OpFSub %float %1343 %float_360 + OpBranch %1345 + %1345 = OpLabel + %1348 = OpPhi %float %1343 %1339 %1347 %1346 + %1349 = OpFOrdGreaterThan %bool %1348 %float_n67_5 + %1350 = OpFOrdLessThan %bool %1348 %float_67_5 + %1351 = OpLogicalAnd %bool %1349 %1350 + OpSelectionMerge %1352 None + OpBranchConditional %1351 %1353 %1352 + %1353 = OpLabel + %1354 = OpFSub %float %1348 %float_n67_5 + %1355 = OpFMul %float %1354 %float_0_0296296291 + %1356 = OpConvertFToS %int %1355 + %1357 = OpConvertSToF %float %1356 + %1358 = OpFSub %float %1355 %1357 + %1359 = OpFMul %float %1358 %1358 + %1360 = OpFMul %float %1359 %1358 + %1361 = OpIEqual %bool %1356 %int_3 + OpSelectionMerge %1362 None + OpBranchConditional %1361 %1363 %1364 + %1364 = OpLabel + %1365 = OpIEqual %bool %1356 %int_2 + OpSelectionMerge %1366 None + OpBranchConditional %1365 %1367 %1368 + %1368 = OpLabel + %1369 = OpIEqual %bool %1356 %int_1 + OpSelectionMerge %1370 None + OpBranchConditional %1369 %1371 %1372 + %1372 = OpLabel + %1373 = OpIEqual %bool %1356 %int_0 + OpSelectionMerge %1374 None + OpBranchConditional %1373 %1375 %1376 + %1376 = OpLabel + OpBranch %1374 + %1375 = OpLabel + %1377 = OpFMul %float %1360 %float_0_166666672 + OpBranch %1374 + %1374 = OpLabel + %1378 = OpPhi %float %float_0 %1376 %1377 %1375 + OpBranch %1370 + %1371 = OpLabel + %1379 = OpFMul %float %1360 %float_n0_5 + %1380 = OpFMul %float %1359 %float_0_5 + %1381 = OpFAdd %float %1379 %1380 + %1382 = OpFMul %float %1358 %float_0_5 + %1383 = OpFAdd %float %1381 %1382 + %1384 = OpFAdd %float %1383 %float_0_166666672 + OpBranch %1370 + %1370 = OpLabel + %1385 = OpPhi %float %1378 %1374 %1384 %1371 + OpBranch %1366 + %1367 = OpLabel + %1386 = OpFMul %float %1360 %float_0_5 + %1387 = OpFMul %float %1359 %float_n1 + %1388 = OpFAdd %float %1386 %1387 + %1389 = OpFAdd %float %1388 %float_0_666666687 + OpBranch %1366 + %1366 = OpLabel + %1390 = OpPhi %float %1385 %1370 %1389 %1367 + OpBranch %1362 + %1363 = OpLabel + %1391 = OpFMul %float %1360 %float_n0_166666672 + %1392 = OpFMul %float %1359 %float_0_5 + %1393 = OpFAdd %float %1391 %1392 + %1394 = OpFMul %float %1358 %float_n0_5 + %1395 = OpFAdd %float %1393 %1394 + %1396 = OpFAdd %float %1395 %float_0_166666672 + OpBranch %1362 + %1362 = OpLabel + %1397 = OpPhi %float %1390 %1366 %1396 %1363 + OpBranch %1352 + %1352 = OpLabel + %1398 = OpPhi %float %float_0 %1345 %1397 %1362 + %1399 = OpFMul %float %1398 %float_1_5 + %1400 = OpFMul %float %1399 %1275 + %1401 = OpFSub %float %float_0_0299999993 %1320 + %1402 = OpFMul %float %1400 %1401 + %1403 = OpFMul %float %1402 %float_0_180000007 + %1404 = OpFAdd %float %1320 %1403 + %1405 = OpCompositeInsert %v3float %1404 %1319 0 + %1406 = OpExtInst %v3float %1 FClamp %1405 %132 %314 + %1407 = OpVectorTimesMatrix %v3float %1406 %410 + %1408 = OpExtInst %v3float %1 FClamp %1407 %132 %314 + %1409 = OpDot %float %1408 %67 + %1410 = OpCompositeConstruct %v3float %1409 %1409 %1409 + %1411 = OpExtInst %v3float %1 FMix %1410 %1408 %228 + %1412 = OpCompositeExtract %float %1411 0 + %1413 = OpExtInst %float %1 Exp2 %float_n15 + %1414 = OpFMul %float %float_0_179999992 %1413 + %1415 = OpExtInst %float %1 Exp2 %float_18 + %1416 = OpFMul %float %float_0_179999992 %1415 + OpStore %502 %475 + OpStore %501 %476 + %1417 = OpFOrdLessThanEqual %bool %1412 %float_0 + %1418 = OpExtInst %float %1 Exp2 %float_n14 + %1419 = OpSelect %float %1417 %1418 %1412 + %1420 = OpExtInst %float %1 Log %1419 + %1421 = OpFDiv %float %1420 %1065 + %1422 = OpExtInst %float %1 Log %1414 + %1423 = OpFDiv %float %1422 %1065 + %1424 = OpFOrdLessThanEqual %bool %1421 %1423 + OpSelectionMerge %1425 None + OpBranchConditional %1424 %1426 %1427 + %1427 = OpLabel + %1428 = OpFOrdGreaterThan %bool %1421 %1423 + %1429 = OpExtInst %float %1 Log %float_0_180000007 + %1430 = OpFDiv %float %1429 %1065 + %1431 = OpFOrdLessThan %bool %1421 %1430 + %1432 = OpLogicalAnd %bool %1428 %1431 + OpSelectionMerge %1433 None + OpBranchConditional %1432 %1434 %1435 + %1435 = OpLabel + %1436 = OpFOrdGreaterThanEqual %bool %1421 %1430 + %1437 = OpExtInst %float %1 Log %1416 + %1438 = OpFDiv %float %1437 %1065 + %1439 = OpFOrdLessThan %bool %1421 %1438 + %1440 = OpLogicalAnd %bool %1436 %1439 + OpSelectionMerge %1441 None + OpBranchConditional %1440 %1442 %1443 + %1443 = OpLabel + %1444 = OpExtInst %float %1 Log %float_10000 + %1445 = OpFDiv %float %1444 %1065 + OpBranch %1441 + %1442 = OpLabel + %1446 = OpFSub %float %1421 %1430 + %1447 = OpFMul %float %float_3 %1446 + %1448 = OpFSub %float %1438 %1430 + %1449 = OpFDiv %float %1447 %1448 + %1450 = OpConvertFToS %int %1449 + %1451 = OpConvertSToF %float %1450 + %1452 = OpFSub %float %1449 %1451 + %1453 = OpAccessChain %_ptr_Function_float %501 %1450 + %1454 = OpLoad %float %1453 + %1455 = OpIAdd %int %1450 %int_1 + %1456 = OpAccessChain %_ptr_Function_float %501 %1455 + %1457 = OpLoad %float %1456 + %1458 = OpIAdd %int %1450 %int_2 + %1459 = OpAccessChain %_ptr_Function_float %501 %1458 + %1460 = OpLoad %float %1459 + %1461 = OpCompositeConstruct %v3float %1454 %1457 %1460 + %1462 = OpFMul %float %1452 %1452 + %1463 = OpCompositeConstruct %v3float %1462 %1452 %float_1 + %1464 = OpMatrixTimesVector %v3float %442 %1461 + %1465 = OpDot %float %1463 %1464 + OpBranch %1441 + %1441 = OpLabel + %1466 = OpPhi %float %1445 %1443 %1465 %1442 + OpBranch %1433 + %1434 = OpLabel + %1467 = OpFSub %float %1421 %1423 + %1468 = OpFMul %float %float_3 %1467 + %1469 = OpFSub %float %1430 %1423 + %1470 = OpFDiv %float %1468 %1469 + %1471 = OpConvertFToS %int %1470 + %1472 = OpConvertSToF %float %1471 + %1473 = OpFSub %float %1470 %1472 + %1474 = OpAccessChain %_ptr_Function_float %502 %1471 + %1475 = OpLoad %float %1474 + %1476 = OpIAdd %int %1471 %int_1 + %1477 = OpAccessChain %_ptr_Function_float %502 %1476 + %1478 = OpLoad %float %1477 + %1479 = OpIAdd %int %1471 %int_2 + %1480 = OpAccessChain %_ptr_Function_float %502 %1479 + %1481 = OpLoad %float %1480 + %1482 = OpCompositeConstruct %v3float %1475 %1478 %1481 + %1483 = OpFMul %float %1473 %1473 + %1484 = OpCompositeConstruct %v3float %1483 %1473 %float_1 + %1485 = OpMatrixTimesVector %v3float %442 %1482 + %1486 = OpDot %float %1484 %1485 + OpBranch %1433 + %1433 = OpLabel + %1487 = OpPhi %float %1466 %1441 %1486 %1434 + OpBranch %1425 + %1426 = OpLabel + %1488 = OpExtInst %float %1 Log %float_9_99999975en05 + %1489 = OpFDiv %float %1488 %1065 + OpBranch %1425 + %1425 = OpLabel + %1490 = OpPhi %float %1487 %1433 %1489 %1426 + %1491 = OpExtInst %float %1 Pow %float_10 %1490 + %1492 = OpCompositeInsert %v3float %1491 %391 0 + %1493 = OpCompositeExtract %float %1411 1 + OpStore %504 %475 + OpStore %503 %476 + %1494 = OpFOrdLessThanEqual %bool %1493 %float_0 + %1495 = OpSelect %float %1494 %1418 %1493 + %1496 = OpExtInst %float %1 Log %1495 + %1497 = OpFDiv %float %1496 %1065 + %1498 = OpFOrdLessThanEqual %bool %1497 %1423 + OpSelectionMerge %1499 None + OpBranchConditional %1498 %1500 %1501 + %1501 = OpLabel + %1502 = OpFOrdGreaterThan %bool %1497 %1423 + %1503 = OpExtInst %float %1 Log %float_0_180000007 + %1504 = OpFDiv %float %1503 %1065 + %1505 = OpFOrdLessThan %bool %1497 %1504 + %1506 = OpLogicalAnd %bool %1502 %1505 + OpSelectionMerge %1507 None + OpBranchConditional %1506 %1508 %1509 + %1509 = OpLabel + %1510 = OpFOrdGreaterThanEqual %bool %1497 %1504 + %1511 = OpExtInst %float %1 Log %1416 + %1512 = OpFDiv %float %1511 %1065 + %1513 = OpFOrdLessThan %bool %1497 %1512 + %1514 = OpLogicalAnd %bool %1510 %1513 + OpSelectionMerge %1515 None + OpBranchConditional %1514 %1516 %1517 + %1517 = OpLabel + %1518 = OpExtInst %float %1 Log %float_10000 + %1519 = OpFDiv %float %1518 %1065 + OpBranch %1515 + %1516 = OpLabel + %1520 = OpFSub %float %1497 %1504 + %1521 = OpFMul %float %float_3 %1520 + %1522 = OpFSub %float %1512 %1504 + %1523 = OpFDiv %float %1521 %1522 + %1524 = OpConvertFToS %int %1523 + %1525 = OpConvertSToF %float %1524 + %1526 = OpFSub %float %1523 %1525 + %1527 = OpAccessChain %_ptr_Function_float %503 %1524 + %1528 = OpLoad %float %1527 + %1529 = OpIAdd %int %1524 %int_1 + %1530 = OpAccessChain %_ptr_Function_float %503 %1529 + %1531 = OpLoad %float %1530 + %1532 = OpIAdd %int %1524 %int_2 + %1533 = OpAccessChain %_ptr_Function_float %503 %1532 + %1534 = OpLoad %float %1533 + %1535 = OpCompositeConstruct %v3float %1528 %1531 %1534 + %1536 = OpFMul %float %1526 %1526 + %1537 = OpCompositeConstruct %v3float %1536 %1526 %float_1 + %1538 = OpMatrixTimesVector %v3float %442 %1535 + %1539 = OpDot %float %1537 %1538 + OpBranch %1515 + %1515 = OpLabel + %1540 = OpPhi %float %1519 %1517 %1539 %1516 + OpBranch %1507 + %1508 = OpLabel + %1541 = OpFSub %float %1497 %1423 + %1542 = OpFMul %float %float_3 %1541 + %1543 = OpFSub %float %1504 %1423 + %1544 = OpFDiv %float %1542 %1543 + %1545 = OpConvertFToS %int %1544 + %1546 = OpConvertSToF %float %1545 + %1547 = OpFSub %float %1544 %1546 + %1548 = OpAccessChain %_ptr_Function_float %504 %1545 + %1549 = OpLoad %float %1548 + %1550 = OpIAdd %int %1545 %int_1 + %1551 = OpAccessChain %_ptr_Function_float %504 %1550 + %1552 = OpLoad %float %1551 + %1553 = OpIAdd %int %1545 %int_2 + %1554 = OpAccessChain %_ptr_Function_float %504 %1553 + %1555 = OpLoad %float %1554 + %1556 = OpCompositeConstruct %v3float %1549 %1552 %1555 + %1557 = OpFMul %float %1547 %1547 + %1558 = OpCompositeConstruct %v3float %1557 %1547 %float_1 + %1559 = OpMatrixTimesVector %v3float %442 %1556 + %1560 = OpDot %float %1558 %1559 + OpBranch %1507 + %1507 = OpLabel + %1561 = OpPhi %float %1540 %1515 %1560 %1508 + OpBranch %1499 + %1500 = OpLabel + %1562 = OpExtInst %float %1 Log %float_9_99999975en05 + %1563 = OpFDiv %float %1562 %1065 + OpBranch %1499 + %1499 = OpLabel + %1564 = OpPhi %float %1561 %1507 %1563 %1500 + %1565 = OpExtInst %float %1 Pow %float_10 %1564 + %1566 = OpCompositeInsert %v3float %1565 %1492 1 + %1567 = OpCompositeExtract %float %1411 2 + OpStore %506 %475 + OpStore %505 %476 + %1568 = OpFOrdLessThanEqual %bool %1567 %float_0 + %1569 = OpSelect %float %1568 %1418 %1567 + %1570 = OpExtInst %float %1 Log %1569 + %1571 = OpFDiv %float %1570 %1065 + %1572 = OpFOrdLessThanEqual %bool %1571 %1423 + OpSelectionMerge %1573 None + OpBranchConditional %1572 %1574 %1575 + %1575 = OpLabel + %1576 = OpFOrdGreaterThan %bool %1571 %1423 + %1577 = OpExtInst %float %1 Log %float_0_180000007 + %1578 = OpFDiv %float %1577 %1065 + %1579 = OpFOrdLessThan %bool %1571 %1578 + %1580 = OpLogicalAnd %bool %1576 %1579 + OpSelectionMerge %1581 None + OpBranchConditional %1580 %1582 %1583 + %1583 = OpLabel + %1584 = OpFOrdGreaterThanEqual %bool %1571 %1578 + %1585 = OpExtInst %float %1 Log %1416 + %1586 = OpFDiv %float %1585 %1065 + %1587 = OpFOrdLessThan %bool %1571 %1586 + %1588 = OpLogicalAnd %bool %1584 %1587 + OpSelectionMerge %1589 None + OpBranchConditional %1588 %1590 %1591 + %1591 = OpLabel + %1592 = OpExtInst %float %1 Log %float_10000 + %1593 = OpFDiv %float %1592 %1065 + OpBranch %1589 + %1590 = OpLabel + %1594 = OpFSub %float %1571 %1578 + %1595 = OpFMul %float %float_3 %1594 + %1596 = OpFSub %float %1586 %1578 + %1597 = OpFDiv %float %1595 %1596 + %1598 = OpConvertFToS %int %1597 + %1599 = OpConvertSToF %float %1598 + %1600 = OpFSub %float %1597 %1599 + %1601 = OpAccessChain %_ptr_Function_float %505 %1598 + %1602 = OpLoad %float %1601 + %1603 = OpIAdd %int %1598 %int_1 + %1604 = OpAccessChain %_ptr_Function_float %505 %1603 + %1605 = OpLoad %float %1604 + %1606 = OpIAdd %int %1598 %int_2 + %1607 = OpAccessChain %_ptr_Function_float %505 %1606 + %1608 = OpLoad %float %1607 + %1609 = OpCompositeConstruct %v3float %1602 %1605 %1608 + %1610 = OpFMul %float %1600 %1600 + %1611 = OpCompositeConstruct %v3float %1610 %1600 %float_1 + %1612 = OpMatrixTimesVector %v3float %442 %1609 + %1613 = OpDot %float %1611 %1612 + OpBranch %1589 + %1589 = OpLabel + %1614 = OpPhi %float %1593 %1591 %1613 %1590 + OpBranch %1581 + %1582 = OpLabel + %1615 = OpFSub %float %1571 %1423 + %1616 = OpFMul %float %float_3 %1615 + %1617 = OpFSub %float %1578 %1423 + %1618 = OpFDiv %float %1616 %1617 + %1619 = OpConvertFToS %int %1618 + %1620 = OpConvertSToF %float %1619 + %1621 = OpFSub %float %1618 %1620 + %1622 = OpAccessChain %_ptr_Function_float %506 %1619 + %1623 = OpLoad %float %1622 + %1624 = OpIAdd %int %1619 %int_1 + %1625 = OpAccessChain %_ptr_Function_float %506 %1624 + %1626 = OpLoad %float %1625 + %1627 = OpIAdd %int %1619 %int_2 + %1628 = OpAccessChain %_ptr_Function_float %506 %1627 + %1629 = OpLoad %float %1628 + %1630 = OpCompositeConstruct %v3float %1623 %1626 %1629 + %1631 = OpFMul %float %1621 %1621 + %1632 = OpCompositeConstruct %v3float %1631 %1621 %float_1 + %1633 = OpMatrixTimesVector %v3float %442 %1630 + %1634 = OpDot %float %1632 %1633 + OpBranch %1581 + %1581 = OpLabel + %1635 = OpPhi %float %1614 %1589 %1634 %1582 + OpBranch %1573 + %1574 = OpLabel + %1636 = OpExtInst %float %1 Log %float_9_99999975en05 + %1637 = OpFDiv %float %1636 %1065 + OpBranch %1573 + %1573 = OpLabel + %1638 = OpPhi %float %1635 %1581 %1637 %1574 + %1639 = OpExtInst %float %1 Pow %float_10 %1638 + %1640 = OpCompositeInsert %v3float %1639 %1566 2 + %1641 = OpVectorTimesMatrix %v3float %1640 %414 + %1642 = OpVectorTimesMatrix %v3float %1641 %410 + %1643 = OpExtInst %float %1 Pow %float_2 %float_n12 + %1644 = OpFMul %float %float_0_179999992 %1643 + OpStore %514 %475 + OpStore %513 %476 + %1645 = OpFOrdLessThanEqual %bool %1644 %float_0 + %1646 = OpSelect %float %1645 %1418 %1644 + %1647 = OpExtInst %float %1 Log %1646 + %1648 = OpFDiv %float %1647 %1065 + %1649 = OpFOrdLessThanEqual %bool %1648 %1423 + OpSelectionMerge %1650 None + OpBranchConditional %1649 %1651 %1652 + %1652 = OpLabel + %1653 = OpFOrdGreaterThan %bool %1648 %1423 + %1654 = OpExtInst %float %1 Log %float_0_180000007 + %1655 = OpFDiv %float %1654 %1065 + %1656 = OpFOrdLessThan %bool %1648 %1655 + %1657 = OpLogicalAnd %bool %1653 %1656 + OpSelectionMerge %1658 None + OpBranchConditional %1657 %1659 %1660 + %1660 = OpLabel + %1661 = OpFOrdGreaterThanEqual %bool %1648 %1655 + %1662 = OpExtInst %float %1 Log %1416 + %1663 = OpFDiv %float %1662 %1065 + %1664 = OpFOrdLessThan %bool %1648 %1663 + %1665 = OpLogicalAnd %bool %1661 %1664 + OpSelectionMerge %1666 None + OpBranchConditional %1665 %1667 %1668 + %1668 = OpLabel + %1669 = OpExtInst %float %1 Log %float_10000 + %1670 = OpFDiv %float %1669 %1065 + OpBranch %1666 + %1667 = OpLabel + %1671 = OpFSub %float %1648 %1655 + %1672 = OpFMul %float %float_3 %1671 + %1673 = OpFSub %float %1663 %1655 + %1674 = OpFDiv %float %1672 %1673 + %1675 = OpConvertFToS %int %1674 + %1676 = OpConvertSToF %float %1675 + %1677 = OpFSub %float %1674 %1676 + %1678 = OpAccessChain %_ptr_Function_float %513 %1675 + %1679 = OpLoad %float %1678 + %1680 = OpIAdd %int %1675 %int_1 + %1681 = OpAccessChain %_ptr_Function_float %513 %1680 + %1682 = OpLoad %float %1681 + %1683 = OpIAdd %int %1675 %int_2 + %1684 = OpAccessChain %_ptr_Function_float %513 %1683 + %1685 = OpLoad %float %1684 + %1686 = OpCompositeConstruct %v3float %1679 %1682 %1685 + %1687 = OpFMul %float %1677 %1677 + %1688 = OpCompositeConstruct %v3float %1687 %1677 %float_1 + %1689 = OpMatrixTimesVector %v3float %442 %1686 + %1690 = OpDot %float %1688 %1689 + OpBranch %1666 + %1666 = OpLabel + %1691 = OpPhi %float %1670 %1668 %1690 %1667 + OpBranch %1658 + %1659 = OpLabel + %1692 = OpFSub %float %1648 %1423 + %1693 = OpFMul %float %float_3 %1692 + %1694 = OpFSub %float %1655 %1423 + %1695 = OpFDiv %float %1693 %1694 + %1696 = OpConvertFToS %int %1695 + %1697 = OpConvertSToF %float %1696 + %1698 = OpFSub %float %1695 %1697 + %1699 = OpAccessChain %_ptr_Function_float %514 %1696 + %1700 = OpLoad %float %1699 + %1701 = OpIAdd %int %1696 %int_1 + %1702 = OpAccessChain %_ptr_Function_float %514 %1701 + %1703 = OpLoad %float %1702 + %1704 = OpIAdd %int %1696 %int_2 + %1705 = OpAccessChain %_ptr_Function_float %514 %1704 + %1706 = OpLoad %float %1705 + %1707 = OpCompositeConstruct %v3float %1700 %1703 %1706 + %1708 = OpFMul %float %1698 %1698 + %1709 = OpCompositeConstruct %v3float %1708 %1698 %float_1 + %1710 = OpMatrixTimesVector %v3float %442 %1707 + %1711 = OpDot %float %1709 %1710 + OpBranch %1658 + %1658 = OpLabel + %1712 = OpPhi %float %1691 %1666 %1711 %1659 + OpBranch %1650 + %1651 = OpLabel + %1713 = OpExtInst %float %1 Log %float_9_99999975en05 + %1714 = OpFDiv %float %1713 %1065 + OpBranch %1650 + %1650 = OpLabel + %1715 = OpPhi %float %1712 %1658 %1714 %1651 + %1716 = OpExtInst %float %1 Pow %float_10 %1715 + OpStore %516 %475 + OpStore %515 %476 + %1717 = OpExtInst %float %1 Log %float_0_180000007 + %1718 = OpFDiv %float %1717 %1065 + %1719 = OpFOrdLessThanEqual %bool %1718 %1423 + OpSelectionMerge %1720 None + OpBranchConditional %1719 %1721 %1722 + %1722 = OpLabel + %1723 = OpFOrdGreaterThan %bool %1718 %1423 + %1724 = OpFOrdLessThan %bool %1718 %1718 + %1725 = OpLogicalAnd %bool %1723 %1724 + OpSelectionMerge %1726 None + OpBranchConditional %1725 %1727 %1728 + %1728 = OpLabel + %1729 = OpFOrdGreaterThanEqual %bool %1718 %1718 + %1730 = OpExtInst %float %1 Log %1416 + %1731 = OpFDiv %float %1730 %1065 + %1732 = OpFOrdLessThan %bool %1718 %1731 + %1733 = OpLogicalAnd %bool %1729 %1732 + OpSelectionMerge %1734 None + OpBranchConditional %1733 %1735 %1736 + %1736 = OpLabel + %1737 = OpExtInst %float %1 Log %float_10000 + %1738 = OpFDiv %float %1737 %1065 + OpBranch %1734 + %1735 = OpLabel + %1739 = OpFSub %float %1718 %1718 + %1740 = OpFMul %float %float_3 %1739 + %1741 = OpFSub %float %1731 %1718 + %1742 = OpFDiv %float %1740 %1741 + %1743 = OpConvertFToS %int %1742 + %1744 = OpConvertSToF %float %1743 + %1745 = OpFSub %float %1742 %1744 + %1746 = OpAccessChain %_ptr_Function_float %515 %1743 + %1747 = OpLoad %float %1746 + %1748 = OpIAdd %int %1743 %int_1 + %1749 = OpAccessChain %_ptr_Function_float %515 %1748 + %1750 = OpLoad %float %1749 + %1751 = OpIAdd %int %1743 %int_2 + %1752 = OpAccessChain %_ptr_Function_float %515 %1751 + %1753 = OpLoad %float %1752 + %1754 = OpCompositeConstruct %v3float %1747 %1750 %1753 + %1755 = OpFMul %float %1745 %1745 + %1756 = OpCompositeConstruct %v3float %1755 %1745 %float_1 + %1757 = OpMatrixTimesVector %v3float %442 %1754 + %1758 = OpDot %float %1756 %1757 + OpBranch %1734 + %1734 = OpLabel + %1759 = OpPhi %float %1738 %1736 %1758 %1735 + OpBranch %1726 + %1727 = OpLabel + %1760 = OpFSub %float %1718 %1423 + %1761 = OpFMul %float %float_3 %1760 + %1762 = OpAccessChain %_ptr_Function_float %516 %int_3 + %1763 = OpLoad %float %1762 + %1764 = OpAccessChain %_ptr_Function_float %516 %int_4 + %1765 = OpLoad %float %1764 + %1766 = OpAccessChain %_ptr_Function_float %516 %int_5 + %1767 = OpLoad %float %1766 + %1768 = OpCompositeConstruct %v3float %1763 %1765 %1767 + %1769 = OpMatrixTimesVector %v3float %442 %1768 + %1770 = OpCompositeExtract %float %1769 2 + OpBranch %1726 + %1726 = OpLabel + %1771 = OpPhi %float %1759 %1734 %1770 %1727 + OpBranch %1720 + %1721 = OpLabel + %1772 = OpExtInst %float %1 Log %float_9_99999975en05 + %1773 = OpFDiv %float %1772 %1065 + OpBranch %1720 + %1720 = OpLabel + %1774 = OpPhi %float %1771 %1726 %1773 %1721 + %1775 = OpExtInst %float %1 Pow %float_10 %1774 + %1776 = OpExtInst %float %1 Pow %float_2 %float_11 + %1777 = OpFMul %float %float_0_179999992 %1776 + OpStore %518 %475 + OpStore %517 %476 + %1778 = OpFOrdLessThanEqual %bool %1777 %float_0 + %1779 = OpSelect %float %1778 %1418 %1777 + %1780 = OpExtInst %float %1 Log %1779 + %1781 = OpFDiv %float %1780 %1065 + %1782 = OpFOrdLessThanEqual %bool %1781 %1423 + OpSelectionMerge %1783 None + OpBranchConditional %1782 %1784 %1785 + %1785 = OpLabel + %1786 = OpFOrdGreaterThan %bool %1781 %1423 + %1787 = OpFOrdLessThan %bool %1781 %1718 + %1788 = OpLogicalAnd %bool %1786 %1787 + OpSelectionMerge %1789 None + OpBranchConditional %1788 %1790 %1791 + %1791 = OpLabel + %1792 = OpFOrdGreaterThanEqual %bool %1781 %1718 + %1793 = OpExtInst %float %1 Log %1416 + %1794 = OpFDiv %float %1793 %1065 + %1795 = OpFOrdLessThan %bool %1781 %1794 + %1796 = OpLogicalAnd %bool %1792 %1795 + OpSelectionMerge %1797 None + OpBranchConditional %1796 %1798 %1799 + %1799 = OpLabel + %1800 = OpExtInst %float %1 Log %float_10000 + %1801 = OpFDiv %float %1800 %1065 + OpBranch %1797 + %1798 = OpLabel + %1802 = OpFSub %float %1781 %1718 + %1803 = OpFMul %float %float_3 %1802 + %1804 = OpFSub %float %1794 %1718 + %1805 = OpFDiv %float %1803 %1804 + %1806 = OpConvertFToS %int %1805 + %1807 = OpConvertSToF %float %1806 + %1808 = OpFSub %float %1805 %1807 + %1809 = OpAccessChain %_ptr_Function_float %517 %1806 + %1810 = OpLoad %float %1809 + %1811 = OpIAdd %int %1806 %int_1 + %1812 = OpAccessChain %_ptr_Function_float %517 %1811 + %1813 = OpLoad %float %1812 + %1814 = OpIAdd %int %1806 %int_2 + %1815 = OpAccessChain %_ptr_Function_float %517 %1814 + %1816 = OpLoad %float %1815 + %1817 = OpCompositeConstruct %v3float %1810 %1813 %1816 + %1818 = OpFMul %float %1808 %1808 + %1819 = OpCompositeConstruct %v3float %1818 %1808 %float_1 + %1820 = OpMatrixTimesVector %v3float %442 %1817 + %1821 = OpDot %float %1819 %1820 + OpBranch %1797 + %1797 = OpLabel + %1822 = OpPhi %float %1801 %1799 %1821 %1798 + OpBranch %1789 + %1790 = OpLabel + %1823 = OpFSub %float %1781 %1423 + %1824 = OpFMul %float %float_3 %1823 + %1825 = OpFSub %float %1718 %1423 + %1826 = OpFDiv %float %1824 %1825 + %1827 = OpConvertFToS %int %1826 + %1828 = OpConvertSToF %float %1827 + %1829 = OpFSub %float %1826 %1828 + %1830 = OpAccessChain %_ptr_Function_float %518 %1827 + %1831 = OpLoad %float %1830 + %1832 = OpIAdd %int %1827 %int_1 + %1833 = OpAccessChain %_ptr_Function_float %518 %1832 + %1834 = OpLoad %float %1833 + %1835 = OpIAdd %int %1827 %int_2 + %1836 = OpAccessChain %_ptr_Function_float %518 %1835 + %1837 = OpLoad %float %1836 + %1838 = OpCompositeConstruct %v3float %1831 %1834 %1837 + %1839 = OpFMul %float %1829 %1829 + %1840 = OpCompositeConstruct %v3float %1839 %1829 %float_1 + %1841 = OpMatrixTimesVector %v3float %442 %1838 + %1842 = OpDot %float %1840 %1841 + OpBranch %1789 + %1789 = OpLabel + %1843 = OpPhi %float %1822 %1797 %1842 %1790 + OpBranch %1783 + %1784 = OpLabel + %1844 = OpExtInst %float %1 Log %float_9_99999975en05 + %1845 = OpFDiv %float %1844 %1065 + OpBranch %1783 + %1783 = OpLabel + %1846 = OpPhi %float %1843 %1789 %1845 %1784 + %1847 = OpExtInst %float %1 Pow %float_10 %1846 + %1848 = OpCompositeExtract %float %1642 0 + OpStore %512 %482 + OpStore %511 %483 + %1849 = OpFOrdLessThanEqual %bool %1848 %float_0 + %1850 = OpSelect %float %1849 %float_9_99999975en05 %1848 + %1851 = OpExtInst %float %1 Log %1850 + %1852 = OpFDiv %float %1851 %1065 + %1853 = OpExtInst %float %1 Log %1716 + %1854 = OpFDiv %float %1853 %1065 + %1855 = OpFOrdLessThanEqual %bool %1852 %1854 + OpSelectionMerge %1856 None + OpBranchConditional %1855 %1857 %1858 + %1858 = OpLabel + %1859 = OpFOrdGreaterThan %bool %1852 %1854 + %1860 = OpExtInst %float %1 Log %1775 + %1861 = OpFDiv %float %1860 %1065 + %1862 = OpFOrdLessThan %bool %1852 %1861 + %1863 = OpLogicalAnd %bool %1859 %1862 + OpSelectionMerge %1864 None + OpBranchConditional %1863 %1865 %1866 + %1866 = OpLabel + %1867 = OpFOrdGreaterThanEqual %bool %1852 %1861 + %1868 = OpExtInst %float %1 Log %1847 + %1869 = OpFDiv %float %1868 %1065 + %1870 = OpFOrdLessThan %bool %1852 %1869 + %1871 = OpLogicalAnd %bool %1867 %1870 + OpSelectionMerge %1872 None + OpBranchConditional %1871 %1873 %1874 + %1874 = OpLabel + %1875 = OpFMul %float %1852 %float_0_119999997 + %1876 = OpExtInst %float %1 Log %float_2000 + %1877 = OpFDiv %float %1876 %1065 + %1878 = OpFMul %float %float_0_119999997 %1868 + %1879 = OpFDiv %float %1878 %1065 + %1880 = OpFSub %float %1877 %1879 + %1881 = OpFAdd %float %1875 %1880 + OpBranch %1872 + %1873 = OpLabel + %1882 = OpFSub %float %1852 %1861 + %1883 = OpFMul %float %float_7 %1882 + %1884 = OpFSub %float %1869 %1861 + %1885 = OpFDiv %float %1883 %1884 + %1886 = OpConvertFToS %int %1885 + %1887 = OpConvertSToF %float %1886 + %1888 = OpFSub %float %1885 %1887 + %1889 = OpAccessChain %_ptr_Function_float %511 %1886 + %1890 = OpLoad %float %1889 + %1891 = OpIAdd %int %1886 %int_1 + %1892 = OpAccessChain %_ptr_Function_float %511 %1891 + %1893 = OpLoad %float %1892 + %1894 = OpIAdd %int %1886 %int_2 + %1895 = OpAccessChain %_ptr_Function_float %511 %1894 + %1896 = OpLoad %float %1895 + %1897 = OpCompositeConstruct %v3float %1890 %1893 %1896 + %1898 = OpFMul %float %1888 %1888 + %1899 = OpCompositeConstruct %v3float %1898 %1888 %float_1 + %1900 = OpMatrixTimesVector %v3float %442 %1897 + %1901 = OpDot %float %1899 %1900 + OpBranch %1872 + %1872 = OpLabel + %1902 = OpPhi %float %1881 %1874 %1901 %1873 + OpBranch %1864 + %1865 = OpLabel + %1903 = OpFSub %float %1852 %1854 + %1904 = OpFMul %float %float_7 %1903 + %1905 = OpFSub %float %1861 %1854 + %1906 = OpFDiv %float %1904 %1905 + %1907 = OpConvertFToS %int %1906 + %1908 = OpConvertSToF %float %1907 + %1909 = OpFSub %float %1906 %1908 + %1910 = OpAccessChain %_ptr_Function_float %512 %1907 + %1911 = OpLoad %float %1910 + %1912 = OpIAdd %int %1907 %int_1 + %1913 = OpAccessChain %_ptr_Function_float %512 %1912 + %1914 = OpLoad %float %1913 + %1915 = OpIAdd %int %1907 %int_2 + %1916 = OpAccessChain %_ptr_Function_float %512 %1915 + %1917 = OpLoad %float %1916 + %1918 = OpCompositeConstruct %v3float %1911 %1914 %1917 + %1919 = OpFMul %float %1909 %1909 + %1920 = OpCompositeConstruct %v3float %1919 %1909 %float_1 + %1921 = OpMatrixTimesVector %v3float %442 %1918 + %1922 = OpDot %float %1920 %1921 + OpBranch %1864 + %1864 = OpLabel + %1923 = OpPhi %float %1902 %1872 %1922 %1865 + OpBranch %1856 + %1857 = OpLabel + %1924 = OpExtInst %float %1 Log %float_0_00499999989 + %1925 = OpFDiv %float %1924 %1065 + OpBranch %1856 + %1856 = OpLabel + %1926 = OpPhi %float %1923 %1864 %1925 %1857 + %1927 = OpExtInst %float %1 Pow %float_10 %1926 + %1928 = OpCompositeInsert %v3float %1927 %391 0 + %1929 = OpCompositeExtract %float %1642 1 + OpStore %510 %482 + OpStore %509 %483 + %1930 = OpFOrdLessThanEqual %bool %1929 %float_0 + %1931 = OpSelect %float %1930 %float_9_99999975en05 %1929 + %1932 = OpExtInst %float %1 Log %1931 + %1933 = OpFDiv %float %1932 %1065 + %1934 = OpFOrdLessThanEqual %bool %1933 %1854 + OpSelectionMerge %1935 None + OpBranchConditional %1934 %1936 %1937 + %1937 = OpLabel + %1938 = OpFOrdGreaterThan %bool %1933 %1854 + %1939 = OpExtInst %float %1 Log %1775 + %1940 = OpFDiv %float %1939 %1065 + %1941 = OpFOrdLessThan %bool %1933 %1940 + %1942 = OpLogicalAnd %bool %1938 %1941 + OpSelectionMerge %1943 None + OpBranchConditional %1942 %1944 %1945 + %1945 = OpLabel + %1946 = OpFOrdGreaterThanEqual %bool %1933 %1940 + %1947 = OpExtInst %float %1 Log %1847 + %1948 = OpFDiv %float %1947 %1065 + %1949 = OpFOrdLessThan %bool %1933 %1948 + %1950 = OpLogicalAnd %bool %1946 %1949 + OpSelectionMerge %1951 None + OpBranchConditional %1950 %1952 %1953 + %1953 = OpLabel + %1954 = OpFMul %float %1933 %float_0_119999997 + %1955 = OpExtInst %float %1 Log %float_2000 + %1956 = OpFDiv %float %1955 %1065 + %1957 = OpFMul %float %float_0_119999997 %1947 + %1958 = OpFDiv %float %1957 %1065 + %1959 = OpFSub %float %1956 %1958 + %1960 = OpFAdd %float %1954 %1959 + OpBranch %1951 + %1952 = OpLabel + %1961 = OpFSub %float %1933 %1940 + %1962 = OpFMul %float %float_7 %1961 + %1963 = OpFSub %float %1948 %1940 + %1964 = OpFDiv %float %1962 %1963 + %1965 = OpConvertFToS %int %1964 + %1966 = OpConvertSToF %float %1965 + %1967 = OpFSub %float %1964 %1966 + %1968 = OpAccessChain %_ptr_Function_float %509 %1965 + %1969 = OpLoad %float %1968 + %1970 = OpIAdd %int %1965 %int_1 + %1971 = OpAccessChain %_ptr_Function_float %509 %1970 + %1972 = OpLoad %float %1971 + %1973 = OpIAdd %int %1965 %int_2 + %1974 = OpAccessChain %_ptr_Function_float %509 %1973 + %1975 = OpLoad %float %1974 + %1976 = OpCompositeConstruct %v3float %1969 %1972 %1975 + %1977 = OpFMul %float %1967 %1967 + %1978 = OpCompositeConstruct %v3float %1977 %1967 %float_1 + %1979 = OpMatrixTimesVector %v3float %442 %1976 + %1980 = OpDot %float %1978 %1979 + OpBranch %1951 + %1951 = OpLabel + %1981 = OpPhi %float %1960 %1953 %1980 %1952 + OpBranch %1943 + %1944 = OpLabel + %1982 = OpFSub %float %1933 %1854 + %1983 = OpFMul %float %float_7 %1982 + %1984 = OpFSub %float %1940 %1854 + %1985 = OpFDiv %float %1983 %1984 + %1986 = OpConvertFToS %int %1985 + %1987 = OpConvertSToF %float %1986 + %1988 = OpFSub %float %1985 %1987 + %1989 = OpAccessChain %_ptr_Function_float %510 %1986 + %1990 = OpLoad %float %1989 + %1991 = OpIAdd %int %1986 %int_1 + %1992 = OpAccessChain %_ptr_Function_float %510 %1991 + %1993 = OpLoad %float %1992 + %1994 = OpIAdd %int %1986 %int_2 + %1995 = OpAccessChain %_ptr_Function_float %510 %1994 + %1996 = OpLoad %float %1995 + %1997 = OpCompositeConstruct %v3float %1990 %1993 %1996 + %1998 = OpFMul %float %1988 %1988 + %1999 = OpCompositeConstruct %v3float %1998 %1988 %float_1 + %2000 = OpMatrixTimesVector %v3float %442 %1997 + %2001 = OpDot %float %1999 %2000 + OpBranch %1943 + %1943 = OpLabel + %2002 = OpPhi %float %1981 %1951 %2001 %1944 + OpBranch %1935 + %1936 = OpLabel + %2003 = OpExtInst %float %1 Log %float_0_00499999989 + %2004 = OpFDiv %float %2003 %1065 + OpBranch %1935 + %1935 = OpLabel + %2005 = OpPhi %float %2002 %1943 %2004 %1936 + %2006 = OpExtInst %float %1 Pow %float_10 %2005 + %2007 = OpCompositeInsert %v3float %2006 %1928 1 + %2008 = OpCompositeExtract %float %1642 2 + OpStore %508 %482 + OpStore %507 %483 + %2009 = OpFOrdLessThanEqual %bool %2008 %float_0 + %2010 = OpSelect %float %2009 %float_9_99999975en05 %2008 + %2011 = OpExtInst %float %1 Log %2010 + %2012 = OpFDiv %float %2011 %1065 + %2013 = OpFOrdLessThanEqual %bool %2012 %1854 + OpSelectionMerge %2014 None + OpBranchConditional %2013 %2015 %2016 + %2016 = OpLabel + %2017 = OpFOrdGreaterThan %bool %2012 %1854 + %2018 = OpExtInst %float %1 Log %1775 + %2019 = OpFDiv %float %2018 %1065 + %2020 = OpFOrdLessThan %bool %2012 %2019 + %2021 = OpLogicalAnd %bool %2017 %2020 + OpSelectionMerge %2022 None + OpBranchConditional %2021 %2023 %2024 + %2024 = OpLabel + %2025 = OpFOrdGreaterThanEqual %bool %2012 %2019 + %2026 = OpExtInst %float %1 Log %1847 + %2027 = OpFDiv %float %2026 %1065 + %2028 = OpFOrdLessThan %bool %2012 %2027 + %2029 = OpLogicalAnd %bool %2025 %2028 + OpSelectionMerge %2030 None + OpBranchConditional %2029 %2031 %2032 + %2032 = OpLabel + %2033 = OpFMul %float %2012 %float_0_119999997 + %2034 = OpExtInst %float %1 Log %float_2000 + %2035 = OpFDiv %float %2034 %1065 + %2036 = OpFMul %float %float_0_119999997 %2026 + %2037 = OpFDiv %float %2036 %1065 + %2038 = OpFSub %float %2035 %2037 + %2039 = OpFAdd %float %2033 %2038 + OpBranch %2030 + %2031 = OpLabel + %2040 = OpFSub %float %2012 %2019 + %2041 = OpFMul %float %float_7 %2040 + %2042 = OpFSub %float %2027 %2019 + %2043 = OpFDiv %float %2041 %2042 + %2044 = OpConvertFToS %int %2043 + %2045 = OpConvertSToF %float %2044 + %2046 = OpFSub %float %2043 %2045 + %2047 = OpAccessChain %_ptr_Function_float %507 %2044 + %2048 = OpLoad %float %2047 + %2049 = OpIAdd %int %2044 %int_1 + %2050 = OpAccessChain %_ptr_Function_float %507 %2049 + %2051 = OpLoad %float %2050 + %2052 = OpIAdd %int %2044 %int_2 + %2053 = OpAccessChain %_ptr_Function_float %507 %2052 + %2054 = OpLoad %float %2053 + %2055 = OpCompositeConstruct %v3float %2048 %2051 %2054 + %2056 = OpFMul %float %2046 %2046 + %2057 = OpCompositeConstruct %v3float %2056 %2046 %float_1 + %2058 = OpMatrixTimesVector %v3float %442 %2055 + %2059 = OpDot %float %2057 %2058 + OpBranch %2030 + %2030 = OpLabel + %2060 = OpPhi %float %2039 %2032 %2059 %2031 + OpBranch %2022 + %2023 = OpLabel + %2061 = OpFSub %float %2012 %1854 + %2062 = OpFMul %float %float_7 %2061 + %2063 = OpFSub %float %2019 %1854 + %2064 = OpFDiv %float %2062 %2063 + %2065 = OpConvertFToS %int %2064 + %2066 = OpConvertSToF %float %2065 + %2067 = OpFSub %float %2064 %2066 + %2068 = OpAccessChain %_ptr_Function_float %508 %2065 + %2069 = OpLoad %float %2068 + %2070 = OpIAdd %int %2065 %int_1 + %2071 = OpAccessChain %_ptr_Function_float %508 %2070 + %2072 = OpLoad %float %2071 + %2073 = OpIAdd %int %2065 %int_2 + %2074 = OpAccessChain %_ptr_Function_float %508 %2073 + %2075 = OpLoad %float %2074 + %2076 = OpCompositeConstruct %v3float %2069 %2072 %2075 + %2077 = OpFMul %float %2067 %2067 + %2078 = OpCompositeConstruct %v3float %2077 %2067 %float_1 + %2079 = OpMatrixTimesVector %v3float %442 %2076 + %2080 = OpDot %float %2078 %2079 + OpBranch %2022 + %2022 = OpLabel + %2081 = OpPhi %float %2060 %2030 %2080 %2023 + OpBranch %2014 + %2015 = OpLabel + %2082 = OpExtInst %float %1 Log %float_0_00499999989 + %2083 = OpFDiv %float %2082 %1065 + OpBranch %2014 + %2014 = OpLabel + %2084 = OpPhi %float %2081 %2022 %2083 %2015 + %2085 = OpExtInst %float %1 Pow %float_10 %2084 + %2086 = OpCompositeInsert %v3float %2085 %2007 2 + %2087 = OpVectorTimesMatrix %v3float %2086 %576 + %2088 = OpFMul %v3float %2087 %496 + %2089 = OpExtInst %v3float %1 Pow %2088 %263 + %2090 = OpFMul %v3float %184 %2089 + %2091 = OpFAdd %v3float %183 %2090 + %2092 = OpFMul %v3float %185 %2089 + %2093 = OpFAdd %v3float %135 %2092 + %2094 = OpFDiv %v3float %135 %2093 + %2095 = OpFMul %v3float %2091 %2094 + %2096 = OpExtInst %v3float %1 Pow %2095 %264 + OpBranch %1236 + %1236 = OpLabel + %2097 = OpPhi %v3float %1260 %1240 %2096 %2014 + OpBranch %1230 + %1231 = OpLabel + %2098 = OpMatrixTimesMatrix %mat3v3float %546 %399 + %2099 = OpFMul %v3float %906 %262 + %2100 = OpVectorTimesMatrix %v3float %2099 %2098 + %2101 = OpCompositeExtract %float %2100 0 + %2102 = OpCompositeExtract %float %2100 1 + %2103 = OpExtInst %float %1 FMin %2101 %2102 + %2104 = OpCompositeExtract %float %2100 2 + %2105 = OpExtInst %float %1 FMin %2103 %2104 + %2106 = OpExtInst %float %1 FMax %2101 %2102 + %2107 = OpExtInst %float %1 FMax %2106 %2104 + %2108 = OpExtInst %float %1 FMax %2107 %float_1_00000001en10 + %2109 = OpExtInst %float %1 FMax %2105 %float_1_00000001en10 + %2110 = OpFSub %float %2108 %2109 + %2111 = OpExtInst %float %1 FMax %2107 %float_0_00999999978 + %2112 = OpFDiv %float %2110 %2111 + %2113 = OpFSub %float %2104 %2102 + %2114 = OpFMul %float %2104 %2113 + %2115 = OpFSub %float %2102 %2101 + %2116 = OpFMul %float %2102 %2115 + %2117 = OpFAdd %float %2114 %2116 + %2118 = OpFSub %float %2101 %2104 + %2119 = OpFMul %float %2101 %2118 + %2120 = OpFAdd %float %2117 %2119 + %2121 = OpExtInst %float %1 Sqrt %2120 + %2122 = OpFAdd %float %2104 %2102 + %2123 = OpFAdd %float %2122 %2101 + %2124 = OpFMul %float %float_1_75 %2121 + %2125 = OpFAdd %float %2123 %2124 + %2126 = OpFMul %float %2125 %float_0_333333343 + %2127 = OpFSub %float %2112 %float_0_400000006 + %2128 = OpFMul %float %2127 %float_5 + %2129 = OpFMul %float %2127 %float_2_5 + %2130 = OpExtInst %float %1 FAbs %2129 + %2131 = OpFSub %float %float_1 %2130 + %2132 = OpExtInst %float %1 FMax %2131 %float_0 + %2133 = OpExtInst %float %1 FSign %2128 + %2134 = OpConvertFToS %int %2133 + %2135 = OpConvertSToF %float %2134 + %2136 = OpFMul %float %2132 %2132 + %2137 = OpFSub %float %float_1 %2136 + %2138 = OpFMul %float %2135 %2137 + %2139 = OpFAdd %float %float_1 %2138 + %2140 = OpFMul %float %2139 %float_0_0250000004 + %2141 = OpFOrdLessThanEqual %bool %2126 %float_0_0533333346 + OpSelectionMerge %2142 None + OpBranchConditional %2141 %2143 %2144 + %2144 = OpLabel + %2145 = OpFOrdGreaterThanEqual %bool %2126 %float_0_159999996 + OpSelectionMerge %2146 None + OpBranchConditional %2145 %2147 %2148 + %2148 = OpLabel + %2149 = OpFDiv %float %float_0_239999995 %2125 + %2150 = OpFSub %float %2149 %float_0_5 + %2151 = OpFMul %float %2140 %2150 + OpBranch %2146 + %2147 = OpLabel + OpBranch %2146 + %2146 = OpLabel + %2152 = OpPhi %float %2151 %2148 %float_0 %2147 + OpBranch %2142 + %2143 = OpLabel + OpBranch %2142 + %2142 = OpLabel + %2153 = OpPhi %float %2152 %2146 %2140 %2143 + %2154 = OpFAdd %float %float_1 %2153 + %2155 = OpCompositeConstruct %v3float %2154 %2154 %2154 + %2156 = OpFMul %v3float %2100 %2155 + %2157 = OpCompositeExtract %float %2156 0 + %2158 = OpCompositeExtract %float %2156 1 + %2159 = OpFOrdEqual %bool %2157 %2158 + %2160 = OpCompositeExtract %float %2156 2 + %2161 = OpFOrdEqual %bool %2158 %2160 + %2162 = OpLogicalAnd %bool %2159 %2161 + OpSelectionMerge %2163 None + OpBranchConditional %2162 %2164 %2165 + %2165 = OpLabel + %2166 = OpExtInst %float %1 Sqrt %float_3 + %2167 = OpFSub %float %2158 %2160 + %2168 = OpFMul %float %2166 %2167 + %2169 = OpFMul %float %float_2 %2157 + %2170 = OpFSub %float %2169 %2158 + %2171 = OpFSub %float %2170 %2160 + %2172 = OpExtInst %float %1 Atan2 %2168 %2171 + %2173 = OpFMul %float %float_57_2957764 %2172 + OpBranch %2163 + %2164 = OpLabel + OpBranch %2163 + %2163 = OpLabel + %2174 = OpPhi %float %2173 %2165 %float_0 %2164 + %2175 = OpFOrdLessThan %bool %2174 %float_0 + OpSelectionMerge %2176 None + OpBranchConditional %2175 %2177 %2176 + %2177 = OpLabel + %2178 = OpFAdd %float %2174 %float_360 + OpBranch %2176 + %2176 = OpLabel + %2179 = OpPhi %float %2174 %2163 %2178 %2177 + %2180 = OpExtInst %float %1 FClamp %2179 %float_0 %float_360 + %2181 = OpFOrdGreaterThan %bool %2180 %float_180 + OpSelectionMerge %2182 None + OpBranchConditional %2181 %2183 %2182 + %2183 = OpLabel + %2184 = OpFSub %float %2180 %float_360 + OpBranch %2182 + %2182 = OpLabel + %2185 = OpPhi %float %2180 %2176 %2184 %2183 + %2186 = OpFOrdGreaterThan %bool %2185 %float_n67_5 + %2187 = OpFOrdLessThan %bool %2185 %float_67_5 + %2188 = OpLogicalAnd %bool %2186 %2187 + OpSelectionMerge %2189 None + OpBranchConditional %2188 %2190 %2189 + %2190 = OpLabel + %2191 = OpFSub %float %2185 %float_n67_5 + %2192 = OpFMul %float %2191 %float_0_0296296291 + %2193 = OpConvertFToS %int %2192 + %2194 = OpConvertSToF %float %2193 + %2195 = OpFSub %float %2192 %2194 + %2196 = OpFMul %float %2195 %2195 + %2197 = OpFMul %float %2196 %2195 + %2198 = OpIEqual %bool %2193 %int_3 + OpSelectionMerge %2199 None + OpBranchConditional %2198 %2200 %2201 + %2201 = OpLabel + %2202 = OpIEqual %bool %2193 %int_2 + OpSelectionMerge %2203 None + OpBranchConditional %2202 %2204 %2205 + %2205 = OpLabel + %2206 = OpIEqual %bool %2193 %int_1 + OpSelectionMerge %2207 None + OpBranchConditional %2206 %2208 %2209 + %2209 = OpLabel + %2210 = OpIEqual %bool %2193 %int_0 + OpSelectionMerge %2211 None + OpBranchConditional %2210 %2212 %2213 + %2213 = OpLabel + OpBranch %2211 + %2212 = OpLabel + %2214 = OpFMul %float %2197 %float_0_166666672 + OpBranch %2211 + %2211 = OpLabel + %2215 = OpPhi %float %float_0 %2213 %2214 %2212 + OpBranch %2207 + %2208 = OpLabel + %2216 = OpFMul %float %2197 %float_n0_5 + %2217 = OpFMul %float %2196 %float_0_5 + %2218 = OpFAdd %float %2216 %2217 + %2219 = OpFMul %float %2195 %float_0_5 + %2220 = OpFAdd %float %2218 %2219 + %2221 = OpFAdd %float %2220 %float_0_166666672 + OpBranch %2207 + %2207 = OpLabel + %2222 = OpPhi %float %2215 %2211 %2221 %2208 + OpBranch %2203 + %2204 = OpLabel + %2223 = OpFMul %float %2197 %float_0_5 + %2224 = OpFMul %float %2196 %float_n1 + %2225 = OpFAdd %float %2223 %2224 + %2226 = OpFAdd %float %2225 %float_0_666666687 + OpBranch %2203 + %2203 = OpLabel + %2227 = OpPhi %float %2222 %2207 %2226 %2204 + OpBranch %2199 + %2200 = OpLabel + %2228 = OpFMul %float %2197 %float_n0_166666672 + %2229 = OpFMul %float %2196 %float_0_5 + %2230 = OpFAdd %float %2228 %2229 + %2231 = OpFMul %float %2195 %float_n0_5 + %2232 = OpFAdd %float %2230 %2231 + %2233 = OpFAdd %float %2232 %float_0_166666672 + OpBranch %2199 + %2199 = OpLabel + %2234 = OpPhi %float %2227 %2203 %2233 %2200 + OpBranch %2189 + %2189 = OpLabel + %2235 = OpPhi %float %float_0 %2182 %2234 %2199 + %2236 = OpFMul %float %2235 %float_1_5 + %2237 = OpFMul %float %2236 %2112 + %2238 = OpFSub %float %float_0_0299999993 %2157 + %2239 = OpFMul %float %2237 %2238 + %2240 = OpFMul %float %2239 %float_0_180000007 + %2241 = OpFAdd %float %2157 %2240 + %2242 = OpCompositeInsert %v3float %2241 %2156 0 + %2243 = OpExtInst %v3float %1 FClamp %2242 %132 %314 + %2244 = OpVectorTimesMatrix %v3float %2243 %410 + %2245 = OpExtInst %v3float %1 FClamp %2244 %132 %314 + %2246 = OpDot %float %2245 %67 + %2247 = OpCompositeConstruct %v3float %2246 %2246 %2246 + %2248 = OpExtInst %v3float %1 FMix %2247 %2245 %228 + %2249 = OpCompositeExtract %float %2248 0 + %2250 = OpExtInst %float %1 Exp2 %float_n15 + %2251 = OpFMul %float %float_0_179999992 %2250 + %2252 = OpExtInst %float %1 Exp2 %float_18 + %2253 = OpFMul %float %float_0_179999992 %2252 + OpStore %520 %475 + OpStore %519 %476 + %2254 = OpFOrdLessThanEqual %bool %2249 %float_0 + %2255 = OpExtInst %float %1 Exp2 %float_n14 + %2256 = OpSelect %float %2254 %2255 %2249 + %2257 = OpExtInst %float %1 Log %2256 + %2258 = OpFDiv %float %2257 %1065 + %2259 = OpExtInst %float %1 Log %2251 + %2260 = OpFDiv %float %2259 %1065 + %2261 = OpFOrdLessThanEqual %bool %2258 %2260 + OpSelectionMerge %2262 None + OpBranchConditional %2261 %2263 %2264 + %2264 = OpLabel + %2265 = OpFOrdGreaterThan %bool %2258 %2260 + %2266 = OpExtInst %float %1 Log %float_0_180000007 + %2267 = OpFDiv %float %2266 %1065 + %2268 = OpFOrdLessThan %bool %2258 %2267 + %2269 = OpLogicalAnd %bool %2265 %2268 + OpSelectionMerge %2270 None + OpBranchConditional %2269 %2271 %2272 + %2272 = OpLabel + %2273 = OpFOrdGreaterThanEqual %bool %2258 %2267 + %2274 = OpExtInst %float %1 Log %2253 + %2275 = OpFDiv %float %2274 %1065 + %2276 = OpFOrdLessThan %bool %2258 %2275 + %2277 = OpLogicalAnd %bool %2273 %2276 + OpSelectionMerge %2278 None + OpBranchConditional %2277 %2279 %2280 + %2280 = OpLabel + %2281 = OpExtInst %float %1 Log %float_10000 + %2282 = OpFDiv %float %2281 %1065 + OpBranch %2278 + %2279 = OpLabel + %2283 = OpFSub %float %2258 %2267 + %2284 = OpFMul %float %float_3 %2283 + %2285 = OpFSub %float %2275 %2267 + %2286 = OpFDiv %float %2284 %2285 + %2287 = OpConvertFToS %int %2286 + %2288 = OpConvertSToF %float %2287 + %2289 = OpFSub %float %2286 %2288 + %2290 = OpAccessChain %_ptr_Function_float %519 %2287 + %2291 = OpLoad %float %2290 + %2292 = OpIAdd %int %2287 %int_1 + %2293 = OpAccessChain %_ptr_Function_float %519 %2292 + %2294 = OpLoad %float %2293 + %2295 = OpIAdd %int %2287 %int_2 + %2296 = OpAccessChain %_ptr_Function_float %519 %2295 + %2297 = OpLoad %float %2296 + %2298 = OpCompositeConstruct %v3float %2291 %2294 %2297 + %2299 = OpFMul %float %2289 %2289 + %2300 = OpCompositeConstruct %v3float %2299 %2289 %float_1 + %2301 = OpMatrixTimesVector %v3float %442 %2298 + %2302 = OpDot %float %2300 %2301 + OpBranch %2278 + %2278 = OpLabel + %2303 = OpPhi %float %2282 %2280 %2302 %2279 + OpBranch %2270 + %2271 = OpLabel + %2304 = OpFSub %float %2258 %2260 + %2305 = OpFMul %float %float_3 %2304 + %2306 = OpFSub %float %2267 %2260 + %2307 = OpFDiv %float %2305 %2306 + %2308 = OpConvertFToS %int %2307 + %2309 = OpConvertSToF %float %2308 + %2310 = OpFSub %float %2307 %2309 + %2311 = OpAccessChain %_ptr_Function_float %520 %2308 + %2312 = OpLoad %float %2311 + %2313 = OpIAdd %int %2308 %int_1 + %2314 = OpAccessChain %_ptr_Function_float %520 %2313 + %2315 = OpLoad %float %2314 + %2316 = OpIAdd %int %2308 %int_2 + %2317 = OpAccessChain %_ptr_Function_float %520 %2316 + %2318 = OpLoad %float %2317 + %2319 = OpCompositeConstruct %v3float %2312 %2315 %2318 + %2320 = OpFMul %float %2310 %2310 + %2321 = OpCompositeConstruct %v3float %2320 %2310 %float_1 + %2322 = OpMatrixTimesVector %v3float %442 %2319 + %2323 = OpDot %float %2321 %2322 + OpBranch %2270 + %2270 = OpLabel + %2324 = OpPhi %float %2303 %2278 %2323 %2271 + OpBranch %2262 + %2263 = OpLabel + %2325 = OpExtInst %float %1 Log %float_9_99999975en05 + %2326 = OpFDiv %float %2325 %1065 + OpBranch %2262 + %2262 = OpLabel + %2327 = OpPhi %float %2324 %2270 %2326 %2263 + %2328 = OpExtInst %float %1 Pow %float_10 %2327 + %2329 = OpCompositeInsert %v3float %2328 %391 0 + %2330 = OpCompositeExtract %float %2248 1 + OpStore %522 %475 + OpStore %521 %476 + %2331 = OpFOrdLessThanEqual %bool %2330 %float_0 + %2332 = OpSelect %float %2331 %2255 %2330 + %2333 = OpExtInst %float %1 Log %2332 + %2334 = OpFDiv %float %2333 %1065 + %2335 = OpFOrdLessThanEqual %bool %2334 %2260 + OpSelectionMerge %2336 None + OpBranchConditional %2335 %2337 %2338 + %2338 = OpLabel + %2339 = OpFOrdGreaterThan %bool %2334 %2260 + %2340 = OpExtInst %float %1 Log %float_0_180000007 + %2341 = OpFDiv %float %2340 %1065 + %2342 = OpFOrdLessThan %bool %2334 %2341 + %2343 = OpLogicalAnd %bool %2339 %2342 + OpSelectionMerge %2344 None + OpBranchConditional %2343 %2345 %2346 + %2346 = OpLabel + %2347 = OpFOrdGreaterThanEqual %bool %2334 %2341 + %2348 = OpExtInst %float %1 Log %2253 + %2349 = OpFDiv %float %2348 %1065 + %2350 = OpFOrdLessThan %bool %2334 %2349 + %2351 = OpLogicalAnd %bool %2347 %2350 + OpSelectionMerge %2352 None + OpBranchConditional %2351 %2353 %2354 + %2354 = OpLabel + %2355 = OpExtInst %float %1 Log %float_10000 + %2356 = OpFDiv %float %2355 %1065 + OpBranch %2352 + %2353 = OpLabel + %2357 = OpFSub %float %2334 %2341 + %2358 = OpFMul %float %float_3 %2357 + %2359 = OpFSub %float %2349 %2341 + %2360 = OpFDiv %float %2358 %2359 + %2361 = OpConvertFToS %int %2360 + %2362 = OpConvertSToF %float %2361 + %2363 = OpFSub %float %2360 %2362 + %2364 = OpAccessChain %_ptr_Function_float %521 %2361 + %2365 = OpLoad %float %2364 + %2366 = OpIAdd %int %2361 %int_1 + %2367 = OpAccessChain %_ptr_Function_float %521 %2366 + %2368 = OpLoad %float %2367 + %2369 = OpIAdd %int %2361 %int_2 + %2370 = OpAccessChain %_ptr_Function_float %521 %2369 + %2371 = OpLoad %float %2370 + %2372 = OpCompositeConstruct %v3float %2365 %2368 %2371 + %2373 = OpFMul %float %2363 %2363 + %2374 = OpCompositeConstruct %v3float %2373 %2363 %float_1 + %2375 = OpMatrixTimesVector %v3float %442 %2372 + %2376 = OpDot %float %2374 %2375 + OpBranch %2352 + %2352 = OpLabel + %2377 = OpPhi %float %2356 %2354 %2376 %2353 + OpBranch %2344 + %2345 = OpLabel + %2378 = OpFSub %float %2334 %2260 + %2379 = OpFMul %float %float_3 %2378 + %2380 = OpFSub %float %2341 %2260 + %2381 = OpFDiv %float %2379 %2380 + %2382 = OpConvertFToS %int %2381 + %2383 = OpConvertSToF %float %2382 + %2384 = OpFSub %float %2381 %2383 + %2385 = OpAccessChain %_ptr_Function_float %522 %2382 + %2386 = OpLoad %float %2385 + %2387 = OpIAdd %int %2382 %int_1 + %2388 = OpAccessChain %_ptr_Function_float %522 %2387 + %2389 = OpLoad %float %2388 + %2390 = OpIAdd %int %2382 %int_2 + %2391 = OpAccessChain %_ptr_Function_float %522 %2390 + %2392 = OpLoad %float %2391 + %2393 = OpCompositeConstruct %v3float %2386 %2389 %2392 + %2394 = OpFMul %float %2384 %2384 + %2395 = OpCompositeConstruct %v3float %2394 %2384 %float_1 + %2396 = OpMatrixTimesVector %v3float %442 %2393 + %2397 = OpDot %float %2395 %2396 + OpBranch %2344 + %2344 = OpLabel + %2398 = OpPhi %float %2377 %2352 %2397 %2345 + OpBranch %2336 + %2337 = OpLabel + %2399 = OpExtInst %float %1 Log %float_9_99999975en05 + %2400 = OpFDiv %float %2399 %1065 + OpBranch %2336 + %2336 = OpLabel + %2401 = OpPhi %float %2398 %2344 %2400 %2337 + %2402 = OpExtInst %float %1 Pow %float_10 %2401 + %2403 = OpCompositeInsert %v3float %2402 %2329 1 + %2404 = OpCompositeExtract %float %2248 2 + OpStore %524 %475 + OpStore %523 %476 + %2405 = OpFOrdLessThanEqual %bool %2404 %float_0 + %2406 = OpSelect %float %2405 %2255 %2404 + %2407 = OpExtInst %float %1 Log %2406 + %2408 = OpFDiv %float %2407 %1065 + %2409 = OpFOrdLessThanEqual %bool %2408 %2260 + OpSelectionMerge %2410 None + OpBranchConditional %2409 %2411 %2412 + %2412 = OpLabel + %2413 = OpFOrdGreaterThan %bool %2408 %2260 + %2414 = OpExtInst %float %1 Log %float_0_180000007 + %2415 = OpFDiv %float %2414 %1065 + %2416 = OpFOrdLessThan %bool %2408 %2415 + %2417 = OpLogicalAnd %bool %2413 %2416 + OpSelectionMerge %2418 None + OpBranchConditional %2417 %2419 %2420 + %2420 = OpLabel + %2421 = OpFOrdGreaterThanEqual %bool %2408 %2415 + %2422 = OpExtInst %float %1 Log %2253 + %2423 = OpFDiv %float %2422 %1065 + %2424 = OpFOrdLessThan %bool %2408 %2423 + %2425 = OpLogicalAnd %bool %2421 %2424 + OpSelectionMerge %2426 None + OpBranchConditional %2425 %2427 %2428 + %2428 = OpLabel + %2429 = OpExtInst %float %1 Log %float_10000 + %2430 = OpFDiv %float %2429 %1065 + OpBranch %2426 + %2427 = OpLabel + %2431 = OpFSub %float %2408 %2415 + %2432 = OpFMul %float %float_3 %2431 + %2433 = OpFSub %float %2423 %2415 + %2434 = OpFDiv %float %2432 %2433 + %2435 = OpConvertFToS %int %2434 + %2436 = OpConvertSToF %float %2435 + %2437 = OpFSub %float %2434 %2436 + %2438 = OpAccessChain %_ptr_Function_float %523 %2435 + %2439 = OpLoad %float %2438 + %2440 = OpIAdd %int %2435 %int_1 + %2441 = OpAccessChain %_ptr_Function_float %523 %2440 + %2442 = OpLoad %float %2441 + %2443 = OpIAdd %int %2435 %int_2 + %2444 = OpAccessChain %_ptr_Function_float %523 %2443 + %2445 = OpLoad %float %2444 + %2446 = OpCompositeConstruct %v3float %2439 %2442 %2445 + %2447 = OpFMul %float %2437 %2437 + %2448 = OpCompositeConstruct %v3float %2447 %2437 %float_1 + %2449 = OpMatrixTimesVector %v3float %442 %2446 + %2450 = OpDot %float %2448 %2449 + OpBranch %2426 + %2426 = OpLabel + %2451 = OpPhi %float %2430 %2428 %2450 %2427 + OpBranch %2418 + %2419 = OpLabel + %2452 = OpFSub %float %2408 %2260 + %2453 = OpFMul %float %float_3 %2452 + %2454 = OpFSub %float %2415 %2260 + %2455 = OpFDiv %float %2453 %2454 + %2456 = OpConvertFToS %int %2455 + %2457 = OpConvertSToF %float %2456 + %2458 = OpFSub %float %2455 %2457 + %2459 = OpAccessChain %_ptr_Function_float %524 %2456 + %2460 = OpLoad %float %2459 + %2461 = OpIAdd %int %2456 %int_1 + %2462 = OpAccessChain %_ptr_Function_float %524 %2461 + %2463 = OpLoad %float %2462 + %2464 = OpIAdd %int %2456 %int_2 + %2465 = OpAccessChain %_ptr_Function_float %524 %2464 + %2466 = OpLoad %float %2465 + %2467 = OpCompositeConstruct %v3float %2460 %2463 %2466 + %2468 = OpFMul %float %2458 %2458 + %2469 = OpCompositeConstruct %v3float %2468 %2458 %float_1 + %2470 = OpMatrixTimesVector %v3float %442 %2467 + %2471 = OpDot %float %2469 %2470 + OpBranch %2418 + %2418 = OpLabel + %2472 = OpPhi %float %2451 %2426 %2471 %2419 + OpBranch %2410 + %2411 = OpLabel + %2473 = OpExtInst %float %1 Log %float_9_99999975en05 + %2474 = OpFDiv %float %2473 %1065 + OpBranch %2410 + %2410 = OpLabel + %2475 = OpPhi %float %2472 %2418 %2474 %2411 + %2476 = OpExtInst %float %1 Pow %float_10 %2475 + %2477 = OpCompositeInsert %v3float %2476 %2403 2 + %2478 = OpVectorTimesMatrix %v3float %2477 %414 + %2479 = OpVectorTimesMatrix %v3float %2478 %410 + %2480 = OpExtInst %float %1 Pow %float_2 %float_n12 + %2481 = OpFMul %float %float_0_179999992 %2480 + OpStore %532 %475 + OpStore %531 %476 + %2482 = OpFOrdLessThanEqual %bool %2481 %float_0 + %2483 = OpSelect %float %2482 %2255 %2481 + %2484 = OpExtInst %float %1 Log %2483 + %2485 = OpFDiv %float %2484 %1065 + %2486 = OpFOrdLessThanEqual %bool %2485 %2260 + OpSelectionMerge %2487 None + OpBranchConditional %2486 %2488 %2489 + %2489 = OpLabel + %2490 = OpFOrdGreaterThan %bool %2485 %2260 + %2491 = OpExtInst %float %1 Log %float_0_180000007 + %2492 = OpFDiv %float %2491 %1065 + %2493 = OpFOrdLessThan %bool %2485 %2492 + %2494 = OpLogicalAnd %bool %2490 %2493 + OpSelectionMerge %2495 None + OpBranchConditional %2494 %2496 %2497 + %2497 = OpLabel + %2498 = OpFOrdGreaterThanEqual %bool %2485 %2492 + %2499 = OpExtInst %float %1 Log %2253 + %2500 = OpFDiv %float %2499 %1065 + %2501 = OpFOrdLessThan %bool %2485 %2500 + %2502 = OpLogicalAnd %bool %2498 %2501 + OpSelectionMerge %2503 None + OpBranchConditional %2502 %2504 %2505 + %2505 = OpLabel + %2506 = OpExtInst %float %1 Log %float_10000 + %2507 = OpFDiv %float %2506 %1065 + OpBranch %2503 + %2504 = OpLabel + %2508 = OpFSub %float %2485 %2492 + %2509 = OpFMul %float %float_3 %2508 + %2510 = OpFSub %float %2500 %2492 + %2511 = OpFDiv %float %2509 %2510 + %2512 = OpConvertFToS %int %2511 + %2513 = OpConvertSToF %float %2512 + %2514 = OpFSub %float %2511 %2513 + %2515 = OpAccessChain %_ptr_Function_float %531 %2512 + %2516 = OpLoad %float %2515 + %2517 = OpIAdd %int %2512 %int_1 + %2518 = OpAccessChain %_ptr_Function_float %531 %2517 + %2519 = OpLoad %float %2518 + %2520 = OpIAdd %int %2512 %int_2 + %2521 = OpAccessChain %_ptr_Function_float %531 %2520 + %2522 = OpLoad %float %2521 + %2523 = OpCompositeConstruct %v3float %2516 %2519 %2522 + %2524 = OpFMul %float %2514 %2514 + %2525 = OpCompositeConstruct %v3float %2524 %2514 %float_1 + %2526 = OpMatrixTimesVector %v3float %442 %2523 + %2527 = OpDot %float %2525 %2526 + OpBranch %2503 + %2503 = OpLabel + %2528 = OpPhi %float %2507 %2505 %2527 %2504 + OpBranch %2495 + %2496 = OpLabel + %2529 = OpFSub %float %2485 %2260 + %2530 = OpFMul %float %float_3 %2529 + %2531 = OpFSub %float %2492 %2260 + %2532 = OpFDiv %float %2530 %2531 + %2533 = OpConvertFToS %int %2532 + %2534 = OpConvertSToF %float %2533 + %2535 = OpFSub %float %2532 %2534 + %2536 = OpAccessChain %_ptr_Function_float %532 %2533 + %2537 = OpLoad %float %2536 + %2538 = OpIAdd %int %2533 %int_1 + %2539 = OpAccessChain %_ptr_Function_float %532 %2538 + %2540 = OpLoad %float %2539 + %2541 = OpIAdd %int %2533 %int_2 + %2542 = OpAccessChain %_ptr_Function_float %532 %2541 + %2543 = OpLoad %float %2542 + %2544 = OpCompositeConstruct %v3float %2537 %2540 %2543 + %2545 = OpFMul %float %2535 %2535 + %2546 = OpCompositeConstruct %v3float %2545 %2535 %float_1 + %2547 = OpMatrixTimesVector %v3float %442 %2544 + %2548 = OpDot %float %2546 %2547 + OpBranch %2495 + %2495 = OpLabel + %2549 = OpPhi %float %2528 %2503 %2548 %2496 + OpBranch %2487 + %2488 = OpLabel + %2550 = OpExtInst %float %1 Log %float_9_99999975en05 + %2551 = OpFDiv %float %2550 %1065 + OpBranch %2487 + %2487 = OpLabel + %2552 = OpPhi %float %2549 %2495 %2551 %2488 + %2553 = OpExtInst %float %1 Pow %float_10 %2552 + OpStore %534 %475 + OpStore %533 %476 + %2554 = OpExtInst %float %1 Log %float_0_180000007 + %2555 = OpFDiv %float %2554 %1065 + %2556 = OpFOrdLessThanEqual %bool %2555 %2260 + OpSelectionMerge %2557 None + OpBranchConditional %2556 %2558 %2559 + %2559 = OpLabel + %2560 = OpFOrdGreaterThan %bool %2555 %2260 + %2561 = OpFOrdLessThan %bool %2555 %2555 + %2562 = OpLogicalAnd %bool %2560 %2561 + OpSelectionMerge %2563 None + OpBranchConditional %2562 %2564 %2565 + %2565 = OpLabel + %2566 = OpFOrdGreaterThanEqual %bool %2555 %2555 + %2567 = OpExtInst %float %1 Log %2253 + %2568 = OpFDiv %float %2567 %1065 + %2569 = OpFOrdLessThan %bool %2555 %2568 + %2570 = OpLogicalAnd %bool %2566 %2569 + OpSelectionMerge %2571 None + OpBranchConditional %2570 %2572 %2573 + %2573 = OpLabel + %2574 = OpExtInst %float %1 Log %float_10000 + %2575 = OpFDiv %float %2574 %1065 + OpBranch %2571 + %2572 = OpLabel + %2576 = OpFSub %float %2555 %2555 + %2577 = OpFMul %float %float_3 %2576 + %2578 = OpFSub %float %2568 %2555 + %2579 = OpFDiv %float %2577 %2578 + %2580 = OpConvertFToS %int %2579 + %2581 = OpConvertSToF %float %2580 + %2582 = OpFSub %float %2579 %2581 + %2583 = OpAccessChain %_ptr_Function_float %533 %2580 + %2584 = OpLoad %float %2583 + %2585 = OpIAdd %int %2580 %int_1 + %2586 = OpAccessChain %_ptr_Function_float %533 %2585 + %2587 = OpLoad %float %2586 + %2588 = OpIAdd %int %2580 %int_2 + %2589 = OpAccessChain %_ptr_Function_float %533 %2588 + %2590 = OpLoad %float %2589 + %2591 = OpCompositeConstruct %v3float %2584 %2587 %2590 + %2592 = OpFMul %float %2582 %2582 + %2593 = OpCompositeConstruct %v3float %2592 %2582 %float_1 + %2594 = OpMatrixTimesVector %v3float %442 %2591 + %2595 = OpDot %float %2593 %2594 + OpBranch %2571 + %2571 = OpLabel + %2596 = OpPhi %float %2575 %2573 %2595 %2572 + OpBranch %2563 + %2564 = OpLabel + %2597 = OpFSub %float %2555 %2260 + %2598 = OpFMul %float %float_3 %2597 + %2599 = OpAccessChain %_ptr_Function_float %534 %int_3 + %2600 = OpLoad %float %2599 + %2601 = OpAccessChain %_ptr_Function_float %534 %int_4 + %2602 = OpLoad %float %2601 + %2603 = OpAccessChain %_ptr_Function_float %534 %int_5 + %2604 = OpLoad %float %2603 + %2605 = OpCompositeConstruct %v3float %2600 %2602 %2604 + %2606 = OpMatrixTimesVector %v3float %442 %2605 + %2607 = OpCompositeExtract %float %2606 2 + OpBranch %2563 + %2563 = OpLabel + %2608 = OpPhi %float %2596 %2571 %2607 %2564 + OpBranch %2557 + %2558 = OpLabel + %2609 = OpExtInst %float %1 Log %float_9_99999975en05 + %2610 = OpFDiv %float %2609 %1065 + OpBranch %2557 + %2557 = OpLabel + %2611 = OpPhi %float %2608 %2563 %2610 %2558 + %2612 = OpExtInst %float %1 Pow %float_10 %2611 + %2613 = OpExtInst %float %1 Pow %float_2 %float_10 + %2614 = OpFMul %float %float_0_179999992 %2613 + OpStore %536 %475 + OpStore %535 %476 + %2615 = OpFOrdLessThanEqual %bool %2614 %float_0 + %2616 = OpSelect %float %2615 %2255 %2614 + %2617 = OpExtInst %float %1 Log %2616 + %2618 = OpFDiv %float %2617 %1065 + %2619 = OpFOrdLessThanEqual %bool %2618 %2260 + OpSelectionMerge %2620 None + OpBranchConditional %2619 %2621 %2622 + %2622 = OpLabel + %2623 = OpFOrdGreaterThan %bool %2618 %2260 + %2624 = OpFOrdLessThan %bool %2618 %2555 + %2625 = OpLogicalAnd %bool %2623 %2624 + OpSelectionMerge %2626 None + OpBranchConditional %2625 %2627 %2628 + %2628 = OpLabel + %2629 = OpFOrdGreaterThanEqual %bool %2618 %2555 + %2630 = OpExtInst %float %1 Log %2253 + %2631 = OpFDiv %float %2630 %1065 + %2632 = OpFOrdLessThan %bool %2618 %2631 + %2633 = OpLogicalAnd %bool %2629 %2632 + OpSelectionMerge %2634 None + OpBranchConditional %2633 %2635 %2636 + %2636 = OpLabel + %2637 = OpExtInst %float %1 Log %float_10000 + %2638 = OpFDiv %float %2637 %1065 + OpBranch %2634 + %2635 = OpLabel + %2639 = OpFSub %float %2618 %2555 + %2640 = OpFMul %float %float_3 %2639 + %2641 = OpFSub %float %2631 %2555 + %2642 = OpFDiv %float %2640 %2641 + %2643 = OpConvertFToS %int %2642 + %2644 = OpConvertSToF %float %2643 + %2645 = OpFSub %float %2642 %2644 + %2646 = OpAccessChain %_ptr_Function_float %535 %2643 + %2647 = OpLoad %float %2646 + %2648 = OpIAdd %int %2643 %int_1 + %2649 = OpAccessChain %_ptr_Function_float %535 %2648 + %2650 = OpLoad %float %2649 + %2651 = OpIAdd %int %2643 %int_2 + %2652 = OpAccessChain %_ptr_Function_float %535 %2651 + %2653 = OpLoad %float %2652 + %2654 = OpCompositeConstruct %v3float %2647 %2650 %2653 + %2655 = OpFMul %float %2645 %2645 + %2656 = OpCompositeConstruct %v3float %2655 %2645 %float_1 + %2657 = OpMatrixTimesVector %v3float %442 %2654 + %2658 = OpDot %float %2656 %2657 + OpBranch %2634 + %2634 = OpLabel + %2659 = OpPhi %float %2638 %2636 %2658 %2635 + OpBranch %2626 + %2627 = OpLabel + %2660 = OpFSub %float %2618 %2260 + %2661 = OpFMul %float %float_3 %2660 + %2662 = OpFSub %float %2555 %2260 + %2663 = OpFDiv %float %2661 %2662 + %2664 = OpConvertFToS %int %2663 + %2665 = OpConvertSToF %float %2664 + %2666 = OpFSub %float %2663 %2665 + %2667 = OpAccessChain %_ptr_Function_float %536 %2664 + %2668 = OpLoad %float %2667 + %2669 = OpIAdd %int %2664 %int_1 + %2670 = OpAccessChain %_ptr_Function_float %536 %2669 + %2671 = OpLoad %float %2670 + %2672 = OpIAdd %int %2664 %int_2 + %2673 = OpAccessChain %_ptr_Function_float %536 %2672 + %2674 = OpLoad %float %2673 + %2675 = OpCompositeConstruct %v3float %2668 %2671 %2674 + %2676 = OpFMul %float %2666 %2666 + %2677 = OpCompositeConstruct %v3float %2676 %2666 %float_1 + %2678 = OpMatrixTimesVector %v3float %442 %2675 + %2679 = OpDot %float %2677 %2678 + OpBranch %2626 + %2626 = OpLabel + %2680 = OpPhi %float %2659 %2634 %2679 %2627 + OpBranch %2620 + %2621 = OpLabel + %2681 = OpExtInst %float %1 Log %float_9_99999975en05 + %2682 = OpFDiv %float %2681 %1065 + OpBranch %2620 + %2620 = OpLabel + %2683 = OpPhi %float %2680 %2626 %2682 %2621 + %2684 = OpExtInst %float %1 Pow %float_10 %2683 + %2685 = OpCompositeExtract %float %2479 0 + OpStore %530 %479 + OpStore %529 %480 + %2686 = OpFOrdLessThanEqual %bool %2685 %float_0 + %2687 = OpSelect %float %2686 %float_9_99999975en05 %2685 + %2688 = OpExtInst %float %1 Log %2687 + %2689 = OpFDiv %float %2688 %1065 + %2690 = OpExtInst %float %1 Log %2553 + %2691 = OpFDiv %float %2690 %1065 + %2692 = OpFOrdLessThanEqual %bool %2689 %2691 + OpSelectionMerge %2693 None + OpBranchConditional %2692 %2694 %2695 + %2695 = OpLabel + %2696 = OpFOrdGreaterThan %bool %2689 %2691 + %2697 = OpExtInst %float %1 Log %2612 + %2698 = OpFDiv %float %2697 %1065 + %2699 = OpFOrdLessThan %bool %2689 %2698 + %2700 = OpLogicalAnd %bool %2696 %2699 + OpSelectionMerge %2701 None + OpBranchConditional %2700 %2702 %2703 + %2703 = OpLabel + %2704 = OpFOrdGreaterThanEqual %bool %2689 %2698 + %2705 = OpExtInst %float %1 Log %2684 + %2706 = OpFDiv %float %2705 %1065 + %2707 = OpFOrdLessThan %bool %2689 %2706 + %2708 = OpLogicalAnd %bool %2704 %2707 + OpSelectionMerge %2709 None + OpBranchConditional %2708 %2710 %2711 + %2711 = OpLabel + %2712 = OpFMul %float %2689 %float_0_0599999987 + %2713 = OpExtInst %float %1 Log %float_1000 + %2714 = OpFDiv %float %2713 %1065 + %2715 = OpFMul %float %float_0_0599999987 %2705 + %2716 = OpFDiv %float %2715 %1065 + %2717 = OpFSub %float %2714 %2716 + %2718 = OpFAdd %float %2712 %2717 + OpBranch %2709 + %2710 = OpLabel + %2719 = OpFSub %float %2689 %2698 + %2720 = OpFMul %float %float_7 %2719 + %2721 = OpFSub %float %2706 %2698 + %2722 = OpFDiv %float %2720 %2721 + %2723 = OpConvertFToS %int %2722 + %2724 = OpConvertSToF %float %2723 + %2725 = OpFSub %float %2722 %2724 + %2726 = OpAccessChain %_ptr_Function_float %529 %2723 + %2727 = OpLoad %float %2726 + %2728 = OpIAdd %int %2723 %int_1 + %2729 = OpAccessChain %_ptr_Function_float %529 %2728 + %2730 = OpLoad %float %2729 + %2731 = OpIAdd %int %2723 %int_2 + %2732 = OpAccessChain %_ptr_Function_float %529 %2731 + %2733 = OpLoad %float %2732 + %2734 = OpCompositeConstruct %v3float %2727 %2730 %2733 + %2735 = OpFMul %float %2725 %2725 + %2736 = OpCompositeConstruct %v3float %2735 %2725 %float_1 + %2737 = OpMatrixTimesVector %v3float %442 %2734 + %2738 = OpDot %float %2736 %2737 + OpBranch %2709 + %2709 = OpLabel + %2739 = OpPhi %float %2718 %2711 %2738 %2710 + OpBranch %2701 + %2702 = OpLabel + %2740 = OpFSub %float %2689 %2691 + %2741 = OpFMul %float %float_7 %2740 + %2742 = OpFSub %float %2698 %2691 + %2743 = OpFDiv %float %2741 %2742 + %2744 = OpConvertFToS %int %2743 + %2745 = OpConvertSToF %float %2744 + %2746 = OpFSub %float %2743 %2745 + %2747 = OpAccessChain %_ptr_Function_float %530 %2744 + %2748 = OpLoad %float %2747 + %2749 = OpIAdd %int %2744 %int_1 + %2750 = OpAccessChain %_ptr_Function_float %530 %2749 + %2751 = OpLoad %float %2750 + %2752 = OpIAdd %int %2744 %int_2 + %2753 = OpAccessChain %_ptr_Function_float %530 %2752 + %2754 = OpLoad %float %2753 + %2755 = OpCompositeConstruct %v3float %2748 %2751 %2754 + %2756 = OpFMul %float %2746 %2746 + %2757 = OpCompositeConstruct %v3float %2756 %2746 %float_1 + %2758 = OpMatrixTimesVector %v3float %442 %2755 + %2759 = OpDot %float %2757 %2758 + OpBranch %2701 + %2701 = OpLabel + %2760 = OpPhi %float %2739 %2709 %2759 %2702 + OpBranch %2693 + %2694 = OpLabel + %2761 = OpFMul %float %2689 %float_3 + %2762 = OpExtInst %float %1 Log %float_9_99999975en05 + %2763 = OpFDiv %float %2762 %1065 + %2764 = OpFMul %float %float_3 %2690 + %2765 = OpFDiv %float %2764 %1065 + %2766 = OpFSub %float %2763 %2765 + %2767 = OpFAdd %float %2761 %2766 + OpBranch %2693 + %2693 = OpLabel + %2768 = OpPhi %float %2760 %2701 %2767 %2694 + %2769 = OpExtInst %float %1 Pow %float_10 %2768 + %2770 = OpCompositeInsert %v3float %2769 %391 0 + %2771 = OpCompositeExtract %float %2479 1 + OpStore %528 %479 + OpStore %527 %480 + %2772 = OpFOrdLessThanEqual %bool %2771 %float_0 + %2773 = OpSelect %float %2772 %float_9_99999975en05 %2771 + %2774 = OpExtInst %float %1 Log %2773 + %2775 = OpFDiv %float %2774 %1065 + %2776 = OpFOrdLessThanEqual %bool %2775 %2691 + OpSelectionMerge %2777 None + OpBranchConditional %2776 %2778 %2779 + %2779 = OpLabel + %2780 = OpFOrdGreaterThan %bool %2775 %2691 + %2781 = OpExtInst %float %1 Log %2612 + %2782 = OpFDiv %float %2781 %1065 + %2783 = OpFOrdLessThan %bool %2775 %2782 + %2784 = OpLogicalAnd %bool %2780 %2783 + OpSelectionMerge %2785 None + OpBranchConditional %2784 %2786 %2787 + %2787 = OpLabel + %2788 = OpFOrdGreaterThanEqual %bool %2775 %2782 + %2789 = OpExtInst %float %1 Log %2684 + %2790 = OpFDiv %float %2789 %1065 + %2791 = OpFOrdLessThan %bool %2775 %2790 + %2792 = OpLogicalAnd %bool %2788 %2791 + OpSelectionMerge %2793 None + OpBranchConditional %2792 %2794 %2795 + %2795 = OpLabel + %2796 = OpFMul %float %2775 %float_0_0599999987 + %2797 = OpExtInst %float %1 Log %float_1000 + %2798 = OpFDiv %float %2797 %1065 + %2799 = OpFMul %float %float_0_0599999987 %2789 + %2800 = OpFDiv %float %2799 %1065 + %2801 = OpFSub %float %2798 %2800 + %2802 = OpFAdd %float %2796 %2801 + OpBranch %2793 + %2794 = OpLabel + %2803 = OpFSub %float %2775 %2782 + %2804 = OpFMul %float %float_7 %2803 + %2805 = OpFSub %float %2790 %2782 + %2806 = OpFDiv %float %2804 %2805 + %2807 = OpConvertFToS %int %2806 + %2808 = OpConvertSToF %float %2807 + %2809 = OpFSub %float %2806 %2808 + %2810 = OpAccessChain %_ptr_Function_float %527 %2807 + %2811 = OpLoad %float %2810 + %2812 = OpIAdd %int %2807 %int_1 + %2813 = OpAccessChain %_ptr_Function_float %527 %2812 + %2814 = OpLoad %float %2813 + %2815 = OpIAdd %int %2807 %int_2 + %2816 = OpAccessChain %_ptr_Function_float %527 %2815 + %2817 = OpLoad %float %2816 + %2818 = OpCompositeConstruct %v3float %2811 %2814 %2817 + %2819 = OpFMul %float %2809 %2809 + %2820 = OpCompositeConstruct %v3float %2819 %2809 %float_1 + %2821 = OpMatrixTimesVector %v3float %442 %2818 + %2822 = OpDot %float %2820 %2821 + OpBranch %2793 + %2793 = OpLabel + %2823 = OpPhi %float %2802 %2795 %2822 %2794 + OpBranch %2785 + %2786 = OpLabel + %2824 = OpFSub %float %2775 %2691 + %2825 = OpFMul %float %float_7 %2824 + %2826 = OpFSub %float %2782 %2691 + %2827 = OpFDiv %float %2825 %2826 + %2828 = OpConvertFToS %int %2827 + %2829 = OpConvertSToF %float %2828 + %2830 = OpFSub %float %2827 %2829 + %2831 = OpAccessChain %_ptr_Function_float %528 %2828 + %2832 = OpLoad %float %2831 + %2833 = OpIAdd %int %2828 %int_1 + %2834 = OpAccessChain %_ptr_Function_float %528 %2833 + %2835 = OpLoad %float %2834 + %2836 = OpIAdd %int %2828 %int_2 + %2837 = OpAccessChain %_ptr_Function_float %528 %2836 + %2838 = OpLoad %float %2837 + %2839 = OpCompositeConstruct %v3float %2832 %2835 %2838 + %2840 = OpFMul %float %2830 %2830 + %2841 = OpCompositeConstruct %v3float %2840 %2830 %float_1 + %2842 = OpMatrixTimesVector %v3float %442 %2839 + %2843 = OpDot %float %2841 %2842 + OpBranch %2785 + %2785 = OpLabel + %2844 = OpPhi %float %2823 %2793 %2843 %2786 + OpBranch %2777 + %2778 = OpLabel + %2845 = OpFMul %float %2775 %float_3 + %2846 = OpExtInst %float %1 Log %float_9_99999975en05 + %2847 = OpFDiv %float %2846 %1065 + %2848 = OpFMul %float %float_3 %2690 + %2849 = OpFDiv %float %2848 %1065 + %2850 = OpFSub %float %2847 %2849 + %2851 = OpFAdd %float %2845 %2850 + OpBranch %2777 + %2777 = OpLabel + %2852 = OpPhi %float %2844 %2785 %2851 %2778 + %2853 = OpExtInst %float %1 Pow %float_10 %2852 + %2854 = OpCompositeInsert %v3float %2853 %2770 1 + %2855 = OpCompositeExtract %float %2479 2 + OpStore %526 %479 + OpStore %525 %480 + %2856 = OpFOrdLessThanEqual %bool %2855 %float_0 + %2857 = OpSelect %float %2856 %float_9_99999975en05 %2855 + %2858 = OpExtInst %float %1 Log %2857 + %2859 = OpFDiv %float %2858 %1065 + %2860 = OpFOrdLessThanEqual %bool %2859 %2691 + OpSelectionMerge %2861 None + OpBranchConditional %2860 %2862 %2863 + %2863 = OpLabel + %2864 = OpFOrdGreaterThan %bool %2859 %2691 + %2865 = OpExtInst %float %1 Log %2612 + %2866 = OpFDiv %float %2865 %1065 + %2867 = OpFOrdLessThan %bool %2859 %2866 + %2868 = OpLogicalAnd %bool %2864 %2867 + OpSelectionMerge %2869 None + OpBranchConditional %2868 %2870 %2871 + %2871 = OpLabel + %2872 = OpFOrdGreaterThanEqual %bool %2859 %2866 + %2873 = OpExtInst %float %1 Log %2684 + %2874 = OpFDiv %float %2873 %1065 + %2875 = OpFOrdLessThan %bool %2859 %2874 + %2876 = OpLogicalAnd %bool %2872 %2875 + OpSelectionMerge %2877 None + OpBranchConditional %2876 %2878 %2879 + %2879 = OpLabel + %2880 = OpFMul %float %2859 %float_0_0599999987 + %2881 = OpExtInst %float %1 Log %float_1000 + %2882 = OpFDiv %float %2881 %1065 + %2883 = OpFMul %float %float_0_0599999987 %2873 + %2884 = OpFDiv %float %2883 %1065 + %2885 = OpFSub %float %2882 %2884 + %2886 = OpFAdd %float %2880 %2885 + OpBranch %2877 + %2878 = OpLabel + %2887 = OpFSub %float %2859 %2866 + %2888 = OpFMul %float %float_7 %2887 + %2889 = OpFSub %float %2874 %2866 + %2890 = OpFDiv %float %2888 %2889 + %2891 = OpConvertFToS %int %2890 + %2892 = OpConvertSToF %float %2891 + %2893 = OpFSub %float %2890 %2892 + %2894 = OpAccessChain %_ptr_Function_float %525 %2891 + %2895 = OpLoad %float %2894 + %2896 = OpIAdd %int %2891 %int_1 + %2897 = OpAccessChain %_ptr_Function_float %525 %2896 + %2898 = OpLoad %float %2897 + %2899 = OpIAdd %int %2891 %int_2 + %2900 = OpAccessChain %_ptr_Function_float %525 %2899 + %2901 = OpLoad %float %2900 + %2902 = OpCompositeConstruct %v3float %2895 %2898 %2901 + %2903 = OpFMul %float %2893 %2893 + %2904 = OpCompositeConstruct %v3float %2903 %2893 %float_1 + %2905 = OpMatrixTimesVector %v3float %442 %2902 + %2906 = OpDot %float %2904 %2905 + OpBranch %2877 + %2877 = OpLabel + %2907 = OpPhi %float %2886 %2879 %2906 %2878 + OpBranch %2869 + %2870 = OpLabel + %2908 = OpFSub %float %2859 %2691 + %2909 = OpFMul %float %float_7 %2908 + %2910 = OpFSub %float %2866 %2691 + %2911 = OpFDiv %float %2909 %2910 + %2912 = OpConvertFToS %int %2911 + %2913 = OpConvertSToF %float %2912 + %2914 = OpFSub %float %2911 %2913 + %2915 = OpAccessChain %_ptr_Function_float %526 %2912 + %2916 = OpLoad %float %2915 + %2917 = OpIAdd %int %2912 %int_1 + %2918 = OpAccessChain %_ptr_Function_float %526 %2917 + %2919 = OpLoad %float %2918 + %2920 = OpIAdd %int %2912 %int_2 + %2921 = OpAccessChain %_ptr_Function_float %526 %2920 + %2922 = OpLoad %float %2921 + %2923 = OpCompositeConstruct %v3float %2916 %2919 %2922 + %2924 = OpFMul %float %2914 %2914 + %2925 = OpCompositeConstruct %v3float %2924 %2914 %float_1 + %2926 = OpMatrixTimesVector %v3float %442 %2923 + %2927 = OpDot %float %2925 %2926 + OpBranch %2869 + %2869 = OpLabel + %2928 = OpPhi %float %2907 %2877 %2927 %2870 + OpBranch %2861 + %2862 = OpLabel + %2929 = OpFMul %float %2859 %float_3 + %2930 = OpExtInst %float %1 Log %float_9_99999975en05 + %2931 = OpFDiv %float %2930 %1065 + %2932 = OpFMul %float %float_3 %2690 + %2933 = OpFDiv %float %2932 %1065 + %2934 = OpFSub %float %2931 %2933 + %2935 = OpFAdd %float %2929 %2934 + OpBranch %2861 + %2861 = OpLabel + %2936 = OpPhi %float %2928 %2869 %2935 %2862 + %2937 = OpExtInst %float %1 Pow %float_10 %2936 + %2938 = OpCompositeInsert %v3float %2937 %2854 2 + %2939 = OpFSub %v3float %2938 %338 + %2940 = OpVectorTimesMatrix %v3float %2939 %576 + %2941 = OpFMul %v3float %2940 %496 + %2942 = OpExtInst %v3float %1 Pow %2941 %263 + %2943 = OpFMul %v3float %184 %2942 + %2944 = OpFAdd %v3float %183 %2943 + %2945 = OpFMul %v3float %185 %2942 + %2946 = OpFAdd %v3float %135 %2945 + %2947 = OpFDiv %v3float %135 %2946 + %2948 = OpFMul %v3float %2944 %2947 + %2949 = OpExtInst %v3float %1 Pow %2948 %264 + OpBranch %1230 + %1230 = OpLabel + %2950 = OpPhi %v3float %2097 %1236 %2949 %2861 + OpBranch %1224 + %1225 = OpLabel + %2951 = OpVectorTimesMatrix %v3float %1218 %547 + %2952 = OpVectorTimesMatrix %v3float %2951 %576 + %2953 = OpExtInst %v3float %1 FMax %250 %2952 + %2954 = OpFMul %v3float %2953 %252 + %2955 = OpExtInst %v3float %1 FMax %2953 %254 + %2956 = OpExtInst %v3float %1 Pow %2955 %256 + %2957 = OpFMul %v3float %2956 %258 + %2958 = OpFSub %v3float %2957 %260 + %2959 = OpExtInst %v3float %1 FMin %2954 %2958 + OpBranch %1224 + %1224 = OpLabel + %2960 = OpPhi %v3float %2950 %1230 %2959 %1225 + OpBranch %1220 + %1221 = OpLabel + %2961 = OpCompositeExtract %float %1218 0 + OpBranch %2962 + %2962 = OpLabel + OpLoopMerge %2963 %2964 None + OpBranch %2965 + %2965 = OpLabel + %2966 = OpFOrdLessThan %bool %2961 %float_0_00313066994 + OpSelectionMerge %2967 None + OpBranchConditional %2966 %2968 %2967 + %2968 = OpLabel + %2969 = OpFMul %float %2961 %float_12_9200001 + OpBranch %2963 + %2967 = OpLabel + %2970 = OpExtInst %float %1 Pow %2961 %float_0_416666657 + %2971 = OpFMul %float %2970 %float_1_05499995 + %2972 = OpFSub %float %2971 %float_0_0549999997 + OpBranch %2963 + %2964 = OpLabel + OpBranch %2962 + %2963 = OpLabel + %2973 = OpPhi %float %2969 %2968 %2972 %2967 + %2974 = OpCompositeExtract %float %1218 1 + OpBranch %2975 + %2975 = OpLabel + OpLoopMerge %2976 %2977 None + OpBranch %2978 + %2978 = OpLabel + %2979 = OpFOrdLessThan %bool %2974 %float_0_00313066994 + OpSelectionMerge %2980 None + OpBranchConditional %2979 %2981 %2980 + %2981 = OpLabel + %2982 = OpFMul %float %2974 %float_12_9200001 + OpBranch %2976 + %2980 = OpLabel + %2983 = OpExtInst %float %1 Pow %2974 %float_0_416666657 + %2984 = OpFMul %float %2983 %float_1_05499995 + %2985 = OpFSub %float %2984 %float_0_0549999997 + OpBranch %2976 + %2977 = OpLabel + OpBranch %2975 + %2976 = OpLabel + %2986 = OpPhi %float %2982 %2981 %2985 %2980 + %2987 = OpCompositeExtract %float %1218 2 + OpBranch %2988 + %2988 = OpLabel + OpLoopMerge %2989 %2990 None + OpBranch %2991 + %2991 = OpLabel + %2992 = OpFOrdLessThan %bool %2987 %float_0_00313066994 + OpSelectionMerge %2993 None + OpBranchConditional %2992 %2994 %2993 + %2994 = OpLabel + %2995 = OpFMul %float %2987 %float_12_9200001 + OpBranch %2989 + %2993 = OpLabel + %2996 = OpExtInst %float %1 Pow %2987 %float_0_416666657 + %2997 = OpFMul %float %2996 %float_1_05499995 + %2998 = OpFSub %float %2997 %float_0_0549999997 + OpBranch %2989 + %2990 = OpLabel + OpBranch %2988 + %2989 = OpLabel + %2999 = OpPhi %float %2995 %2994 %2998 %2993 + %3000 = OpCompositeConstruct %v3float %2973 %2986 %2999 + OpBranch %1220 + %1220 = OpLabel + %3001 = OpPhi %v3float %2960 %1224 %3000 %2989 + %3002 = OpFMul %v3float %3001 %499 + %3003 = OpVectorShuffle %v4float %129 %3002 4 5 6 3 + %3004 = OpCompositeInsert %v4float %float_0 %3003 3 + OpStore %out_var_SV_Target0 %3004 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag new file mode 100644 index 000000000..e0359bfdd --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag @@ -0,0 +1,3694 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 3107 +; Schema: 0 + OpCapability Shader + OpCapability Geometry + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %MainPS "main" %in_var_TEXCOORD0 %gl_FragCoord %gl_Layer %out_var_SV_Target0 + OpExecutionMode %MainPS OriginUpperLeft + OpSource HLSL 600 + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "MappingPolynomial" + OpMemberName %type__Globals 1 "InverseGamma" + OpMemberName %type__Globals 2 "ColorMatrixR_ColorCurveCd1" + OpMemberName %type__Globals 3 "ColorMatrixG_ColorCurveCd3Cm3" + OpMemberName %type__Globals 4 "ColorMatrixB_ColorCurveCm2" + OpMemberName %type__Globals 5 "ColorCurve_Cm0Cd0_Cd2_Ch0Cm1_Ch3" + OpMemberName %type__Globals 6 "ColorCurve_Ch1_Ch2" + OpMemberName %type__Globals 7 "ColorShadow_Luma" + OpMemberName %type__Globals 8 "ColorShadow_Tint1" + OpMemberName %type__Globals 9 "ColorShadow_Tint2" + OpMemberName %type__Globals 10 "FilmSlope" + OpMemberName %type__Globals 11 "FilmToe" + OpMemberName %type__Globals 12 "FilmShoulder" + OpMemberName %type__Globals 13 "FilmBlackClip" + OpMemberName %type__Globals 14 "FilmWhiteClip" + OpMemberName %type__Globals 15 "LUTWeights" + OpMemberName %type__Globals 16 "ColorScale" + OpMemberName %type__Globals 17 "OverlayColor" + OpMemberName %type__Globals 18 "WhiteTemp" + OpMemberName %type__Globals 19 "WhiteTint" + OpMemberName %type__Globals 20 "ColorSaturation" + OpMemberName %type__Globals 21 "ColorContrast" + OpMemberName %type__Globals 22 "ColorGamma" + OpMemberName %type__Globals 23 "ColorGain" + OpMemberName %type__Globals 24 "ColorOffset" + OpMemberName %type__Globals 25 "ColorSaturationShadows" + OpMemberName %type__Globals 26 "ColorContrastShadows" + OpMemberName %type__Globals 27 "ColorGammaShadows" + OpMemberName %type__Globals 28 "ColorGainShadows" + OpMemberName %type__Globals 29 "ColorOffsetShadows" + OpMemberName %type__Globals 30 "ColorSaturationMidtones" + OpMemberName %type__Globals 31 "ColorContrastMidtones" + OpMemberName %type__Globals 32 "ColorGammaMidtones" + OpMemberName %type__Globals 33 "ColorGainMidtones" + OpMemberName %type__Globals 34 "ColorOffsetMidtones" + OpMemberName %type__Globals 35 "ColorSaturationHighlights" + OpMemberName %type__Globals 36 "ColorContrastHighlights" + OpMemberName %type__Globals 37 "ColorGammaHighlights" + OpMemberName %type__Globals 38 "ColorGainHighlights" + OpMemberName %type__Globals 39 "ColorOffsetHighlights" + OpMemberName %type__Globals 40 "ColorCorrectionShadowsMax" + OpMemberName %type__Globals 41 "ColorCorrectionHighlightsMin" + OpMemberName %type__Globals 42 "OutputDevice" + OpMemberName %type__Globals 43 "OutputGamut" + OpMemberName %type__Globals 44 "BlueCorrection" + OpMemberName %type__Globals 45 "ExpandGamut" + OpName %_Globals "$Globals" + OpName %type_2d_image "type.2d.image" + OpName %Texture1 "Texture1" + OpName %type_sampler "type.sampler" + OpName %Texture1Sampler "Texture1Sampler" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %MainPS "MainPS" + OpName %type_sampled_image "type.sampled.image" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorate %in_var_TEXCOORD0 NoPerspective + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_POSITION" + OpDecorate %gl_Layer BuiltIn Layer + OpDecorateString %gl_Layer UserSemantic "SV_RenderTargetArrayIndex" + OpDecorate %gl_Layer Flat + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD0 Location 0 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 0 + OpDecorate %Texture1 DescriptorSet 0 + OpDecorate %Texture1 Binding 0 + OpDecorate %Texture1Sampler DescriptorSet 0 + OpDecorate %Texture1Sampler Binding 0 + OpDecorate %_arr_float_uint_5 ArrayStride 16 + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 2 Offset 32 + OpMemberDecorate %type__Globals 3 Offset 48 + OpMemberDecorate %type__Globals 4 Offset 64 + OpMemberDecorate %type__Globals 5 Offset 80 + OpMemberDecorate %type__Globals 6 Offset 96 + OpMemberDecorate %type__Globals 7 Offset 112 + OpMemberDecorate %type__Globals 8 Offset 128 + OpMemberDecorate %type__Globals 9 Offset 144 + OpMemberDecorate %type__Globals 10 Offset 160 + OpMemberDecorate %type__Globals 11 Offset 164 + OpMemberDecorate %type__Globals 12 Offset 168 + OpMemberDecorate %type__Globals 13 Offset 172 + OpMemberDecorate %type__Globals 14 Offset 176 + OpMemberDecorate %type__Globals 15 Offset 192 + OpMemberDecorate %type__Globals 16 Offset 272 + OpMemberDecorate %type__Globals 17 Offset 288 + OpMemberDecorate %type__Globals 18 Offset 304 + OpMemberDecorate %type__Globals 19 Offset 308 + OpMemberDecorate %type__Globals 20 Offset 320 + OpMemberDecorate %type__Globals 21 Offset 336 + OpMemberDecorate %type__Globals 22 Offset 352 + OpMemberDecorate %type__Globals 23 Offset 368 + OpMemberDecorate %type__Globals 24 Offset 384 + OpMemberDecorate %type__Globals 25 Offset 400 + OpMemberDecorate %type__Globals 26 Offset 416 + OpMemberDecorate %type__Globals 27 Offset 432 + OpMemberDecorate %type__Globals 28 Offset 448 + OpMemberDecorate %type__Globals 29 Offset 464 + OpMemberDecorate %type__Globals 30 Offset 480 + OpMemberDecorate %type__Globals 31 Offset 496 + OpMemberDecorate %type__Globals 32 Offset 512 + OpMemberDecorate %type__Globals 33 Offset 528 + OpMemberDecorate %type__Globals 34 Offset 544 + OpMemberDecorate %type__Globals 35 Offset 560 + OpMemberDecorate %type__Globals 36 Offset 576 + OpMemberDecorate %type__Globals 37 Offset 592 + OpMemberDecorate %type__Globals 38 Offset 608 + OpMemberDecorate %type__Globals 39 Offset 624 + OpMemberDecorate %type__Globals 40 Offset 640 + OpMemberDecorate %type__Globals 41 Offset 644 + OpMemberDecorate %type__Globals 42 Offset 648 + OpMemberDecorate %type__Globals 43 Offset 652 + OpMemberDecorate %type__Globals 44 Offset 656 + OpMemberDecorate %type__Globals 45 Offset 660 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 +%float_0_952552378 = OpConstant %float 0.952552378 + %float_0 = OpConstant %float 0 + +; HACK: Needed to hack this constant since MSVC and GNU libc are off by 1 ULP when converting to string (it probably still works fine though in a roundtrip ...) +%float_9_36786018en05 = OpConstant %float 9.25 + +%float_0_343966454 = OpConstant %float 0.343966454 +%float_0_728166103 = OpConstant %float 0.728166103 +%float_n0_0721325427 = OpConstant %float -0.0721325427 +%float_1_00882518 = OpConstant %float 1.00882518 +%float_1_04981101 = OpConstant %float 1.04981101 +%float_n9_74845025en05 = OpConstant %float -9.74845025e-05 +%float_n0_495903015 = OpConstant %float -0.495903015 +%float_1_37331307 = OpConstant %float 1.37331307 +%float_0_0982400328 = OpConstant %float 0.0982400328 +%float_0_991252005 = OpConstant %float 0.991252005 +%float_0_662454188 = OpConstant %float 0.662454188 +%float_0_134004205 = OpConstant %float 0.134004205 +%float_0_156187683 = OpConstant %float 0.156187683 +%float_0_272228718 = OpConstant %float 0.272228718 +%float_0_674081743 = OpConstant %float 0.674081743 +%float_0_0536895171 = OpConstant %float 0.0536895171 +%float_n0_00557464967 = OpConstant %float -0.00557464967 +%float_0_0040607336 = OpConstant %float 0.0040607336 +%float_1_01033914 = OpConstant %float 1.01033914 +%float_1_6410234 = OpConstant %float 1.6410234 +%float_n0_324803293 = OpConstant %float -0.324803293 +%float_n0_236424699 = OpConstant %float -0.236424699 +%float_n0_663662851 = OpConstant %float -0.663662851 +%float_1_61533165 = OpConstant %float 1.61533165 +%float_0_0167563483 = OpConstant %float 0.0167563483 +%float_0_0117218941 = OpConstant %float 0.0117218941 +%float_n0_00828444213 = OpConstant %float -0.00828444213 +%float_0_988394856 = OpConstant %float 0.988394856 +%float_1_45143926 = OpConstant %float 1.45143926 +%float_n0_236510754 = OpConstant %float -0.236510754 +%float_n0_214928567 = OpConstant %float -0.214928567 +%float_n0_0765537769 = OpConstant %float -0.0765537769 +%float_1_17622972 = OpConstant %float 1.17622972 +%float_n0_0996759236 = OpConstant %float -0.0996759236 +%float_0_00831614807 = OpConstant %float 0.00831614807 +%float_n0_00603244966 = OpConstant %float -0.00603244966 +%float_0_997716308 = OpConstant %float 0.997716308 +%float_0_695452213 = OpConstant %float 0.695452213 +%float_0_140678704 = OpConstant %float 0.140678704 +%float_0_163869068 = OpConstant %float 0.163869068 +%float_0_0447945632 = OpConstant %float 0.0447945632 +%float_0_859671116 = OpConstant %float 0.859671116 +%float_0_0955343172 = OpConstant %float 0.0955343172 +%float_n0_00552588282 = OpConstant %float -0.00552588282 +%float_0_00402521016 = OpConstant %float 0.00402521016 +%float_1_00150073 = OpConstant %float 1.00150073 + %73 = OpConstantComposite %v3float %float_0_272228718 %float_0_674081743 %float_0_0536895171 +%float_3_2409699 = OpConstant %float 3.2409699 +%float_n1_5373832 = OpConstant %float -1.5373832 +%float_n0_498610765 = OpConstant %float -0.498610765 +%float_n0_969243646 = OpConstant %float -0.969243646 +%float_1_8759675 = OpConstant %float 1.8759675 +%float_0_0415550582 = OpConstant %float 0.0415550582 +%float_0_0556300804 = OpConstant %float 0.0556300804 +%float_n0_203976959 = OpConstant %float -0.203976959 +%float_1_05697155 = OpConstant %float 1.05697155 +%float_0_412456393 = OpConstant %float 0.412456393 +%float_0_357576102 = OpConstant %float 0.357576102 +%float_0_180437505 = OpConstant %float 0.180437505 +%float_0_212672904 = OpConstant %float 0.212672904 +%float_0_715152204 = OpConstant %float 0.715152204 +%float_0_0721750036 = OpConstant %float 0.0721750036 +%float_0_0193339009 = OpConstant %float 0.0193339009 +%float_0_119191997 = OpConstant %float 0.119191997 +%float_0_950304091 = OpConstant %float 0.950304091 +%float_1_71660841 = OpConstant %float 1.71660841 +%float_n0_355662107 = OpConstant %float -0.355662107 +%float_n0_253360093 = OpConstant %float -0.253360093 +%float_n0_666682899 = OpConstant %float -0.666682899 +%float_1_61647761 = OpConstant %float 1.61647761 +%float_0_0157685 = OpConstant %float 0.0157685 +%float_0_0176422 = OpConstant %float 0.0176422 +%float_n0_0427763015 = OpConstant %float -0.0427763015 +%float_0_942228675 = OpConstant %float 0.942228675 +%float_2_49339628 = OpConstant %float 2.49339628 +%float_n0_93134588 = OpConstant %float -0.93134588 +%float_n0_402694494 = OpConstant %float -0.402694494 +%float_n0_829486787 = OpConstant %float -0.829486787 +%float_1_76265967 = OpConstant %float 1.76265967 +%float_0_0236246008 = OpConstant %float 0.0236246008 +%float_0_0358507 = OpConstant %float 0.0358507 +%float_n0_0761827007 = OpConstant %float -0.0761827007 +%float_0_957014024 = OpConstant %float 0.957014024 +%float_1_01303005 = OpConstant %float 1.01303005 +%float_0_00610530982 = OpConstant %float 0.00610530982 +%float_n0_0149710001 = OpConstant %float -0.0149710001 +%float_0_00769822998 = OpConstant %float 0.00769822998 +%float_0_998165011 = OpConstant %float 0.998165011 +%float_n0_00503202993 = OpConstant %float -0.00503202993 +%float_n0_00284131011 = OpConstant %float -0.00284131011 +%float_0_00468515977 = OpConstant %float 0.00468515977 +%float_0_924507022 = OpConstant %float 0.924507022 +%float_0_987223983 = OpConstant %float 0.987223983 +%float_n0_00611326983 = OpConstant %float -0.00611326983 +%float_0_0159533005 = OpConstant %float 0.0159533005 +%float_n0_00759836007 = OpConstant %float -0.00759836007 +%float_1_00186002 = OpConstant %float 1.00186002 +%float_0_0053300201 = OpConstant %float 0.0053300201 +%float_0_00307257008 = OpConstant %float 0.00307257008 +%float_n0_00509594986 = OpConstant %float -0.00509594986 +%float_1_08168006 = OpConstant %float 1.08168006 + %float_0_5 = OpConstant %float 0.5 + %float_n1 = OpConstant %float -1 + %float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 +%float_0_015625 = OpConstant %float 0.015625 + %134 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 + %135 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int_43 = OpConstant %int 43 + %uint_3 = OpConstant %uint 3 + %138 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %int_9 = OpConstant %int 9 + %int_3 = OpConstant %int 3 + %141 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %float_n4 = OpConstant %float -4 + %int_45 = OpConstant %int 45 +%float_0_544169128 = OpConstant %float 0.544169128 +%float_0_239592597 = OpConstant %float 0.239592597 +%float_0_166694298 = OpConstant %float 0.166694298 +%float_0_239465594 = OpConstant %float 0.239465594 +%float_0_702153027 = OpConstant %float 0.702153027 +%float_0_058381401 = OpConstant %float 0.058381401 +%float_n0_00234390004 = OpConstant %float -0.00234390004 +%float_0_0361833982 = OpConstant %float 0.0361833982 +%float_1_05521834 = OpConstant %float 1.05521834 +%float_0_940437257 = OpConstant %float 0.940437257 +%float_n0_0183068793 = OpConstant %float -0.0183068793 +%float_0_077869609 = OpConstant %float 0.077869609 +%float_0_00837869663 = OpConstant %float 0.00837869663 +%float_0_828660011 = OpConstant %float 0.828660011 +%float_0_162961304 = OpConstant %float 0.162961304 +%float_0_00054712611 = OpConstant %float 0.00054712611 +%float_n0_000883374596 = OpConstant %float -0.000883374596 +%float_1_00033629 = OpConstant %float 1.00033629 +%float_1_06317997 = OpConstant %float 1.06317997 +%float_0_0233955998 = OpConstant %float 0.0233955998 +%float_n0_0865726024 = OpConstant %float -0.0865726024 +%float_n0_0106336996 = OpConstant %float -0.0106336996 +%float_1_20632005 = OpConstant %float 1.20632005 +%float_n0_195690006 = OpConstant %float -0.195690006 +%float_n0_000590886979 = OpConstant %float -0.000590886979 +%float_0_00105247996 = OpConstant %float 0.00105247996 +%float_0_999538004 = OpConstant %float 0.999538004 + %int_44 = OpConstant %int 44 +%float_0_9375 = OpConstant %float 0.9375 + %173 = OpConstantComposite %v3float %float_0_9375 %float_0_9375 %float_0_9375 +%float_0_03125 = OpConstant %float 0.03125 + %175 = OpConstantComposite %v3float %float_0_03125 %float_0_03125 %float_0_03125 + %int_15 = OpConstant %int 15 + %float_16 = OpConstant %float 16 + %int_16 = OpConstant %int 16 + %int_17 = OpConstant %int 17 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %uint_5 = OpConstant %uint 5 + %uint_6 = OpConstant %uint 6 + %int_2 = OpConstant %int 2 +%mat3v3float = OpTypeMatrix %v3float 3 + %int_42 = OpConstant %int 42 +%float_0_159301758 = OpConstant %float 0.159301758 +%float_78_84375 = OpConstant %float 78.84375 +%float_0_8359375 = OpConstant %float 0.8359375 +%float_18_8515625 = OpConstant %float 18.8515625 +%float_18_6875 = OpConstant %float 18.6875 +%float_10000 = OpConstant %float 10000 +%float_0_0126833133 = OpConstant %float 0.0126833133 + %194 = OpConstantComposite %v3float %float_0_0126833133 %float_0_0126833133 %float_0_0126833133 + %195 = OpConstantComposite %v3float %float_0_8359375 %float_0_8359375 %float_0_8359375 + %196 = OpConstantComposite %v3float %float_18_8515625 %float_18_8515625 %float_18_8515625 + %197 = OpConstantComposite %v3float %float_18_6875 %float_18_6875 %float_18_6875 +%float_6_27739477 = OpConstant %float 6.27739477 + %199 = OpConstantComposite %v3float %float_6_27739477 %float_6_27739477 %float_6_27739477 + %200 = OpConstantComposite %v3float %float_10000 %float_10000 %float_10000 + %float_14 = OpConstant %float 14 +%float_0_180000007 = OpConstant %float 0.180000007 +%float_0_434017599 = OpConstant %float 0.434017599 + %204 = OpConstantComposite %v3float %float_0_434017599 %float_0_434017599 %float_0_434017599 + %205 = OpConstantComposite %v3float %float_14 %float_14 %float_14 + %206 = OpConstantComposite %v3float %float_0_180000007 %float_0_180000007 %float_0_180000007 + %int_18 = OpConstant %int 18 + %float_4000 = OpConstant %float 4000 +%float_0_312700003 = OpConstant %float 0.312700003 +%float_0_328999996 = OpConstant %float 0.328999996 + %int_19 = OpConstant %int 19 + %int_25 = OpConstant %int 25 + %int_20 = OpConstant %int 20 + %int_26 = OpConstant %int 26 + %int_21 = OpConstant %int 21 + %int_27 = OpConstant %int 27 + %int_22 = OpConstant %int 22 + %int_28 = OpConstant %int 28 + %int_23 = OpConstant %int 23 + %int_29 = OpConstant %int 29 + %int_24 = OpConstant %int 24 + %int_40 = OpConstant %int 40 + %int_35 = OpConstant %int 35 + %int_36 = OpConstant %int 36 + %int_37 = OpConstant %int 37 + %int_38 = OpConstant %int 38 + %int_39 = OpConstant %int 39 + %int_41 = OpConstant %int 41 + %int_30 = OpConstant %int 30 + %int_31 = OpConstant %int 31 + %int_32 = OpConstant %int 32 + %int_33 = OpConstant %int 33 + %int_34 = OpConstant %int 34 +%float_0_0500000007 = OpConstant %float 0.0500000007 + %float_1_75 = OpConstant %float 1.75 +%float_0_400000006 = OpConstant %float 0.400000006 +%float_0_819999993 = OpConstant %float 0.819999993 +%float_0_0299999993 = OpConstant %float 0.0299999993 + %float_2 = OpConstant %float 2 +%float_0_959999979 = OpConstant %float 0.959999979 + %241 = OpConstantComposite %v3float %float_0_959999979 %float_0_959999979 %float_0_959999979 + %int_13 = OpConstant %int 13 + %int_11 = OpConstant %int 11 + %int_14 = OpConstant %int 14 + %int_12 = OpConstant %int 12 +%float_0_800000012 = OpConstant %float 0.800000012 + %int_10 = OpConstant %int 10 + %float_10 = OpConstant %float 10 + %float_n2 = OpConstant %float -2 + %float_3 = OpConstant %float 3 + %251 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %252 = OpConstantComposite %v3float %float_2 %float_2 %float_2 +%float_0_930000007 = OpConstant %float 0.930000007 + %254 = OpConstantComposite %v3float %float_0_930000007 %float_0_930000007 %float_0_930000007 + %int_4 = OpConstant %int 4 + %int_8 = OpConstant %int 8 + %int_7 = OpConstant %int 7 + %int_5 = OpConstant %int 5 + %int_6 = OpConstant %int 6 +%float_0_00200000009 = OpConstant %float 0.00200000009 + %261 = OpConstantComposite %v3float %float_0_00200000009 %float_0_00200000009 %float_0_00200000009 +%float_6_10351999en05 = OpConstant %float 6.10351999e-05 + %263 = OpConstantComposite %v3float %float_6_10351999en05 %float_6_10351999en05 %float_6_10351999en05 +%float_0_0404499993 = OpConstant %float 0.0404499993 + %265 = OpConstantComposite %v3float %float_0_0404499993 %float_0_0404499993 %float_0_0404499993 +%float_0_947867274 = OpConstant %float 0.947867274 + %267 = OpConstantComposite %v3float %float_0_947867274 %float_0_947867274 %float_0_947867274 +%float_0_0521326996 = OpConstant %float 0.0521326996 + %269 = OpConstantComposite %v3float %float_0_0521326996 %float_0_0521326996 %float_0_0521326996 +%float_2_4000001 = OpConstant %float 2.4000001 + %271 = OpConstantComposite %v3float %float_2_4000001 %float_2_4000001 %float_2_4000001 +%float_0_0773993805 = OpConstant %float 0.0773993805 + %273 = OpConstantComposite %v3float %float_0_0773993805 %float_0_0773993805 %float_0_0773993805 + %float_4_5 = OpConstant %float 4.5 + %275 = OpConstantComposite %v3float %float_4_5 %float_4_5 %float_4_5 +%float_0_0179999992 = OpConstant %float 0.0179999992 + %277 = OpConstantComposite %v3float %float_0_0179999992 %float_0_0179999992 %float_0_0179999992 +%float_0_449999988 = OpConstant %float 0.449999988 + %279 = OpConstantComposite %v3float %float_0_449999988 %float_0_449999988 %float_0_449999988 +%float_1_09899998 = OpConstant %float 1.09899998 + %281 = OpConstantComposite %v3float %float_1_09899998 %float_1_09899998 %float_1_09899998 +%float_0_0989999995 = OpConstant %float 0.0989999995 + %283 = OpConstantComposite %v3float %float_0_0989999995 %float_0_0989999995 %float_0_0989999995 + %float_1_5 = OpConstant %float 1.5 + %285 = OpConstantComposite %v3float %float_1_5 %float_1_5 %float_1_5 + %286 = OpConstantComposite %v3float %float_0_159301758 %float_0_159301758 %float_0_159301758 + %287 = OpConstantComposite %v3float %float_78_84375 %float_78_84375 %float_78_84375 +%float_1_00055635 = OpConstant %float 1.00055635 + %float_7000 = OpConstant %float 7000 +%float_0_244063005 = OpConstant %float 0.244063005 +%float_99_1100006 = OpConstant %float 99.1100006 +%float_2967800 = OpConstant %float 2967800 +%float_0_237039998 = OpConstant %float 0.237039998 +%float_247_479996 = OpConstant %float 247.479996 +%float_1901800 = OpConstant %float 1901800 + %float_n3 = OpConstant %float -3 +%float_2_86999989 = OpConstant %float 2.86999989 +%float_0_275000006 = OpConstant %float 0.275000006 +%float_0_860117733 = OpConstant %float 0.860117733 +%float_0_000154118257 = OpConstant %float 0.000154118257 +%float_1_28641219en07 = OpConstant %float 1.28641219e-07 +%float_0_00084242021 = OpConstant %float 0.00084242021 +%float_7_08145137en07 = OpConstant %float 7.08145137e-07 +%float_0_317398727 = OpConstant %float 0.317398727 + +; HACK: Needed to hack this constant since MSVC and GNU libc are off by 1 ULP when converting to string (it probably still works fine though in a roundtrip ...) +%float_4_22806261en05 = OpConstant %float 4.25 + +%float_4_20481676en08 = OpConstant %float 4.20481676e-08 +%float_2_8974182en05 = OpConstant %float 2.8974182e-05 +%float_1_61456057en07 = OpConstant %float 1.61456057e-07 + %float_8 = OpConstant %float 8 + %float_4 = OpConstant %float 4 +%float_0_895099998 = OpConstant %float 0.895099998 +%float_0_266400009 = OpConstant %float 0.266400009 +%float_n0_161400005 = OpConstant %float -0.161400005 +%float_n0_750199974 = OpConstant %float -0.750199974 +%float_1_71350002 = OpConstant %float 1.71350002 +%float_0_0366999991 = OpConstant %float 0.0366999991 +%float_0_0388999991 = OpConstant %float 0.0388999991 +%float_n0_0684999973 = OpConstant %float -0.0684999973 +%float_1_02960002 = OpConstant %float 1.02960002 +%float_0_986992896 = OpConstant %float 0.986992896 +%float_n0_1470543 = OpConstant %float -0.1470543 +%float_0_159962699 = OpConstant %float 0.159962699 +%float_0_432305306 = OpConstant %float 0.432305306 +%float_0_518360317 = OpConstant %float 0.518360317 +%float_0_0492912009 = OpConstant %float 0.0492912009 +%float_n0_0085287001 = OpConstant %float -0.0085287001 +%float_0_040042799 = OpConstant %float 0.040042799 +%float_0_968486726 = OpConstant %float 0.968486726 +%float_5_55555534 = OpConstant %float 5.55555534 + %330 = OpConstantComposite %v3float %float_5_55555534 %float_5_55555534 %float_5_55555534 +%float_1_00000001en10 = OpConstant %float 1.00000001e-10 +%float_0_00999999978 = OpConstant %float 0.00999999978 +%float_0_666666687 = OpConstant %float 0.666666687 + %float_180 = OpConstant %float 180 + %float_360 = OpConstant %float 360 +%float_65535 = OpConstant %float 65535 + %337 = OpConstantComposite %v3float %float_65535 %float_65535 %float_65535 +%float_n4_97062206 = OpConstant %float -4.97062206 +%float_n3_02937818 = OpConstant %float -3.02937818 +%float_n2_12619996 = OpConstant %float -2.12619996 +%float_n1_51049995 = OpConstant %float -1.51049995 +%float_n1_05780005 = OpConstant %float -1.05780005 +%float_n0_466800004 = OpConstant %float -0.466800004 +%float_0_119379997 = OpConstant %float 0.119379997 +%float_0_708813429 = OpConstant %float 0.708813429 +%float_1_29118657 = OpConstant %float 1.29118657 +%float_0_808913231 = OpConstant %float 0.808913231 +%float_1_19108677 = OpConstant %float 1.19108677 +%float_1_56830001 = OpConstant %float 1.56830001 +%float_1_9483 = OpConstant %float 1.9483 +%float_2_30830002 = OpConstant %float 2.30830002 +%float_2_63840008 = OpConstant %float 2.63840008 +%float_2_85949993 = OpConstant %float 2.85949993 +%float_2_98726082 = OpConstant %float 2.98726082 +%float_3_01273918 = OpConstant %float 3.01273918 +%float_0_179999992 = OpConstant %float 0.179999992 +%float_9_99999975en05 = OpConstant %float 9.99999975e-05 + %float_1000 = OpConstant %float 1000 +%float_0_0599999987 = OpConstant %float 0.0599999987 +%float_3_50738446en05 = OpConstant %float 3.50738446e-05 + %361 = OpConstantComposite %v3float %float_3_50738446en05 %float_3_50738446en05 %float_3_50738446en05 +%float_n2_30102992 = OpConstant %float -2.30102992 +%float_n1_93120003 = OpConstant %float -1.93120003 +%float_n1_52049994 = OpConstant %float -1.52049994 +%float_0_801995218 = OpConstant %float 0.801995218 +%float_1_19800484 = OpConstant %float 1.19800484 +%float_1_59430003 = OpConstant %float 1.59430003 +%float_1_99730003 = OpConstant %float 1.99730003 +%float_2_37829995 = OpConstant %float 2.37829995 +%float_2_76839995 = OpConstant %float 2.76839995 +%float_3_05150008 = OpConstant %float 3.05150008 +%float_3_27462935 = OpConstant %float 3.27462935 +%float_3_32743073 = OpConstant %float 3.32743073 +%float_0_00499999989 = OpConstant %float 0.00499999989 + %float_11 = OpConstant %float 11 + %float_2000 = OpConstant %float 2000 +%float_0_119999997 = OpConstant %float 0.119999997 +%float_0_00313066994 = OpConstant %float 0.00313066994 +%float_12_9200001 = OpConstant %float 12.9200001 +%float_0_416666657 = OpConstant %float 0.416666657 +%float_1_05499995 = OpConstant %float 1.05499995 +%float_0_0549999997 = OpConstant %float 0.0549999997 +%float_n0_166666672 = OpConstant %float -0.166666672 + %float_n0_5 = OpConstant %float -0.5 +%float_0_166666672 = OpConstant %float 0.166666672 +%float_n3_15737653 = OpConstant %float -3.15737653 +%float_n0_485249996 = OpConstant %float -0.485249996 +%float_1_84773242 = OpConstant %float 1.84773242 +%float_n0_718548238 = OpConstant %float -0.718548238 +%float_2_08103061 = OpConstant %float 2.08103061 +%float_3_6681242 = OpConstant %float 3.6681242 + %float_18 = OpConstant %float 18 + %float_7 = OpConstant %float 7 +%_arr_float_uint_5 = OpTypeArray %float %uint_5 +%type__Globals = OpTypeStruct %v4float %v3float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %float %float %float %float %float %_arr_float_uint_5 %v3float %v4float %float %float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %float %float %uint %uint %float %float +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%_ptr_Input_v2float = OpTypePointer Input %v2float +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %402 = OpTypeFunction %void +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %bool = OpTypeBool +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 +%type_sampled_image = OpTypeSampledImage %type_2d_image + %uint_10 = OpConstant %uint 10 +%_arr_float_uint_10 = OpTypeArray %float %uint_10 +%_arr_float_uint_6 = OpTypeArray %float %uint_6 + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform + %Texture1 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Texture1Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input + %gl_Layer = OpVariable %_ptr_Input_uint Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output +%_ptr_Function__arr_float_uint_6 = OpTypePointer Function %_arr_float_uint_6 +%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10 + %416 = OpConstantComposite %v3float %float_0_952552378 %float_0 %float_9_36786018en05 + %417 = OpConstantComposite %v3float %float_0_343966454 %float_0_728166103 %float_n0_0721325427 + %418 = OpConstantComposite %v3float %float_0 %float_0 %float_1_00882518 + %419 = OpConstantComposite %mat3v3float %416 %417 %418 + %420 = OpConstantComposite %v3float %float_1_04981101 %float_0 %float_n9_74845025en05 + %421 = OpConstantComposite %v3float %float_n0_495903015 %float_1_37331307 %float_0_0982400328 + %422 = OpConstantComposite %v3float %float_0 %float_0 %float_0_991252005 + %423 = OpConstantComposite %mat3v3float %420 %421 %422 + %424 = OpConstantComposite %v3float %float_0_662454188 %float_0_134004205 %float_0_156187683 + %425 = OpConstantComposite %v3float %float_n0_00557464967 %float_0_0040607336 %float_1_01033914 + %426 = OpConstantComposite %mat3v3float %424 %73 %425 + %427 = OpConstantComposite %v3float %float_1_6410234 %float_n0_324803293 %float_n0_236424699 + %428 = OpConstantComposite %v3float %float_n0_663662851 %float_1_61533165 %float_0_0167563483 + %429 = OpConstantComposite %v3float %float_0_0117218941 %float_n0_00828444213 %float_0_988394856 + %430 = OpConstantComposite %mat3v3float %427 %428 %429 + %431 = OpConstantComposite %v3float %float_1_45143926 %float_n0_236510754 %float_n0_214928567 + %432 = OpConstantComposite %v3float %float_n0_0765537769 %float_1_17622972 %float_n0_0996759236 + %433 = OpConstantComposite %v3float %float_0_00831614807 %float_n0_00603244966 %float_0_997716308 + %434 = OpConstantComposite %mat3v3float %431 %432 %433 + %435 = OpConstantComposite %v3float %float_0_695452213 %float_0_140678704 %float_0_163869068 + %436 = OpConstantComposite %v3float %float_0_0447945632 %float_0_859671116 %float_0_0955343172 + %437 = OpConstantComposite %v3float %float_n0_00552588282 %float_0_00402521016 %float_1_00150073 + %438 = OpConstantComposite %mat3v3float %435 %436 %437 + %439 = OpConstantComposite %v3float %float_3_2409699 %float_n1_5373832 %float_n0_498610765 + %440 = OpConstantComposite %v3float %float_n0_969243646 %float_1_8759675 %float_0_0415550582 + %441 = OpConstantComposite %v3float %float_0_0556300804 %float_n0_203976959 %float_1_05697155 + %442 = OpConstantComposite %mat3v3float %439 %440 %441 + %443 = OpConstantComposite %v3float %float_0_412456393 %float_0_357576102 %float_0_180437505 + %444 = OpConstantComposite %v3float %float_0_212672904 %float_0_715152204 %float_0_0721750036 + %445 = OpConstantComposite %v3float %float_0_0193339009 %float_0_119191997 %float_0_950304091 + %446 = OpConstantComposite %mat3v3float %443 %444 %445 + %447 = OpConstantComposite %v3float %float_1_71660841 %float_n0_355662107 %float_n0_253360093 + %448 = OpConstantComposite %v3float %float_n0_666682899 %float_1_61647761 %float_0_0157685 + %449 = OpConstantComposite %v3float %float_0_0176422 %float_n0_0427763015 %float_0_942228675 + %450 = OpConstantComposite %mat3v3float %447 %448 %449 + %451 = OpConstantComposite %v3float %float_2_49339628 %float_n0_93134588 %float_n0_402694494 + %452 = OpConstantComposite %v3float %float_n0_829486787 %float_1_76265967 %float_0_0236246008 + %453 = OpConstantComposite %v3float %float_0_0358507 %float_n0_0761827007 %float_0_957014024 + %454 = OpConstantComposite %mat3v3float %451 %452 %453 + %455 = OpConstantComposite %v3float %float_1_01303005 %float_0_00610530982 %float_n0_0149710001 + %456 = OpConstantComposite %v3float %float_0_00769822998 %float_0_998165011 %float_n0_00503202993 + %457 = OpConstantComposite %v3float %float_n0_00284131011 %float_0_00468515977 %float_0_924507022 + %458 = OpConstantComposite %mat3v3float %455 %456 %457 + %459 = OpConstantComposite %v3float %float_0_987223983 %float_n0_00611326983 %float_0_0159533005 + %460 = OpConstantComposite %v3float %float_n0_00759836007 %float_1_00186002 %float_0_0053300201 + %461 = OpConstantComposite %v3float %float_0_00307257008 %float_n0_00509594986 %float_1_08168006 + %462 = OpConstantComposite %mat3v3float %459 %460 %461 + %463 = OpConstantComposite %v3float %float_0_5 %float_n1 %float_0_5 + %464 = OpConstantComposite %v3float %float_n1 %float_1 %float_0_5 + %465 = OpConstantComposite %v3float %float_0_5 %float_0 %float_0 + %466 = OpConstantComposite %mat3v3float %463 %464 %465 + %467 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %468 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %469 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %470 = OpConstantComposite %mat3v3float %467 %468 %469 +%float_n6_07624626 = OpConstant %float -6.07624626 + %472 = OpConstantComposite %v3float %float_n6_07624626 %float_n6_07624626 %float_n6_07624626 + %473 = OpConstantComposite %v3float %float_0_895099998 %float_0_266400009 %float_n0_161400005 + %474 = OpConstantComposite %v3float %float_n0_750199974 %float_1_71350002 %float_0_0366999991 + %475 = OpConstantComposite %v3float %float_0_0388999991 %float_n0_0684999973 %float_1_02960002 + %476 = OpConstantComposite %mat3v3float %473 %474 %475 + %477 = OpConstantComposite %v3float %float_0_986992896 %float_n0_1470543 %float_0_159962699 + %478 = OpConstantComposite %v3float %float_0_432305306 %float_0_518360317 %float_0_0492912009 + %479 = OpConstantComposite %v3float %float_n0_0085287001 %float_0_040042799 %float_0_968486726 + %480 = OpConstantComposite %mat3v3float %477 %478 %479 + %481 = OpConstantComposite %v3float %float_0_544169128 %float_0_239592597 %float_0_166694298 + %482 = OpConstantComposite %v3float %float_0_239465594 %float_0_702153027 %float_0_058381401 + %483 = OpConstantComposite %v3float %float_n0_00234390004 %float_0_0361833982 %float_1_05521834 + %484 = OpConstantComposite %mat3v3float %481 %482 %483 + %485 = OpConstantComposite %v3float %float_0_940437257 %float_n0_0183068793 %float_0_077869609 + %486 = OpConstantComposite %v3float %float_0_00837869663 %float_0_828660011 %float_0_162961304 + %487 = OpConstantComposite %v3float %float_0_00054712611 %float_n0_000883374596 %float_1_00033629 + %488 = OpConstantComposite %mat3v3float %485 %486 %487 + %489 = OpConstantComposite %v3float %float_1_06317997 %float_0_0233955998 %float_n0_0865726024 + %490 = OpConstantComposite %v3float %float_n0_0106336996 %float_1_20632005 %float_n0_195690006 + %491 = OpConstantComposite %v3float %float_n0_000590886979 %float_0_00105247996 %float_0_999538004 + %492 = OpConstantComposite %mat3v3float %489 %490 %491 +%float_0_0533333346 = OpConstant %float 0.0533333346 +%float_0_159999996 = OpConstant %float 0.159999996 +%float_57_2957764 = OpConstant %float 57.2957764 +%float_0_0625 = OpConstant %float 0.0625 +%float_n67_5 = OpConstant %float -67.5 + %float_67_5 = OpConstant %float 67.5 + %499 = OpConstantComposite %_arr_float_uint_6 %float_n4 %float_n4 %float_n3_15737653 %float_n0_485249996 %float_1_84773242 %float_1_84773242 + %500 = OpConstantComposite %_arr_float_uint_6 %float_n0_718548238 %float_2_08103061 %float_3_6681242 %float_4 %float_4 %float_4 + %float_n15 = OpConstant %float -15 + %float_n14 = OpConstant %float -14 + %503 = OpConstantComposite %_arr_float_uint_10 %float_n4_97062206 %float_n3_02937818 %float_n2_12619996 %float_n1_51049995 %float_n1_05780005 %float_n0_466800004 %float_0_119379997 %float_0_708813429 %float_1_29118657 %float_1_29118657 + %504 = OpConstantComposite %_arr_float_uint_10 %float_0_808913231 %float_1_19108677 %float_1_56830001 %float_1_9483 %float_2_30830002 %float_2_63840008 %float_2_85949993 %float_2_98726082 %float_3_01273918 %float_3_01273918 + %float_n12 = OpConstant %float -12 + %506 = OpConstantComposite %_arr_float_uint_10 %float_n2_30102992 %float_n2_30102992 %float_n1_93120003 %float_n1_52049994 %float_n1_05780005 %float_n0_466800004 %float_0_119379997 %float_0_708813429 %float_1_29118657 %float_1_29118657 + %507 = OpConstantComposite %_arr_float_uint_10 %float_0_801995218 %float_1_19800484 %float_1_59430003 %float_1_99730003 %float_2_37829995 %float_2_76839995 %float_3_05150008 %float_3_27462935 %float_3_32743073 %float_3_32743073 +%float_0_0322580636 = OpConstant %float 0.0322580636 +%float_1_03225803 = OpConstant %float 1.03225803 + %510 = OpConstantComposite %v2float %float_1_03225803 %float_1_03225803 +%float_4_60443853e_09 = OpConstant %float 4.60443853e+09 +%float_2_00528435e_09 = OpConstant %float 2.00528435e+09 +%float_0_333333343 = OpConstant %float 0.333333343 + %float_5 = OpConstant %float 5 + %float_2_5 = OpConstant %float 2.5 +%float_0_0250000004 = OpConstant %float 0.0250000004 +%float_0_239999995 = OpConstant %float 0.239999995 +%float_0_0148148146 = OpConstant %float 0.0148148146 + %519 = OpConstantComposite %v3float %float_9_99999975en05 %float_9_99999975en05 %float_9_99999975en05 +%float_0_0296296291 = OpConstant %float 0.0296296291 +%float_0_952381015 = OpConstant %float 0.952381015 + %522 = OpConstantComposite %v3float %float_0_952381015 %float_0_952381015 %float_0_952381015 + %523 = OpUndef %v3float +%float_0_358299971 = OpConstant %float 0.358299971 + %525 = OpUndef %v3float + %MainPS = OpFunction %void None %402 + %526 = OpLabel + %527 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %528 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %529 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %530 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %531 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %532 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %533 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %534 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %535 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %536 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %537 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %538 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %539 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %540 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %541 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %542 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %543 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %544 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %545 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %546 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %547 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %548 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %549 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %550 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %551 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %552 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %553 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %554 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %555 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %556 = OpVariable %_ptr_Function__arr_float_uint_10 Function + %557 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %558 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %559 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %560 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %561 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %562 = OpVariable %_ptr_Function__arr_float_uint_6 Function + %563 = OpLoad %v2float %in_var_TEXCOORD0 + %564 = OpLoad %uint %gl_Layer + %565 = OpFSub %v2float %563 %134 + %566 = OpFMul %v2float %565 %510 + %567 = OpCompositeExtract %float %566 0 + %568 = OpCompositeExtract %float %566 1 + %569 = OpConvertUToF %float %564 + %570 = OpFMul %float %569 %float_0_0322580636 + %571 = OpCompositeConstruct %v4float %567 %568 %570 %float_0 + %572 = OpMatrixTimesMatrix %mat3v3float %446 %458 + %573 = OpMatrixTimesMatrix %mat3v3float %572 %430 + %574 = OpMatrixTimesMatrix %mat3v3float %426 %462 + %575 = OpMatrixTimesMatrix %mat3v3float %574 %442 + %576 = OpMatrixTimesMatrix %mat3v3float %419 %430 + %577 = OpMatrixTimesMatrix %mat3v3float %426 %423 + %578 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_43 + %579 = OpLoad %uint %578 + OpBranch %580 + %580 = OpLabel + OpLoopMerge %581 %582 None + OpBranch %583 + %583 = OpLabel + %584 = OpMatrixTimesMatrix %mat3v3float %574 %454 + %585 = OpMatrixTimesMatrix %mat3v3float %574 %450 + %586 = OpIEqual %bool %579 %uint_1 + OpSelectionMerge %587 None + OpBranchConditional %586 %588 %589 + %589 = OpLabel + %590 = OpIEqual %bool %579 %uint_2 + OpSelectionMerge %591 None + OpBranchConditional %590 %592 %593 + %593 = OpLabel + %594 = OpIEqual %bool %579 %uint_3 + OpSelectionMerge %595 None + OpBranchConditional %594 %596 %597 + %597 = OpLabel + %598 = OpIEqual %bool %579 %uint_4 + OpSelectionMerge %599 None + OpBranchConditional %598 %600 %601 + %601 = OpLabel + OpBranch %581 + %600 = OpLabel + OpBranch %581 + %599 = OpLabel + OpUnreachable + %596 = OpLabel + OpBranch %581 + %595 = OpLabel + OpUnreachable + %592 = OpLabel + OpBranch %581 + %591 = OpLabel + OpUnreachable + %588 = OpLabel + OpBranch %581 + %587 = OpLabel + OpUnreachable + %582 = OpLabel + OpBranch %580 + %581 = OpLabel + %602 = OpPhi %mat3v3float %575 %601 %470 %600 %438 %596 %585 %592 %584 %588 + %603 = OpVectorShuffle %v3float %571 %571 0 1 2 + %604 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_42 + %605 = OpLoad %uint %604 + %606 = OpUGreaterThanEqual %bool %605 %uint_3 + OpSelectionMerge %607 None + OpBranchConditional %606 %608 %609 + %609 = OpLabel + %610 = OpFSub %v3float %603 %204 + %611 = OpFMul %v3float %610 %205 + %612 = OpExtInst %v3float %1 Exp2 %611 + %613 = OpFMul %v3float %612 %206 + %614 = OpExtInst %v3float %1 Exp2 %472 + %615 = OpFMul %v3float %614 %206 + %616 = OpFSub %v3float %613 %615 + OpBranch %607 + %608 = OpLabel + %617 = OpExtInst %v3float %1 Pow %603 %194 + %618 = OpFSub %v3float %617 %195 + %619 = OpExtInst %v3float %1 FMax %138 %618 + %620 = OpFMul %v3float %197 %617 + %621 = OpFSub %v3float %196 %620 + %622 = OpFDiv %v3float %619 %621 + %623 = OpExtInst %v3float %1 Pow %622 %199 + %624 = OpFMul %v3float %623 %200 + OpBranch %607 + %607 = OpLabel + %625 = OpPhi %v3float %616 %609 %624 %608 + %626 = OpAccessChain %_ptr_Uniform_float %_Globals %int_18 + %627 = OpLoad %float %626 + %628 = OpFMul %float %627 %float_1_00055635 + %629 = OpFOrdLessThanEqual %bool %628 %float_7000 + %630 = OpFDiv %float %float_4_60443853e_09 %627 + %631 = OpFSub %float %float_2967800 %630 + %632 = OpFDiv %float %631 %628 + %633 = OpFAdd %float %float_99_1100006 %632 + %634 = OpFDiv %float %633 %628 + %635 = OpFAdd %float %float_0_244063005 %634 + %636 = OpFDiv %float %float_2_00528435e_09 %627 + %637 = OpFSub %float %float_1901800 %636 + %638 = OpFDiv %float %637 %628 + %639 = OpFAdd %float %float_247_479996 %638 + %640 = OpFDiv %float %639 %628 + %641 = OpFAdd %float %float_0_237039998 %640 + %642 = OpSelect %float %629 %635 %641 + %643 = OpFMul %float %float_n3 %642 + %644 = OpFMul %float %643 %642 + %645 = OpFMul %float %float_2_86999989 %642 + %646 = OpFAdd %float %644 %645 + %647 = OpFSub %float %646 %float_0_275000006 + %648 = OpCompositeConstruct %v2float %642 %647 + %649 = OpFMul %float %float_0_000154118257 %627 + %650 = OpFAdd %float %float_0_860117733 %649 + %651 = OpFMul %float %float_1_28641219en07 %627 + %652 = OpFMul %float %651 %627 + %653 = OpFAdd %float %650 %652 + %654 = OpFMul %float %float_0_00084242021 %627 + %655 = OpFAdd %float %float_1 %654 + %656 = OpFMul %float %float_7_08145137en07 %627 + %657 = OpFMul %float %656 %627 + %658 = OpFAdd %float %655 %657 + %659 = OpFDiv %float %653 %658 + %660 = OpFMul %float %float_4_22806261en05 %627 + %661 = OpFAdd %float %float_0_317398727 %660 + %662 = OpFMul %float %float_4_20481676en08 %627 + %663 = OpFMul %float %662 %627 + %664 = OpFAdd %float %661 %663 + %665 = OpFMul %float %float_2_8974182en05 %627 + %666 = OpFSub %float %float_1 %665 + %667 = OpFMul %float %float_1_61456057en07 %627 + %668 = OpFMul %float %667 %627 + %669 = OpFAdd %float %666 %668 + %670 = OpFDiv %float %664 %669 + %671 = OpFMul %float %float_3 %659 + %672 = OpFMul %float %float_2 %659 + %673 = OpFMul %float %float_8 %670 + %674 = OpFSub %float %672 %673 + %675 = OpFAdd %float %674 %float_4 + %676 = OpFDiv %float %671 %675 + %677 = OpFMul %float %float_2 %670 + %678 = OpFDiv %float %677 %675 + %679 = OpCompositeConstruct %v2float %676 %678 + %680 = OpFOrdLessThan %bool %627 %float_4000 + %681 = OpCompositeConstruct %v2bool %680 %680 + %682 = OpSelect %v2float %681 %679 %648 + %683 = OpAccessChain %_ptr_Uniform_float %_Globals %int_19 + %684 = OpLoad %float %683 + %685 = OpCompositeConstruct %v2float %659 %670 + %686 = OpExtInst %v2float %1 Normalize %685 + %687 = OpCompositeExtract %float %686 1 + %688 = OpFNegate %float %687 + %689 = OpFMul %float %688 %684 + %690 = OpFMul %float %689 %float_0_0500000007 + %691 = OpFAdd %float %659 %690 + %692 = OpCompositeExtract %float %686 0 + %693 = OpFMul %float %692 %684 + %694 = OpFMul %float %693 %float_0_0500000007 + %695 = OpFAdd %float %670 %694 + %696 = OpFMul %float %float_3 %691 + %697 = OpFMul %float %float_2 %691 + %698 = OpFMul %float %float_8 %695 + %699 = OpFSub %float %697 %698 + %700 = OpFAdd %float %699 %float_4 + %701 = OpFDiv %float %696 %700 + %702 = OpFMul %float %float_2 %695 + %703 = OpFDiv %float %702 %700 + %704 = OpCompositeConstruct %v2float %701 %703 + %705 = OpFSub %v2float %704 %679 + %706 = OpFAdd %v2float %682 %705 + %707 = OpCompositeExtract %float %706 0 + %708 = OpCompositeExtract %float %706 1 + %709 = OpExtInst %float %1 FMax %708 %float_1_00000001en10 + %710 = OpFDiv %float %707 %709 + %711 = OpCompositeInsert %v3float %710 %523 0 + %712 = OpCompositeInsert %v3float %float_1 %711 1 + %713 = OpFSub %float %float_1 %707 + %714 = OpFSub %float %713 %708 + %715 = OpFDiv %float %714 %709 + %716 = OpCompositeInsert %v3float %715 %712 2 + %717 = OpExtInst %float %1 FMax %float_0_328999996 %float_1_00000001en10 + %718 = OpFDiv %float %float_0_312700003 %717 + %719 = OpCompositeInsert %v3float %718 %523 0 + %720 = OpCompositeInsert %v3float %float_1 %719 1 + %721 = OpFDiv %float %float_0_358299971 %717 + %722 = OpCompositeInsert %v3float %721 %720 2 + %723 = OpVectorTimesMatrix %v3float %716 %476 + %724 = OpVectorTimesMatrix %v3float %722 %476 + %725 = OpCompositeExtract %float %724 0 + %726 = OpCompositeExtract %float %723 0 + %727 = OpFDiv %float %725 %726 + %728 = OpCompositeConstruct %v3float %727 %float_0 %float_0 + %729 = OpCompositeExtract %float %724 1 + %730 = OpCompositeExtract %float %723 1 + %731 = OpFDiv %float %729 %730 + %732 = OpCompositeConstruct %v3float %float_0 %731 %float_0 + %733 = OpCompositeExtract %float %724 2 + %734 = OpCompositeExtract %float %723 2 + %735 = OpFDiv %float %733 %734 + %736 = OpCompositeConstruct %v3float %float_0 %float_0 %735 + %737 = OpCompositeConstruct %mat3v3float %728 %732 %736 + %738 = OpMatrixTimesMatrix %mat3v3float %476 %737 + %739 = OpMatrixTimesMatrix %mat3v3float %738 %480 + %740 = OpMatrixTimesMatrix %mat3v3float %446 %739 + %741 = OpMatrixTimesMatrix %mat3v3float %740 %442 + %742 = OpVectorTimesMatrix %v3float %625 %741 + %743 = OpVectorTimesMatrix %v3float %742 %573 + %744 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_9 + %745 = OpAccessChain %_ptr_Uniform_float %_Globals %int_9 %int_3 + %746 = OpLoad %float %745 + %747 = OpFOrdNotEqual %bool %746 %float_0 + OpSelectionMerge %748 None + OpBranchConditional %747 %749 %748 + %749 = OpLabel + %750 = OpDot %float %743 %73 + %751 = OpCompositeConstruct %v3float %750 %750 %750 + %752 = OpFDiv %v3float %743 %751 + %753 = OpFSub %v3float %752 %141 + %754 = OpDot %float %753 %753 + %755 = OpFMul %float %float_n4 %754 + %756 = OpExtInst %float %1 Exp2 %755 + %757 = OpFSub %float %float_1 %756 + %758 = OpAccessChain %_ptr_Uniform_float %_Globals %int_45 + %759 = OpLoad %float %758 + %760 = OpFMul %float %float_n4 %759 + %761 = OpFMul %float %760 %750 + %762 = OpFMul %float %761 %750 + %763 = OpExtInst %float %1 Exp2 %762 + %764 = OpFSub %float %float_1 %763 + %765 = OpFMul %float %757 %764 + %766 = OpMatrixTimesMatrix %mat3v3float %484 %430 + %767 = OpMatrixTimesMatrix %mat3v3float %575 %766 + %768 = OpVectorTimesMatrix %v3float %743 %767 + %769 = OpCompositeConstruct %v3float %765 %765 %765 + %770 = OpExtInst %v3float %1 FMix %743 %768 %769 + OpBranch %748 + %748 = OpLabel + %771 = OpPhi %v3float %743 %607 %770 %749 + %772 = OpDot %float %771 %73 + %773 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_25 + %774 = OpLoad %v4float %773 + %775 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_20 + %776 = OpLoad %v4float %775 + %777 = OpFMul %v4float %774 %776 + %778 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_26 + %779 = OpLoad %v4float %778 + %780 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_21 + %781 = OpLoad %v4float %780 + %782 = OpFMul %v4float %779 %781 + %783 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_27 + %784 = OpLoad %v4float %783 + %785 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_22 + %786 = OpLoad %v4float %785 + %787 = OpFMul %v4float %784 %786 + %788 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_28 + %789 = OpLoad %v4float %788 + %790 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_23 + %791 = OpLoad %v4float %790 + %792 = OpFMul %v4float %789 %791 + %793 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_29 + %794 = OpLoad %v4float %793 + %795 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_24 + %796 = OpLoad %v4float %795 + %797 = OpFAdd %v4float %794 %796 + %798 = OpCompositeConstruct %v3float %772 %772 %772 + %799 = OpVectorShuffle %v3float %777 %777 0 1 2 + %800 = OpCompositeExtract %float %777 3 + %801 = OpCompositeConstruct %v3float %800 %800 %800 + %802 = OpFMul %v3float %799 %801 + %803 = OpExtInst %v3float %1 FMix %798 %771 %802 + %804 = OpExtInst %v3float %1 FMax %138 %803 + %805 = OpFMul %v3float %804 %330 + %806 = OpVectorShuffle %v3float %782 %782 0 1 2 + %807 = OpCompositeExtract %float %782 3 + %808 = OpCompositeConstruct %v3float %807 %807 %807 + %809 = OpFMul %v3float %806 %808 + %810 = OpExtInst %v3float %1 Pow %805 %809 + %811 = OpFMul %v3float %810 %206 + %812 = OpVectorShuffle %v3float %787 %787 0 1 2 + %813 = OpCompositeExtract %float %787 3 + %814 = OpCompositeConstruct %v3float %813 %813 %813 + %815 = OpFMul %v3float %812 %814 + %816 = OpFDiv %v3float %141 %815 + %817 = OpExtInst %v3float %1 Pow %811 %816 + %818 = OpVectorShuffle %v3float %792 %792 0 1 2 + %819 = OpCompositeExtract %float %792 3 + %820 = OpCompositeConstruct %v3float %819 %819 %819 + %821 = OpFMul %v3float %818 %820 + %822 = OpFMul %v3float %817 %821 + %823 = OpVectorShuffle %v3float %797 %797 0 1 2 + %824 = OpCompositeExtract %float %797 3 + %825 = OpCompositeConstruct %v3float %824 %824 %824 + %826 = OpFAdd %v3float %823 %825 + %827 = OpFAdd %v3float %822 %826 + %828 = OpAccessChain %_ptr_Uniform_float %_Globals %int_40 + %829 = OpLoad %float %828 + %830 = OpExtInst %float %1 SmoothStep %float_0 %829 %772 + %831 = OpFSub %float %float_1 %830 + %832 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_35 + %833 = OpLoad %v4float %832 + %834 = OpFMul %v4float %833 %776 + %835 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_36 + %836 = OpLoad %v4float %835 + %837 = OpFMul %v4float %836 %781 + %838 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_37 + %839 = OpLoad %v4float %838 + %840 = OpFMul %v4float %839 %786 + %841 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_38 + %842 = OpLoad %v4float %841 + %843 = OpFMul %v4float %842 %791 + %844 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_39 + %845 = OpLoad %v4float %844 + %846 = OpFAdd %v4float %845 %796 + %847 = OpVectorShuffle %v3float %834 %834 0 1 2 + %848 = OpCompositeExtract %float %834 3 + %849 = OpCompositeConstruct %v3float %848 %848 %848 + %850 = OpFMul %v3float %847 %849 + %851 = OpExtInst %v3float %1 FMix %798 %771 %850 + %852 = OpExtInst %v3float %1 FMax %138 %851 + %853 = OpFMul %v3float %852 %330 + %854 = OpVectorShuffle %v3float %837 %837 0 1 2 + %855 = OpCompositeExtract %float %837 3 + %856 = OpCompositeConstruct %v3float %855 %855 %855 + %857 = OpFMul %v3float %854 %856 + %858 = OpExtInst %v3float %1 Pow %853 %857 + %859 = OpFMul %v3float %858 %206 + %860 = OpVectorShuffle %v3float %840 %840 0 1 2 + %861 = OpCompositeExtract %float %840 3 + %862 = OpCompositeConstruct %v3float %861 %861 %861 + %863 = OpFMul %v3float %860 %862 + %864 = OpFDiv %v3float %141 %863 + %865 = OpExtInst %v3float %1 Pow %859 %864 + %866 = OpVectorShuffle %v3float %843 %843 0 1 2 + %867 = OpCompositeExtract %float %843 3 + %868 = OpCompositeConstruct %v3float %867 %867 %867 + %869 = OpFMul %v3float %866 %868 + %870 = OpFMul %v3float %865 %869 + %871 = OpVectorShuffle %v3float %846 %846 0 1 2 + %872 = OpCompositeExtract %float %846 3 + %873 = OpCompositeConstruct %v3float %872 %872 %872 + %874 = OpFAdd %v3float %871 %873 + %875 = OpFAdd %v3float %870 %874 + %876 = OpAccessChain %_ptr_Uniform_float %_Globals %int_41 + %877 = OpLoad %float %876 + %878 = OpExtInst %float %1 SmoothStep %877 %float_1 %772 + %879 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_30 + %880 = OpLoad %v4float %879 + %881 = OpFMul %v4float %880 %776 + %882 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_31 + %883 = OpLoad %v4float %882 + %884 = OpFMul %v4float %883 %781 + %885 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_32 + %886 = OpLoad %v4float %885 + %887 = OpFMul %v4float %886 %786 + %888 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_33 + %889 = OpLoad %v4float %888 + %890 = OpFMul %v4float %889 %791 + %891 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_34 + %892 = OpLoad %v4float %891 + %893 = OpFAdd %v4float %892 %796 + %894 = OpVectorShuffle %v3float %881 %881 0 1 2 + %895 = OpCompositeExtract %float %881 3 + %896 = OpCompositeConstruct %v3float %895 %895 %895 + %897 = OpFMul %v3float %894 %896 + %898 = OpExtInst %v3float %1 FMix %798 %771 %897 + %899 = OpExtInst %v3float %1 FMax %138 %898 + %900 = OpFMul %v3float %899 %330 + %901 = OpVectorShuffle %v3float %884 %884 0 1 2 + %902 = OpCompositeExtract %float %884 3 + %903 = OpCompositeConstruct %v3float %902 %902 %902 + %904 = OpFMul %v3float %901 %903 + %905 = OpExtInst %v3float %1 Pow %900 %904 + %906 = OpFMul %v3float %905 %206 + %907 = OpVectorShuffle %v3float %887 %887 0 1 2 + %908 = OpCompositeExtract %float %887 3 + %909 = OpCompositeConstruct %v3float %908 %908 %908 + %910 = OpFMul %v3float %907 %909 + %911 = OpFDiv %v3float %141 %910 + %912 = OpExtInst %v3float %1 Pow %906 %911 + %913 = OpVectorShuffle %v3float %890 %890 0 1 2 + %914 = OpCompositeExtract %float %890 3 + %915 = OpCompositeConstruct %v3float %914 %914 %914 + %916 = OpFMul %v3float %913 %915 + %917 = OpFMul %v3float %912 %916 + %918 = OpVectorShuffle %v3float %893 %893 0 1 2 + %919 = OpCompositeExtract %float %893 3 + %920 = OpCompositeConstruct %v3float %919 %919 %919 + %921 = OpFAdd %v3float %918 %920 + %922 = OpFAdd %v3float %917 %921 + %923 = OpFSub %float %830 %878 + %924 = OpCompositeConstruct %v3float %831 %831 %831 + %925 = OpFMul %v3float %827 %924 + %926 = OpCompositeConstruct %v3float %923 %923 %923 + %927 = OpFMul %v3float %922 %926 + %928 = OpFAdd %v3float %925 %927 + %929 = OpCompositeConstruct %v3float %878 %878 %878 + %930 = OpFMul %v3float %875 %929 + %931 = OpFAdd %v3float %928 %930 + %932 = OpVectorTimesMatrix %v3float %931 %575 + %933 = OpMatrixTimesMatrix %mat3v3float %577 %488 + %934 = OpMatrixTimesMatrix %mat3v3float %933 %576 + %935 = OpMatrixTimesMatrix %mat3v3float %577 %492 + %936 = OpMatrixTimesMatrix %mat3v3float %935 %576 + %937 = OpVectorTimesMatrix %v3float %931 %934 + %938 = OpAccessChain %_ptr_Uniform_float %_Globals %int_44 + %939 = OpLoad %float %938 + %940 = OpCompositeConstruct %v3float %939 %939 %939 + %941 = OpExtInst %v3float %1 FMix %931 %937 %940 + %942 = OpVectorTimesMatrix %v3float %941 %577 + %943 = OpCompositeExtract %float %942 0 + %944 = OpCompositeExtract %float %942 1 + %945 = OpExtInst %float %1 FMin %943 %944 + %946 = OpCompositeExtract %float %942 2 + %947 = OpExtInst %float %1 FMin %945 %946 + %948 = OpExtInst %float %1 FMax %943 %944 + %949 = OpExtInst %float %1 FMax %948 %946 + %950 = OpExtInst %float %1 FMax %949 %float_1_00000001en10 + %951 = OpExtInst %float %1 FMax %947 %float_1_00000001en10 + %952 = OpFSub %float %950 %951 + %953 = OpExtInst %float %1 FMax %949 %float_0_00999999978 + %954 = OpFDiv %float %952 %953 + %955 = OpFSub %float %946 %944 + %956 = OpFMul %float %946 %955 + %957 = OpFSub %float %944 %943 + %958 = OpFMul %float %944 %957 + %959 = OpFAdd %float %956 %958 + %960 = OpFSub %float %943 %946 + %961 = OpFMul %float %943 %960 + %962 = OpFAdd %float %959 %961 + %963 = OpExtInst %float %1 Sqrt %962 + %964 = OpFAdd %float %946 %944 + %965 = OpFAdd %float %964 %943 + %966 = OpFMul %float %float_1_75 %963 + %967 = OpFAdd %float %965 %966 + %968 = OpFMul %float %967 %float_0_333333343 + %969 = OpFSub %float %954 %float_0_400000006 + %970 = OpFMul %float %969 %float_5 + %971 = OpFMul %float %969 %float_2_5 + %972 = OpExtInst %float %1 FAbs %971 + %973 = OpFSub %float %float_1 %972 + %974 = OpExtInst %float %1 FMax %973 %float_0 + %975 = OpExtInst %float %1 FSign %970 + %976 = OpConvertFToS %int %975 + %977 = OpConvertSToF %float %976 + %978 = OpFMul %float %974 %974 + %979 = OpFSub %float %float_1 %978 + %980 = OpFMul %float %977 %979 + %981 = OpFAdd %float %float_1 %980 + %982 = OpFMul %float %981 %float_0_0250000004 + %983 = OpFOrdLessThanEqual %bool %968 %float_0_0533333346 + OpSelectionMerge %984 None + OpBranchConditional %983 %985 %986 + %986 = OpLabel + %987 = OpFOrdGreaterThanEqual %bool %968 %float_0_159999996 + OpSelectionMerge %988 None + OpBranchConditional %987 %989 %990 + %990 = OpLabel + %991 = OpFDiv %float %float_0_239999995 %967 + %992 = OpFSub %float %991 %float_0_5 + %993 = OpFMul %float %982 %992 + OpBranch %988 + %989 = OpLabel + OpBranch %988 + %988 = OpLabel + %994 = OpPhi %float %993 %990 %float_0 %989 + OpBranch %984 + %985 = OpLabel + OpBranch %984 + %984 = OpLabel + %995 = OpPhi %float %994 %988 %982 %985 + %996 = OpFAdd %float %float_1 %995 + %997 = OpCompositeConstruct %v3float %996 %996 %996 + %998 = OpFMul %v3float %942 %997 + %999 = OpCompositeExtract %float %998 0 + %1000 = OpCompositeExtract %float %998 1 + %1001 = OpFOrdEqual %bool %999 %1000 + %1002 = OpCompositeExtract %float %998 2 + %1003 = OpFOrdEqual %bool %1000 %1002 + %1004 = OpLogicalAnd %bool %1001 %1003 + OpSelectionMerge %1005 None + OpBranchConditional %1004 %1006 %1007 + %1007 = OpLabel + %1008 = OpExtInst %float %1 Sqrt %float_3 + %1009 = OpFSub %float %1000 %1002 + %1010 = OpFMul %float %1008 %1009 + %1011 = OpFMul %float %float_2 %999 + %1012 = OpFSub %float %1011 %1000 + %1013 = OpFSub %float %1012 %1002 + %1014 = OpExtInst %float %1 Atan2 %1010 %1013 + %1015 = OpFMul %float %float_57_2957764 %1014 + OpBranch %1005 + %1006 = OpLabel + OpBranch %1005 + %1005 = OpLabel + %1016 = OpPhi %float %1015 %1007 %float_0 %1006 + %1017 = OpFOrdLessThan %bool %1016 %float_0 + OpSelectionMerge %1018 None + OpBranchConditional %1017 %1019 %1018 + %1019 = OpLabel + %1020 = OpFAdd %float %1016 %float_360 + OpBranch %1018 + %1018 = OpLabel + %1021 = OpPhi %float %1016 %1005 %1020 %1019 + %1022 = OpExtInst %float %1 FClamp %1021 %float_0 %float_360 + %1023 = OpFOrdGreaterThan %bool %1022 %float_180 + OpSelectionMerge %1024 None + OpBranchConditional %1023 %1025 %1024 + %1025 = OpLabel + %1026 = OpFSub %float %1022 %float_360 + OpBranch %1024 + %1024 = OpLabel + %1027 = OpPhi %float %1022 %1018 %1026 %1025 + %1028 = OpFMul %float %1027 %float_0_0148148146 + %1029 = OpExtInst %float %1 FAbs %1028 + %1030 = OpFSub %float %float_1 %1029 + %1031 = OpExtInst %float %1 SmoothStep %float_0 %float_1 %1030 + %1032 = OpFMul %float %1031 %1031 + %1033 = OpFMul %float %1032 %954 + %1034 = OpFSub %float %float_0_0299999993 %999 + %1035 = OpFMul %float %1033 %1034 + %1036 = OpFMul %float %1035 %float_0_180000007 + %1037 = OpFAdd %float %999 %1036 + %1038 = OpCompositeInsert %v3float %1037 %998 0 + %1039 = OpVectorTimesMatrix %v3float %1038 %434 + %1040 = OpExtInst %v3float %1 FMax %138 %1039 + %1041 = OpDot %float %1040 %73 + %1042 = OpCompositeConstruct %v3float %1041 %1041 %1041 + %1043 = OpExtInst %v3float %1 FMix %1042 %1040 %241 + %1044 = OpAccessChain %_ptr_Uniform_float %_Globals %int_13 + %1045 = OpLoad %float %1044 + %1046 = OpFAdd %float %float_1 %1045 + %1047 = OpAccessChain %_ptr_Uniform_float %_Globals %int_11 + %1048 = OpLoad %float %1047 + %1049 = OpFSub %float %1046 %1048 + %1050 = OpAccessChain %_ptr_Uniform_float %_Globals %int_14 + %1051 = OpLoad %float %1050 + %1052 = OpFAdd %float %float_1 %1051 + %1053 = OpAccessChain %_ptr_Uniform_float %_Globals %int_12 + %1054 = OpLoad %float %1053 + %1055 = OpFSub %float %1052 %1054 + %1056 = OpFOrdGreaterThan %bool %1048 %float_0_800000012 + OpSelectionMerge %1057 None + OpBranchConditional %1056 %1058 %1059 + %1059 = OpLabel + %1060 = OpFAdd %float %float_0_180000007 %1045 + %1061 = OpFDiv %float %1060 %1049 + %1062 = OpExtInst %float %1 Log %float_0_180000007 + %1063 = OpExtInst %float %1 Log %float_10 + %1064 = OpFDiv %float %1062 %1063 + %1065 = OpFSub %float %float_2 %1061 + %1066 = OpFDiv %float %1061 %1065 + %1067 = OpExtInst %float %1 Log %1066 + %1068 = OpFMul %float %float_0_5 %1067 + %1069 = OpAccessChain %_ptr_Uniform_float %_Globals %int_10 + %1070 = OpLoad %float %1069 + %1071 = OpFDiv %float %1049 %1070 + %1072 = OpFMul %float %1068 %1071 + %1073 = OpFSub %float %1064 %1072 + OpBranch %1057 + %1058 = OpLabel + %1074 = OpFSub %float %float_0_819999993 %1048 + %1075 = OpAccessChain %_ptr_Uniform_float %_Globals %int_10 + %1076 = OpLoad %float %1075 + %1077 = OpFDiv %float %1074 %1076 + %1078 = OpExtInst %float %1 Log %float_0_180000007 + %1079 = OpExtInst %float %1 Log %float_10 + %1080 = OpFDiv %float %1078 %1079 + %1081 = OpFAdd %float %1077 %1080 + OpBranch %1057 + %1057 = OpLabel + %1082 = OpPhi %float %1073 %1059 %1081 %1058 + %1083 = OpFSub %float %float_1 %1048 + %1084 = OpAccessChain %_ptr_Uniform_float %_Globals %int_10 + %1085 = OpLoad %float %1084 + %1086 = OpFDiv %float %1083 %1085 + %1087 = OpFSub %float %1086 %1082 + %1088 = OpFDiv %float %1054 %1085 + %1089 = OpFSub %float %1088 %1087 + %1090 = OpExtInst %v3float %1 Log %1043 + %1091 = OpExtInst %float %1 Log %float_10 + %1092 = OpCompositeConstruct %v3float %1091 %1091 %1091 + %1093 = OpFDiv %v3float %1090 %1092 + %1094 = OpCompositeConstruct %v3float %1085 %1085 %1085 + %1095 = OpCompositeConstruct %v3float %1087 %1087 %1087 + %1096 = OpFAdd %v3float %1093 %1095 + %1097 = OpFMul %v3float %1094 %1096 + %1098 = OpFNegate %float %1045 + %1099 = OpCompositeConstruct %v3float %1098 %1098 %1098 + %1100 = OpFMul %float %float_2 %1049 + %1101 = OpCompositeConstruct %v3float %1100 %1100 %1100 + %1102 = OpFMul %float %float_n2 %1085 + %1103 = OpFDiv %float %1102 %1049 + %1104 = OpCompositeConstruct %v3float %1103 %1103 %1103 + %1105 = OpCompositeConstruct %v3float %1082 %1082 %1082 + %1106 = OpFSub %v3float %1093 %1105 + %1107 = OpFMul %v3float %1104 %1106 + %1108 = OpExtInst %v3float %1 Exp %1107 + %1109 = OpFAdd %v3float %141 %1108 + %1110 = OpFDiv %v3float %1101 %1109 + %1111 = OpFAdd %v3float %1099 %1110 + %1112 = OpCompositeConstruct %v3float %1052 %1052 %1052 + %1113 = OpFMul %float %float_2 %1055 + %1114 = OpCompositeConstruct %v3float %1113 %1113 %1113 + %1115 = OpFMul %float %float_2 %1085 + %1116 = OpFDiv %float %1115 %1055 + %1117 = OpCompositeConstruct %v3float %1116 %1116 %1116 + %1118 = OpCompositeConstruct %v3float %1089 %1089 %1089 + %1119 = OpFSub %v3float %1093 %1118 + %1120 = OpFMul %v3float %1117 %1119 + %1121 = OpExtInst %v3float %1 Exp %1120 + %1122 = OpFAdd %v3float %141 %1121 + %1123 = OpFDiv %v3float %1114 %1122 + %1124 = OpFSub %v3float %1112 %1123 + %1125 = OpFOrdLessThan %v3bool %1093 %1105 + %1126 = OpSelect %v3float %1125 %1111 %1097 + %1127 = OpFOrdGreaterThan %v3bool %1093 %1118 + %1128 = OpSelect %v3float %1127 %1124 %1097 + %1129 = OpFSub %float %1089 %1082 + %1130 = OpCompositeConstruct %v3float %1129 %1129 %1129 + %1131 = OpFDiv %v3float %1106 %1130 + %1132 = OpExtInst %v3float %1 FClamp %1131 %138 %141 + %1133 = OpFOrdLessThan %bool %1089 %1082 + %1134 = OpFSub %v3float %141 %1132 + %1135 = OpCompositeConstruct %v3bool %1133 %1133 %1133 + %1136 = OpSelect %v3float %1135 %1134 %1132 + %1137 = OpFMul %v3float %252 %1136 + %1138 = OpFSub %v3float %251 %1137 + %1139 = OpFMul %v3float %1138 %1136 + %1140 = OpFMul %v3float %1139 %1136 + %1141 = OpExtInst %v3float %1 FMix %1126 %1128 %1140 + %1142 = OpDot %float %1141 %73 + %1143 = OpCompositeConstruct %v3float %1142 %1142 %1142 + %1144 = OpExtInst %v3float %1 FMix %1143 %1141 %254 + %1145 = OpExtInst %v3float %1 FMax %138 %1144 + %1146 = OpVectorTimesMatrix %v3float %1145 %936 + %1147 = OpExtInst %v3float %1 FMix %1145 %1146 %940 + %1148 = OpVectorTimesMatrix %v3float %1147 %575 + %1149 = OpExtInst %v3float %1 FMax %138 %1148 + %1150 = OpFOrdEqual %bool %746 %float_0 + OpSelectionMerge %1151 DontFlatten + OpBranchConditional %1150 %1152 %1151 + %1152 = OpLabel + %1153 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_2 + %1154 = OpLoad %v4float %1153 + %1155 = OpVectorShuffle %v3float %1154 %1154 0 1 2 + %1156 = OpDot %float %932 %1155 + %1157 = OpCompositeInsert %v3float %1156 %525 0 + %1158 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_3 + %1159 = OpLoad %v4float %1158 + %1160 = OpVectorShuffle %v3float %1159 %1159 0 1 2 + %1161 = OpDot %float %932 %1160 + %1162 = OpCompositeInsert %v3float %1161 %1157 1 + %1163 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_4 + %1164 = OpLoad %v4float %1163 + %1165 = OpVectorShuffle %v3float %1164 %1164 0 1 2 + %1166 = OpDot %float %932 %1165 + %1167 = OpCompositeInsert %v3float %1166 %1162 2 + %1168 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_8 + %1169 = OpLoad %v4float %1168 + %1170 = OpVectorShuffle %v3float %1169 %1169 0 1 2 + %1171 = OpLoad %v4float %744 + %1172 = OpVectorShuffle %v3float %1171 %1171 0 1 2 + %1173 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_7 + %1174 = OpLoad %v4float %1173 + %1175 = OpVectorShuffle %v3float %1174 %1174 0 1 2 + %1176 = OpDot %float %932 %1175 + %1177 = OpFAdd %float %1176 %float_1 + %1178 = OpFDiv %float %float_1 %1177 + %1179 = OpCompositeConstruct %v3float %1178 %1178 %1178 + %1180 = OpFMul %v3float %1172 %1179 + %1181 = OpFAdd %v3float %1170 %1180 + %1182 = OpFMul %v3float %1167 %1181 + %1183 = OpExtInst %v3float %1 FMax %138 %1182 + %1184 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_5 + %1185 = OpLoad %v4float %1184 + %1186 = OpVectorShuffle %v3float %1185 %1185 0 0 0 + %1187 = OpFSub %v3float %1186 %1183 + %1188 = OpExtInst %v3float %1 FMax %138 %1187 + %1189 = OpVectorShuffle %v3float %1185 %1185 2 2 2 + %1190 = OpExtInst %v3float %1 FMax %1183 %1189 + %1191 = OpExtInst %v3float %1 FClamp %1183 %1186 %1189 + %1192 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_6 + %1193 = OpLoad %v4float %1192 + %1194 = OpVectorShuffle %v3float %1193 %1193 0 0 0 + %1195 = OpFMul %v3float %1190 %1194 + %1196 = OpVectorShuffle %v3float %1193 %1193 1 1 1 + %1197 = OpFAdd %v3float %1195 %1196 + %1198 = OpVectorShuffle %v3float %1185 %1185 3 3 3 + %1199 = OpFAdd %v3float %1190 %1198 + %1200 = OpFDiv %v3float %141 %1199 + %1201 = OpFMul %v3float %1197 %1200 + %1202 = OpVectorShuffle %v3float %1164 %1164 3 3 3 + %1203 = OpFMul %v3float %1191 %1202 + %1204 = OpVectorShuffle %v3float %1154 %1154 3 3 3 + %1205 = OpFMul %v3float %1188 %1204 + %1206 = OpVectorShuffle %v3float %1185 %1185 1 1 1 + %1207 = OpFAdd %v3float %1188 %1206 + %1208 = OpFDiv %v3float %141 %1207 + %1209 = OpFMul %v3float %1205 %1208 + %1210 = OpVectorShuffle %v3float %1159 %1159 3 3 3 + %1211 = OpFAdd %v3float %1209 %1210 + %1212 = OpFAdd %v3float %1203 %1211 + %1213 = OpFAdd %v3float %1201 %1212 + %1214 = OpFSub %v3float %1213 %261 + OpBranch %1151 + %1151 = OpLabel + %1215 = OpPhi %v3float %1149 %1057 %1214 %1152 + %1216 = OpExtInst %v3float %1 FClamp %1215 %138 %141 + %1217 = OpCompositeExtract %float %1216 0 + OpBranch %1218 + %1218 = OpLabel + OpLoopMerge %1219 %1220 None + OpBranch %1221 + %1221 = OpLabel + %1222 = OpFOrdLessThan %bool %1217 %float_0_00313066994 + OpSelectionMerge %1223 None + OpBranchConditional %1222 %1224 %1223 + %1224 = OpLabel + %1225 = OpFMul %float %1217 %float_12_9200001 + OpBranch %1219 + %1223 = OpLabel + %1226 = OpExtInst %float %1 Pow %1217 %float_0_416666657 + %1227 = OpFMul %float %1226 %float_1_05499995 + %1228 = OpFSub %float %1227 %float_0_0549999997 + OpBranch %1219 + %1220 = OpLabel + OpBranch %1218 + %1219 = OpLabel + %1229 = OpPhi %float %1225 %1224 %1228 %1223 + %1230 = OpCompositeExtract %float %1216 1 + OpBranch %1231 + %1231 = OpLabel + OpLoopMerge %1232 %1233 None + OpBranch %1234 + %1234 = OpLabel + %1235 = OpFOrdLessThan %bool %1230 %float_0_00313066994 + OpSelectionMerge %1236 None + OpBranchConditional %1235 %1237 %1236 + %1237 = OpLabel + %1238 = OpFMul %float %1230 %float_12_9200001 + OpBranch %1232 + %1236 = OpLabel + %1239 = OpExtInst %float %1 Pow %1230 %float_0_416666657 + %1240 = OpFMul %float %1239 %float_1_05499995 + %1241 = OpFSub %float %1240 %float_0_0549999997 + OpBranch %1232 + %1233 = OpLabel + OpBranch %1231 + %1232 = OpLabel + %1242 = OpPhi %float %1238 %1237 %1241 %1236 + %1243 = OpCompositeExtract %float %1216 2 + OpBranch %1244 + %1244 = OpLabel + OpLoopMerge %1245 %1246 None + OpBranch %1247 + %1247 = OpLabel + %1248 = OpFOrdLessThan %bool %1243 %float_0_00313066994 + OpSelectionMerge %1249 None + OpBranchConditional %1248 %1250 %1249 + %1250 = OpLabel + %1251 = OpFMul %float %1243 %float_12_9200001 + OpBranch %1245 + %1249 = OpLabel + %1252 = OpExtInst %float %1 Pow %1243 %float_0_416666657 + %1253 = OpFMul %float %1252 %float_1_05499995 + %1254 = OpFSub %float %1253 %float_0_0549999997 + OpBranch %1245 + %1246 = OpLabel + OpBranch %1244 + %1245 = OpLabel + %1255 = OpPhi %float %1251 %1250 %1254 %1249 + %1256 = OpCompositeConstruct %v3float %1229 %1242 %1255 + %1257 = OpFMul %v3float %1256 %173 + %1258 = OpFAdd %v3float %1257 %175 + %1259 = OpAccessChain %_ptr_Uniform_float %_Globals %int_15 %int_0 + %1260 = OpLoad %float %1259 + %1261 = OpCompositeConstruct %v3float %1260 %1260 %1260 + %1262 = OpFMul %v3float %1261 %1256 + %1263 = OpAccessChain %_ptr_Uniform_float %_Globals %int_15 %int_1 + %1264 = OpLoad %float %1263 + %1265 = OpCompositeConstruct %v3float %1264 %1264 %1264 + %1266 = OpLoad %type_2d_image %Texture1 + %1267 = OpLoad %type_sampler %Texture1Sampler + %1268 = OpCompositeExtract %float %1258 2 + %1269 = OpFMul %float %1268 %float_16 + %1270 = OpFSub %float %1269 %float_0_5 + %1271 = OpExtInst %float %1 Floor %1270 + %1272 = OpFSub %float %1270 %1271 + %1273 = OpCompositeExtract %float %1258 0 + %1274 = OpFAdd %float %1273 %1271 + %1275 = OpFMul %float %1274 %float_0_0625 + %1276 = OpCompositeExtract %float %1258 1 + %1277 = OpCompositeConstruct %v2float %1275 %1276 + %1278 = OpSampledImage %type_sampled_image %1266 %1267 + %1279 = OpImageSampleImplicitLod %v4float %1278 %1277 None + %1280 = OpFAdd %float %1275 %float_0_0625 + %1281 = OpCompositeConstruct %v2float %1280 %1276 + %1282 = OpSampledImage %type_sampled_image %1266 %1267 + %1283 = OpImageSampleImplicitLod %v4float %1282 %1281 None + %1284 = OpCompositeConstruct %v4float %1272 %1272 %1272 %1272 + %1285 = OpExtInst %v4float %1 FMix %1279 %1283 %1284 + %1286 = OpVectorShuffle %v3float %1285 %1285 0 1 2 + %1287 = OpFMul %v3float %1265 %1286 + %1288 = OpFAdd %v3float %1262 %1287 + %1289 = OpExtInst %v3float %1 FMax %263 %1288 + %1290 = OpFOrdGreaterThan %v3bool %1289 %265 + %1291 = OpFMul %v3float %1289 %267 + %1292 = OpFAdd %v3float %1291 %269 + %1293 = OpExtInst %v3float %1 Pow %1292 %271 + %1294 = OpFMul %v3float %1289 %273 + %1295 = OpSelect %v3float %1290 %1293 %1294 + %1296 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_0 + %1297 = OpLoad %float %1296 + %1298 = OpCompositeConstruct %v3float %1297 %1297 %1297 + %1299 = OpFMul %v3float %1295 %1295 + %1300 = OpFMul %v3float %1298 %1299 + %1301 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_1 + %1302 = OpLoad %float %1301 + %1303 = OpCompositeConstruct %v3float %1302 %1302 %1302 + %1304 = OpFMul %v3float %1303 %1295 + %1305 = OpFAdd %v3float %1300 %1304 + %1306 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_2 + %1307 = OpLoad %float %1306 + %1308 = OpCompositeConstruct %v3float %1307 %1307 %1307 + %1309 = OpFAdd %v3float %1305 %1308 + %1310 = OpAccessChain %_ptr_Uniform_v3float %_Globals %int_16 + %1311 = OpLoad %v3float %1310 + %1312 = OpFMul %v3float %1309 %1311 + %1313 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_17 + %1314 = OpLoad %v4float %1313 + %1315 = OpVectorShuffle %v3float %1314 %1314 0 1 2 + %1316 = OpAccessChain %_ptr_Uniform_float %_Globals %int_17 %int_3 + %1317 = OpLoad %float %1316 + %1318 = OpCompositeConstruct %v3float %1317 %1317 %1317 + %1319 = OpExtInst %v3float %1 FMix %1312 %1315 %1318 + %1320 = OpExtInst %v3float %1 FMax %138 %1319 + %1321 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %int_1 + %1322 = OpLoad %float %1321 + %1323 = OpCompositeConstruct %v3float %1322 %1322 %1322 + %1324 = OpExtInst %v3float %1 Pow %1320 %1323 + %1325 = OpIEqual %bool %605 %uint_0 + OpSelectionMerge %1326 DontFlatten + OpBranchConditional %1325 %1327 %1328 + %1328 = OpLabel + %1329 = OpIEqual %bool %605 %uint_1 + OpSelectionMerge %1330 None + OpBranchConditional %1329 %1331 %1332 + %1332 = OpLabel + %1333 = OpIEqual %bool %605 %uint_3 + %1334 = OpIEqual %bool %605 %uint_5 + %1335 = OpLogicalOr %bool %1333 %1334 + OpSelectionMerge %1336 None + OpBranchConditional %1335 %1337 %1338 + %1338 = OpLabel + %1339 = OpIEqual %bool %605 %uint_4 + %1340 = OpIEqual %bool %605 %uint_6 + %1341 = OpLogicalOr %bool %1339 %1340 + OpSelectionMerge %1342 None + OpBranchConditional %1341 %1343 %1344 + %1344 = OpLabel + %1345 = OpIEqual %bool %605 %uint_7 + OpSelectionMerge %1346 None + OpBranchConditional %1345 %1347 %1348 + %1348 = OpLabel + %1349 = OpVectorTimesMatrix %v3float %1324 %573 + %1350 = OpVectorTimesMatrix %v3float %1349 %602 + %1351 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %int_2 + %1352 = OpLoad %float %1351 + %1353 = OpCompositeConstruct %v3float %1352 %1352 %1352 + %1354 = OpExtInst %v3float %1 Pow %1350 %1353 + OpBranch %1346 + %1347 = OpLabel + %1355 = OpVectorTimesMatrix %v3float %932 %573 + %1356 = OpVectorTimesMatrix %v3float %1355 %602 + %1357 = OpFMul %v3float %1356 %519 + %1358 = OpExtInst %v3float %1 Pow %1357 %286 + %1359 = OpFMul %v3float %196 %1358 + %1360 = OpFAdd %v3float %195 %1359 + %1361 = OpFMul %v3float %197 %1358 + %1362 = OpFAdd %v3float %141 %1361 + %1363 = OpFDiv %v3float %141 %1362 + %1364 = OpFMul %v3float %1360 %1363 + %1365 = OpExtInst %v3float %1 Pow %1364 %287 + OpBranch %1346 + %1346 = OpLabel + %1366 = OpPhi %v3float %1354 %1348 %1365 %1347 + OpBranch %1342 + %1343 = OpLabel + %1367 = OpMatrixTimesMatrix %mat3v3float %572 %423 + %1368 = OpFMul %v3float %932 %285 + %1369 = OpVectorTimesMatrix %v3float %1368 %1367 + %1370 = OpCompositeExtract %float %1369 0 + %1371 = OpCompositeExtract %float %1369 1 + %1372 = OpExtInst %float %1 FMin %1370 %1371 + %1373 = OpCompositeExtract %float %1369 2 + %1374 = OpExtInst %float %1 FMin %1372 %1373 + %1375 = OpExtInst %float %1 FMax %1370 %1371 + %1376 = OpExtInst %float %1 FMax %1375 %1373 + %1377 = OpExtInst %float %1 FMax %1376 %float_1_00000001en10 + %1378 = OpExtInst %float %1 FMax %1374 %float_1_00000001en10 + %1379 = OpFSub %float %1377 %1378 + %1380 = OpExtInst %float %1 FMax %1376 %float_0_00999999978 + %1381 = OpFDiv %float %1379 %1380 + %1382 = OpFSub %float %1373 %1371 + %1383 = OpFMul %float %1373 %1382 + %1384 = OpFSub %float %1371 %1370 + %1385 = OpFMul %float %1371 %1384 + %1386 = OpFAdd %float %1383 %1385 + %1387 = OpFSub %float %1370 %1373 + %1388 = OpFMul %float %1370 %1387 + %1389 = OpFAdd %float %1386 %1388 + %1390 = OpExtInst %float %1 Sqrt %1389 + %1391 = OpFAdd %float %1373 %1371 + %1392 = OpFAdd %float %1391 %1370 + %1393 = OpFMul %float %float_1_75 %1390 + %1394 = OpFAdd %float %1392 %1393 + %1395 = OpFMul %float %1394 %float_0_333333343 + %1396 = OpFSub %float %1381 %float_0_400000006 + %1397 = OpFMul %float %1396 %float_5 + %1398 = OpFMul %float %1396 %float_2_5 + %1399 = OpExtInst %float %1 FAbs %1398 + %1400 = OpFSub %float %float_1 %1399 + %1401 = OpExtInst %float %1 FMax %1400 %float_0 + %1402 = OpExtInst %float %1 FSign %1397 + %1403 = OpConvertFToS %int %1402 + %1404 = OpConvertSToF %float %1403 + %1405 = OpFMul %float %1401 %1401 + %1406 = OpFSub %float %float_1 %1405 + %1407 = OpFMul %float %1404 %1406 + %1408 = OpFAdd %float %float_1 %1407 + %1409 = OpFMul %float %1408 %float_0_0250000004 + %1410 = OpFOrdLessThanEqual %bool %1395 %float_0_0533333346 + OpSelectionMerge %1411 None + OpBranchConditional %1410 %1412 %1413 + %1413 = OpLabel + %1414 = OpFOrdGreaterThanEqual %bool %1395 %float_0_159999996 + OpSelectionMerge %1415 None + OpBranchConditional %1414 %1416 %1417 + %1417 = OpLabel + %1418 = OpFDiv %float %float_0_239999995 %1394 + %1419 = OpFSub %float %1418 %float_0_5 + %1420 = OpFMul %float %1409 %1419 + OpBranch %1415 + %1416 = OpLabel + OpBranch %1415 + %1415 = OpLabel + %1421 = OpPhi %float %1420 %1417 %float_0 %1416 + OpBranch %1411 + %1412 = OpLabel + OpBranch %1411 + %1411 = OpLabel + %1422 = OpPhi %float %1421 %1415 %1409 %1412 + %1423 = OpFAdd %float %float_1 %1422 + %1424 = OpCompositeConstruct %v3float %1423 %1423 %1423 + %1425 = OpFMul %v3float %1369 %1424 + %1426 = OpCompositeExtract %float %1425 0 + %1427 = OpCompositeExtract %float %1425 1 + %1428 = OpFOrdEqual %bool %1426 %1427 + %1429 = OpCompositeExtract %float %1425 2 + %1430 = OpFOrdEqual %bool %1427 %1429 + %1431 = OpLogicalAnd %bool %1428 %1430 + OpSelectionMerge %1432 None + OpBranchConditional %1431 %1433 %1434 + %1434 = OpLabel + %1435 = OpExtInst %float %1 Sqrt %float_3 + %1436 = OpFSub %float %1427 %1429 + %1437 = OpFMul %float %1435 %1436 + %1438 = OpFMul %float %float_2 %1426 + %1439 = OpFSub %float %1438 %1427 + %1440 = OpFSub %float %1439 %1429 + %1441 = OpExtInst %float %1 Atan2 %1437 %1440 + %1442 = OpFMul %float %float_57_2957764 %1441 + OpBranch %1432 + %1433 = OpLabel + OpBranch %1432 + %1432 = OpLabel + %1443 = OpPhi %float %1442 %1434 %float_0 %1433 + %1444 = OpFOrdLessThan %bool %1443 %float_0 + OpSelectionMerge %1445 None + OpBranchConditional %1444 %1446 %1445 + %1446 = OpLabel + %1447 = OpFAdd %float %1443 %float_360 + OpBranch %1445 + %1445 = OpLabel + %1448 = OpPhi %float %1443 %1432 %1447 %1446 + %1449 = OpExtInst %float %1 FClamp %1448 %float_0 %float_360 + %1450 = OpFOrdGreaterThan %bool %1449 %float_180 + OpSelectionMerge %1451 None + OpBranchConditional %1450 %1452 %1451 + %1452 = OpLabel + %1453 = OpFSub %float %1449 %float_360 + OpBranch %1451 + %1451 = OpLabel + %1454 = OpPhi %float %1449 %1445 %1453 %1452 + %1455 = OpFOrdGreaterThan %bool %1454 %float_n67_5 + %1456 = OpFOrdLessThan %bool %1454 %float_67_5 + %1457 = OpLogicalAnd %bool %1455 %1456 + OpSelectionMerge %1458 None + OpBranchConditional %1457 %1459 %1458 + %1459 = OpLabel + %1460 = OpFSub %float %1454 %float_n67_5 + %1461 = OpFMul %float %1460 %float_0_0296296291 + %1462 = OpConvertFToS %int %1461 + %1463 = OpConvertSToF %float %1462 + %1464 = OpFSub %float %1461 %1463 + %1465 = OpFMul %float %1464 %1464 + %1466 = OpFMul %float %1465 %1464 + %1467 = OpIEqual %bool %1462 %int_3 + OpSelectionMerge %1468 None + OpBranchConditional %1467 %1469 %1470 + %1470 = OpLabel + %1471 = OpIEqual %bool %1462 %int_2 + OpSelectionMerge %1472 None + OpBranchConditional %1471 %1473 %1474 + %1474 = OpLabel + %1475 = OpIEqual %bool %1462 %int_1 + OpSelectionMerge %1476 None + OpBranchConditional %1475 %1477 %1478 + %1478 = OpLabel + %1479 = OpIEqual %bool %1462 %int_0 + OpSelectionMerge %1480 None + OpBranchConditional %1479 %1481 %1482 + %1482 = OpLabel + OpBranch %1480 + %1481 = OpLabel + %1483 = OpFMul %float %1466 %float_0_166666672 + OpBranch %1480 + %1480 = OpLabel + %1484 = OpPhi %float %float_0 %1482 %1483 %1481 + OpBranch %1476 + %1477 = OpLabel + %1485 = OpFMul %float %1466 %float_n0_5 + %1486 = OpFMul %float %1465 %float_0_5 + %1487 = OpFAdd %float %1485 %1486 + %1488 = OpFMul %float %1464 %float_0_5 + %1489 = OpFAdd %float %1487 %1488 + %1490 = OpFAdd %float %1489 %float_0_166666672 + OpBranch %1476 + %1476 = OpLabel + %1491 = OpPhi %float %1484 %1480 %1490 %1477 + OpBranch %1472 + %1473 = OpLabel + %1492 = OpFMul %float %1466 %float_0_5 + %1493 = OpFMul %float %1465 %float_n1 + %1494 = OpFAdd %float %1492 %1493 + %1495 = OpFAdd %float %1494 %float_0_666666687 + OpBranch %1472 + %1472 = OpLabel + %1496 = OpPhi %float %1491 %1476 %1495 %1473 + OpBranch %1468 + %1469 = OpLabel + %1497 = OpFMul %float %1466 %float_n0_166666672 + %1498 = OpFMul %float %1465 %float_0_5 + %1499 = OpFAdd %float %1497 %1498 + %1500 = OpFMul %float %1464 %float_n0_5 + %1501 = OpFAdd %float %1499 %1500 + %1502 = OpFAdd %float %1501 %float_0_166666672 + OpBranch %1468 + %1468 = OpLabel + %1503 = OpPhi %float %1496 %1472 %1502 %1469 + OpBranch %1458 + %1458 = OpLabel + %1504 = OpPhi %float %float_0 %1451 %1503 %1468 + %1505 = OpFMul %float %1504 %float_1_5 + %1506 = OpFMul %float %1505 %1381 + %1507 = OpFSub %float %float_0_0299999993 %1426 + %1508 = OpFMul %float %1506 %1507 + %1509 = OpFMul %float %1508 %float_0_180000007 + %1510 = OpFAdd %float %1426 %1509 + %1511 = OpCompositeInsert %v3float %1510 %1425 0 + %1512 = OpExtInst %v3float %1 FClamp %1511 %138 %337 + %1513 = OpVectorTimesMatrix %v3float %1512 %434 + %1514 = OpExtInst %v3float %1 FClamp %1513 %138 %337 + %1515 = OpDot %float %1514 %73 + %1516 = OpCompositeConstruct %v3float %1515 %1515 %1515 + %1517 = OpExtInst %v3float %1 FMix %1516 %1514 %241 + %1518 = OpCompositeExtract %float %1517 0 + %1519 = OpExtInst %float %1 Exp2 %float_n15 + %1520 = OpFMul %float %float_0_179999992 %1519 + %1521 = OpExtInst %float %1 Exp2 %float_18 + %1522 = OpFMul %float %float_0_179999992 %1521 + OpStore %528 %499 + OpStore %527 %500 + %1523 = OpFOrdLessThanEqual %bool %1518 %float_0 + %1524 = OpExtInst %float %1 Exp2 %float_n14 + %1525 = OpSelect %float %1523 %1524 %1518 + %1526 = OpExtInst %float %1 Log %1525 + %1527 = OpFDiv %float %1526 %1091 + %1528 = OpExtInst %float %1 Log %1520 + %1529 = OpFDiv %float %1528 %1091 + %1530 = OpFOrdLessThanEqual %bool %1527 %1529 + OpSelectionMerge %1531 None + OpBranchConditional %1530 %1532 %1533 + %1533 = OpLabel + %1534 = OpFOrdGreaterThan %bool %1527 %1529 + %1535 = OpExtInst %float %1 Log %float_0_180000007 + %1536 = OpFDiv %float %1535 %1091 + %1537 = OpFOrdLessThan %bool %1527 %1536 + %1538 = OpLogicalAnd %bool %1534 %1537 + OpSelectionMerge %1539 None + OpBranchConditional %1538 %1540 %1541 + %1541 = OpLabel + %1542 = OpFOrdGreaterThanEqual %bool %1527 %1536 + %1543 = OpExtInst %float %1 Log %1522 + %1544 = OpFDiv %float %1543 %1091 + %1545 = OpFOrdLessThan %bool %1527 %1544 + %1546 = OpLogicalAnd %bool %1542 %1545 + OpSelectionMerge %1547 None + OpBranchConditional %1546 %1548 %1549 + %1549 = OpLabel + %1550 = OpExtInst %float %1 Log %float_10000 + %1551 = OpFDiv %float %1550 %1091 + OpBranch %1547 + %1548 = OpLabel + %1552 = OpFSub %float %1527 %1536 + %1553 = OpFMul %float %float_3 %1552 + %1554 = OpFSub %float %1544 %1536 + %1555 = OpFDiv %float %1553 %1554 + %1556 = OpConvertFToS %int %1555 + %1557 = OpConvertSToF %float %1556 + %1558 = OpFSub %float %1555 %1557 + %1559 = OpAccessChain %_ptr_Function_float %527 %1556 + %1560 = OpLoad %float %1559 + %1561 = OpIAdd %int %1556 %int_1 + %1562 = OpAccessChain %_ptr_Function_float %527 %1561 + %1563 = OpLoad %float %1562 + %1564 = OpIAdd %int %1556 %int_2 + %1565 = OpAccessChain %_ptr_Function_float %527 %1564 + %1566 = OpLoad %float %1565 + %1567 = OpCompositeConstruct %v3float %1560 %1563 %1566 + %1568 = OpFMul %float %1558 %1558 + %1569 = OpCompositeConstruct %v3float %1568 %1558 %float_1 + %1570 = OpMatrixTimesVector %v3float %466 %1567 + %1571 = OpDot %float %1569 %1570 + OpBranch %1547 + %1547 = OpLabel + %1572 = OpPhi %float %1551 %1549 %1571 %1548 + OpBranch %1539 + %1540 = OpLabel + %1573 = OpFSub %float %1527 %1529 + %1574 = OpFMul %float %float_3 %1573 + %1575 = OpFSub %float %1536 %1529 + %1576 = OpFDiv %float %1574 %1575 + %1577 = OpConvertFToS %int %1576 + %1578 = OpConvertSToF %float %1577 + %1579 = OpFSub %float %1576 %1578 + %1580 = OpAccessChain %_ptr_Function_float %528 %1577 + %1581 = OpLoad %float %1580 + %1582 = OpIAdd %int %1577 %int_1 + %1583 = OpAccessChain %_ptr_Function_float %528 %1582 + %1584 = OpLoad %float %1583 + %1585 = OpIAdd %int %1577 %int_2 + %1586 = OpAccessChain %_ptr_Function_float %528 %1585 + %1587 = OpLoad %float %1586 + %1588 = OpCompositeConstruct %v3float %1581 %1584 %1587 + %1589 = OpFMul %float %1579 %1579 + %1590 = OpCompositeConstruct %v3float %1589 %1579 %float_1 + %1591 = OpMatrixTimesVector %v3float %466 %1588 + %1592 = OpDot %float %1590 %1591 + OpBranch %1539 + %1539 = OpLabel + %1593 = OpPhi %float %1572 %1547 %1592 %1540 + OpBranch %1531 + %1532 = OpLabel + %1594 = OpExtInst %float %1 Log %float_9_99999975en05 + %1595 = OpFDiv %float %1594 %1091 + OpBranch %1531 + %1531 = OpLabel + %1596 = OpPhi %float %1593 %1539 %1595 %1532 + %1597 = OpExtInst %float %1 Pow %float_10 %1596 + %1598 = OpCompositeInsert %v3float %1597 %523 0 + %1599 = OpCompositeExtract %float %1517 1 + OpStore %530 %499 + OpStore %529 %500 + %1600 = OpFOrdLessThanEqual %bool %1599 %float_0 + %1601 = OpSelect %float %1600 %1524 %1599 + %1602 = OpExtInst %float %1 Log %1601 + %1603 = OpFDiv %float %1602 %1091 + %1604 = OpFOrdLessThanEqual %bool %1603 %1529 + OpSelectionMerge %1605 None + OpBranchConditional %1604 %1606 %1607 + %1607 = OpLabel + %1608 = OpFOrdGreaterThan %bool %1603 %1529 + %1609 = OpExtInst %float %1 Log %float_0_180000007 + %1610 = OpFDiv %float %1609 %1091 + %1611 = OpFOrdLessThan %bool %1603 %1610 + %1612 = OpLogicalAnd %bool %1608 %1611 + OpSelectionMerge %1613 None + OpBranchConditional %1612 %1614 %1615 + %1615 = OpLabel + %1616 = OpFOrdGreaterThanEqual %bool %1603 %1610 + %1617 = OpExtInst %float %1 Log %1522 + %1618 = OpFDiv %float %1617 %1091 + %1619 = OpFOrdLessThan %bool %1603 %1618 + %1620 = OpLogicalAnd %bool %1616 %1619 + OpSelectionMerge %1621 None + OpBranchConditional %1620 %1622 %1623 + %1623 = OpLabel + %1624 = OpExtInst %float %1 Log %float_10000 + %1625 = OpFDiv %float %1624 %1091 + OpBranch %1621 + %1622 = OpLabel + %1626 = OpFSub %float %1603 %1610 + %1627 = OpFMul %float %float_3 %1626 + %1628 = OpFSub %float %1618 %1610 + %1629 = OpFDiv %float %1627 %1628 + %1630 = OpConvertFToS %int %1629 + %1631 = OpConvertSToF %float %1630 + %1632 = OpFSub %float %1629 %1631 + %1633 = OpAccessChain %_ptr_Function_float %529 %1630 + %1634 = OpLoad %float %1633 + %1635 = OpIAdd %int %1630 %int_1 + %1636 = OpAccessChain %_ptr_Function_float %529 %1635 + %1637 = OpLoad %float %1636 + %1638 = OpIAdd %int %1630 %int_2 + %1639 = OpAccessChain %_ptr_Function_float %529 %1638 + %1640 = OpLoad %float %1639 + %1641 = OpCompositeConstruct %v3float %1634 %1637 %1640 + %1642 = OpFMul %float %1632 %1632 + %1643 = OpCompositeConstruct %v3float %1642 %1632 %float_1 + %1644 = OpMatrixTimesVector %v3float %466 %1641 + %1645 = OpDot %float %1643 %1644 + OpBranch %1621 + %1621 = OpLabel + %1646 = OpPhi %float %1625 %1623 %1645 %1622 + OpBranch %1613 + %1614 = OpLabel + %1647 = OpFSub %float %1603 %1529 + %1648 = OpFMul %float %float_3 %1647 + %1649 = OpFSub %float %1610 %1529 + %1650 = OpFDiv %float %1648 %1649 + %1651 = OpConvertFToS %int %1650 + %1652 = OpConvertSToF %float %1651 + %1653 = OpFSub %float %1650 %1652 + %1654 = OpAccessChain %_ptr_Function_float %530 %1651 + %1655 = OpLoad %float %1654 + %1656 = OpIAdd %int %1651 %int_1 + %1657 = OpAccessChain %_ptr_Function_float %530 %1656 + %1658 = OpLoad %float %1657 + %1659 = OpIAdd %int %1651 %int_2 + %1660 = OpAccessChain %_ptr_Function_float %530 %1659 + %1661 = OpLoad %float %1660 + %1662 = OpCompositeConstruct %v3float %1655 %1658 %1661 + %1663 = OpFMul %float %1653 %1653 + %1664 = OpCompositeConstruct %v3float %1663 %1653 %float_1 + %1665 = OpMatrixTimesVector %v3float %466 %1662 + %1666 = OpDot %float %1664 %1665 + OpBranch %1613 + %1613 = OpLabel + %1667 = OpPhi %float %1646 %1621 %1666 %1614 + OpBranch %1605 + %1606 = OpLabel + %1668 = OpExtInst %float %1 Log %float_9_99999975en05 + %1669 = OpFDiv %float %1668 %1091 + OpBranch %1605 + %1605 = OpLabel + %1670 = OpPhi %float %1667 %1613 %1669 %1606 + %1671 = OpExtInst %float %1 Pow %float_10 %1670 + %1672 = OpCompositeInsert %v3float %1671 %1598 1 + %1673 = OpCompositeExtract %float %1517 2 + OpStore %532 %499 + OpStore %531 %500 + %1674 = OpFOrdLessThanEqual %bool %1673 %float_0 + %1675 = OpSelect %float %1674 %1524 %1673 + %1676 = OpExtInst %float %1 Log %1675 + %1677 = OpFDiv %float %1676 %1091 + %1678 = OpFOrdLessThanEqual %bool %1677 %1529 + OpSelectionMerge %1679 None + OpBranchConditional %1678 %1680 %1681 + %1681 = OpLabel + %1682 = OpFOrdGreaterThan %bool %1677 %1529 + %1683 = OpExtInst %float %1 Log %float_0_180000007 + %1684 = OpFDiv %float %1683 %1091 + %1685 = OpFOrdLessThan %bool %1677 %1684 + %1686 = OpLogicalAnd %bool %1682 %1685 + OpSelectionMerge %1687 None + OpBranchConditional %1686 %1688 %1689 + %1689 = OpLabel + %1690 = OpFOrdGreaterThanEqual %bool %1677 %1684 + %1691 = OpExtInst %float %1 Log %1522 + %1692 = OpFDiv %float %1691 %1091 + %1693 = OpFOrdLessThan %bool %1677 %1692 + %1694 = OpLogicalAnd %bool %1690 %1693 + OpSelectionMerge %1695 None + OpBranchConditional %1694 %1696 %1697 + %1697 = OpLabel + %1698 = OpExtInst %float %1 Log %float_10000 + %1699 = OpFDiv %float %1698 %1091 + OpBranch %1695 + %1696 = OpLabel + %1700 = OpFSub %float %1677 %1684 + %1701 = OpFMul %float %float_3 %1700 + %1702 = OpFSub %float %1692 %1684 + %1703 = OpFDiv %float %1701 %1702 + %1704 = OpConvertFToS %int %1703 + %1705 = OpConvertSToF %float %1704 + %1706 = OpFSub %float %1703 %1705 + %1707 = OpAccessChain %_ptr_Function_float %531 %1704 + %1708 = OpLoad %float %1707 + %1709 = OpIAdd %int %1704 %int_1 + %1710 = OpAccessChain %_ptr_Function_float %531 %1709 + %1711 = OpLoad %float %1710 + %1712 = OpIAdd %int %1704 %int_2 + %1713 = OpAccessChain %_ptr_Function_float %531 %1712 + %1714 = OpLoad %float %1713 + %1715 = OpCompositeConstruct %v3float %1708 %1711 %1714 + %1716 = OpFMul %float %1706 %1706 + %1717 = OpCompositeConstruct %v3float %1716 %1706 %float_1 + %1718 = OpMatrixTimesVector %v3float %466 %1715 + %1719 = OpDot %float %1717 %1718 + OpBranch %1695 + %1695 = OpLabel + %1720 = OpPhi %float %1699 %1697 %1719 %1696 + OpBranch %1687 + %1688 = OpLabel + %1721 = OpFSub %float %1677 %1529 + %1722 = OpFMul %float %float_3 %1721 + %1723 = OpFSub %float %1684 %1529 + %1724 = OpFDiv %float %1722 %1723 + %1725 = OpConvertFToS %int %1724 + %1726 = OpConvertSToF %float %1725 + %1727 = OpFSub %float %1724 %1726 + %1728 = OpAccessChain %_ptr_Function_float %532 %1725 + %1729 = OpLoad %float %1728 + %1730 = OpIAdd %int %1725 %int_1 + %1731 = OpAccessChain %_ptr_Function_float %532 %1730 + %1732 = OpLoad %float %1731 + %1733 = OpIAdd %int %1725 %int_2 + %1734 = OpAccessChain %_ptr_Function_float %532 %1733 + %1735 = OpLoad %float %1734 + %1736 = OpCompositeConstruct %v3float %1729 %1732 %1735 + %1737 = OpFMul %float %1727 %1727 + %1738 = OpCompositeConstruct %v3float %1737 %1727 %float_1 + %1739 = OpMatrixTimesVector %v3float %466 %1736 + %1740 = OpDot %float %1738 %1739 + OpBranch %1687 + %1687 = OpLabel + %1741 = OpPhi %float %1720 %1695 %1740 %1688 + OpBranch %1679 + %1680 = OpLabel + %1742 = OpExtInst %float %1 Log %float_9_99999975en05 + %1743 = OpFDiv %float %1742 %1091 + OpBranch %1679 + %1679 = OpLabel + %1744 = OpPhi %float %1741 %1687 %1743 %1680 + %1745 = OpExtInst %float %1 Pow %float_10 %1744 + %1746 = OpCompositeInsert %v3float %1745 %1672 2 + %1747 = OpVectorTimesMatrix %v3float %1746 %438 + %1748 = OpVectorTimesMatrix %v3float %1747 %434 + %1749 = OpExtInst %float %1 Pow %float_2 %float_n12 + %1750 = OpFMul %float %float_0_179999992 %1749 + OpStore %540 %499 + OpStore %539 %500 + %1751 = OpFOrdLessThanEqual %bool %1750 %float_0 + %1752 = OpSelect %float %1751 %1524 %1750 + %1753 = OpExtInst %float %1 Log %1752 + %1754 = OpFDiv %float %1753 %1091 + %1755 = OpFOrdLessThanEqual %bool %1754 %1529 + OpSelectionMerge %1756 None + OpBranchConditional %1755 %1757 %1758 + %1758 = OpLabel + %1759 = OpFOrdGreaterThan %bool %1754 %1529 + %1760 = OpExtInst %float %1 Log %float_0_180000007 + %1761 = OpFDiv %float %1760 %1091 + %1762 = OpFOrdLessThan %bool %1754 %1761 + %1763 = OpLogicalAnd %bool %1759 %1762 + OpSelectionMerge %1764 None + OpBranchConditional %1763 %1765 %1766 + %1766 = OpLabel + %1767 = OpFOrdGreaterThanEqual %bool %1754 %1761 + %1768 = OpExtInst %float %1 Log %1522 + %1769 = OpFDiv %float %1768 %1091 + %1770 = OpFOrdLessThan %bool %1754 %1769 + %1771 = OpLogicalAnd %bool %1767 %1770 + OpSelectionMerge %1772 None + OpBranchConditional %1771 %1773 %1774 + %1774 = OpLabel + %1775 = OpExtInst %float %1 Log %float_10000 + %1776 = OpFDiv %float %1775 %1091 + OpBranch %1772 + %1773 = OpLabel + %1777 = OpFSub %float %1754 %1761 + %1778 = OpFMul %float %float_3 %1777 + %1779 = OpFSub %float %1769 %1761 + %1780 = OpFDiv %float %1778 %1779 + %1781 = OpConvertFToS %int %1780 + %1782 = OpConvertSToF %float %1781 + %1783 = OpFSub %float %1780 %1782 + %1784 = OpAccessChain %_ptr_Function_float %539 %1781 + %1785 = OpLoad %float %1784 + %1786 = OpIAdd %int %1781 %int_1 + %1787 = OpAccessChain %_ptr_Function_float %539 %1786 + %1788 = OpLoad %float %1787 + %1789 = OpIAdd %int %1781 %int_2 + %1790 = OpAccessChain %_ptr_Function_float %539 %1789 + %1791 = OpLoad %float %1790 + %1792 = OpCompositeConstruct %v3float %1785 %1788 %1791 + %1793 = OpFMul %float %1783 %1783 + %1794 = OpCompositeConstruct %v3float %1793 %1783 %float_1 + %1795 = OpMatrixTimesVector %v3float %466 %1792 + %1796 = OpDot %float %1794 %1795 + OpBranch %1772 + %1772 = OpLabel + %1797 = OpPhi %float %1776 %1774 %1796 %1773 + OpBranch %1764 + %1765 = OpLabel + %1798 = OpFSub %float %1754 %1529 + %1799 = OpFMul %float %float_3 %1798 + %1800 = OpFSub %float %1761 %1529 + %1801 = OpFDiv %float %1799 %1800 + %1802 = OpConvertFToS %int %1801 + %1803 = OpConvertSToF %float %1802 + %1804 = OpFSub %float %1801 %1803 + %1805 = OpAccessChain %_ptr_Function_float %540 %1802 + %1806 = OpLoad %float %1805 + %1807 = OpIAdd %int %1802 %int_1 + %1808 = OpAccessChain %_ptr_Function_float %540 %1807 + %1809 = OpLoad %float %1808 + %1810 = OpIAdd %int %1802 %int_2 + %1811 = OpAccessChain %_ptr_Function_float %540 %1810 + %1812 = OpLoad %float %1811 + %1813 = OpCompositeConstruct %v3float %1806 %1809 %1812 + %1814 = OpFMul %float %1804 %1804 + %1815 = OpCompositeConstruct %v3float %1814 %1804 %float_1 + %1816 = OpMatrixTimesVector %v3float %466 %1813 + %1817 = OpDot %float %1815 %1816 + OpBranch %1764 + %1764 = OpLabel + %1818 = OpPhi %float %1797 %1772 %1817 %1765 + OpBranch %1756 + %1757 = OpLabel + %1819 = OpExtInst %float %1 Log %float_9_99999975en05 + %1820 = OpFDiv %float %1819 %1091 + OpBranch %1756 + %1756 = OpLabel + %1821 = OpPhi %float %1818 %1764 %1820 %1757 + %1822 = OpExtInst %float %1 Pow %float_10 %1821 + OpStore %542 %499 + OpStore %541 %500 + %1823 = OpExtInst %float %1 Log %float_0_180000007 + %1824 = OpFDiv %float %1823 %1091 + %1825 = OpFOrdLessThanEqual %bool %1824 %1529 + OpSelectionMerge %1826 None + OpBranchConditional %1825 %1827 %1828 + %1828 = OpLabel + %1829 = OpFOrdGreaterThan %bool %1824 %1529 + %1830 = OpFOrdLessThan %bool %1824 %1824 + %1831 = OpLogicalAnd %bool %1829 %1830 + OpSelectionMerge %1832 None + OpBranchConditional %1831 %1833 %1834 + %1834 = OpLabel + %1835 = OpFOrdGreaterThanEqual %bool %1824 %1824 + %1836 = OpExtInst %float %1 Log %1522 + %1837 = OpFDiv %float %1836 %1091 + %1838 = OpFOrdLessThan %bool %1824 %1837 + %1839 = OpLogicalAnd %bool %1835 %1838 + OpSelectionMerge %1840 None + OpBranchConditional %1839 %1841 %1842 + %1842 = OpLabel + %1843 = OpExtInst %float %1 Log %float_10000 + %1844 = OpFDiv %float %1843 %1091 + OpBranch %1840 + %1841 = OpLabel + %1845 = OpFSub %float %1824 %1824 + %1846 = OpFMul %float %float_3 %1845 + %1847 = OpFSub %float %1837 %1824 + %1848 = OpFDiv %float %1846 %1847 + %1849 = OpConvertFToS %int %1848 + %1850 = OpConvertSToF %float %1849 + %1851 = OpFSub %float %1848 %1850 + %1852 = OpAccessChain %_ptr_Function_float %541 %1849 + %1853 = OpLoad %float %1852 + %1854 = OpIAdd %int %1849 %int_1 + %1855 = OpAccessChain %_ptr_Function_float %541 %1854 + %1856 = OpLoad %float %1855 + %1857 = OpIAdd %int %1849 %int_2 + %1858 = OpAccessChain %_ptr_Function_float %541 %1857 + %1859 = OpLoad %float %1858 + %1860 = OpCompositeConstruct %v3float %1853 %1856 %1859 + %1861 = OpFMul %float %1851 %1851 + %1862 = OpCompositeConstruct %v3float %1861 %1851 %float_1 + %1863 = OpMatrixTimesVector %v3float %466 %1860 + %1864 = OpDot %float %1862 %1863 + OpBranch %1840 + %1840 = OpLabel + %1865 = OpPhi %float %1844 %1842 %1864 %1841 + OpBranch %1832 + %1833 = OpLabel + %1866 = OpAccessChain %_ptr_Function_float %542 %int_3 + %1867 = OpLoad %float %1866 + %1868 = OpAccessChain %_ptr_Function_float %542 %int_4 + %1869 = OpLoad %float %1868 + %1870 = OpAccessChain %_ptr_Function_float %542 %int_5 + %1871 = OpLoad %float %1870 + %1872 = OpCompositeConstruct %v3float %1867 %1869 %1871 + %1873 = OpMatrixTimesVector %v3float %466 %1872 + %1874 = OpCompositeExtract %float %1873 2 + OpBranch %1832 + %1832 = OpLabel + %1875 = OpPhi %float %1865 %1840 %1874 %1833 + OpBranch %1826 + %1827 = OpLabel + %1876 = OpExtInst %float %1 Log %float_9_99999975en05 + %1877 = OpFDiv %float %1876 %1091 + OpBranch %1826 + %1826 = OpLabel + %1878 = OpPhi %float %1875 %1832 %1877 %1827 + %1879 = OpExtInst %float %1 Pow %float_10 %1878 + %1880 = OpExtInst %float %1 Pow %float_2 %float_11 + %1881 = OpFMul %float %float_0_179999992 %1880 + OpStore %544 %499 + OpStore %543 %500 + %1882 = OpFOrdLessThanEqual %bool %1881 %float_0 + %1883 = OpSelect %float %1882 %1524 %1881 + %1884 = OpExtInst %float %1 Log %1883 + %1885 = OpFDiv %float %1884 %1091 + %1886 = OpFOrdLessThanEqual %bool %1885 %1529 + OpSelectionMerge %1887 None + OpBranchConditional %1886 %1888 %1889 + %1889 = OpLabel + %1890 = OpFOrdGreaterThan %bool %1885 %1529 + %1891 = OpFOrdLessThan %bool %1885 %1824 + %1892 = OpLogicalAnd %bool %1890 %1891 + OpSelectionMerge %1893 None + OpBranchConditional %1892 %1894 %1895 + %1895 = OpLabel + %1896 = OpFOrdGreaterThanEqual %bool %1885 %1824 + %1897 = OpExtInst %float %1 Log %1522 + %1898 = OpFDiv %float %1897 %1091 + %1899 = OpFOrdLessThan %bool %1885 %1898 + %1900 = OpLogicalAnd %bool %1896 %1899 + OpSelectionMerge %1901 None + OpBranchConditional %1900 %1902 %1903 + %1903 = OpLabel + %1904 = OpExtInst %float %1 Log %float_10000 + %1905 = OpFDiv %float %1904 %1091 + OpBranch %1901 + %1902 = OpLabel + %1906 = OpFSub %float %1885 %1824 + %1907 = OpFMul %float %float_3 %1906 + %1908 = OpFSub %float %1898 %1824 + %1909 = OpFDiv %float %1907 %1908 + %1910 = OpConvertFToS %int %1909 + %1911 = OpConvertSToF %float %1910 + %1912 = OpFSub %float %1909 %1911 + %1913 = OpAccessChain %_ptr_Function_float %543 %1910 + %1914 = OpLoad %float %1913 + %1915 = OpIAdd %int %1910 %int_1 + %1916 = OpAccessChain %_ptr_Function_float %543 %1915 + %1917 = OpLoad %float %1916 + %1918 = OpIAdd %int %1910 %int_2 + %1919 = OpAccessChain %_ptr_Function_float %543 %1918 + %1920 = OpLoad %float %1919 + %1921 = OpCompositeConstruct %v3float %1914 %1917 %1920 + %1922 = OpFMul %float %1912 %1912 + %1923 = OpCompositeConstruct %v3float %1922 %1912 %float_1 + %1924 = OpMatrixTimesVector %v3float %466 %1921 + %1925 = OpDot %float %1923 %1924 + OpBranch %1901 + %1901 = OpLabel + %1926 = OpPhi %float %1905 %1903 %1925 %1902 + OpBranch %1893 + %1894 = OpLabel + %1927 = OpFSub %float %1885 %1529 + %1928 = OpFMul %float %float_3 %1927 + %1929 = OpFSub %float %1824 %1529 + %1930 = OpFDiv %float %1928 %1929 + %1931 = OpConvertFToS %int %1930 + %1932 = OpConvertSToF %float %1931 + %1933 = OpFSub %float %1930 %1932 + %1934 = OpAccessChain %_ptr_Function_float %544 %1931 + %1935 = OpLoad %float %1934 + %1936 = OpIAdd %int %1931 %int_1 + %1937 = OpAccessChain %_ptr_Function_float %544 %1936 + %1938 = OpLoad %float %1937 + %1939 = OpIAdd %int %1931 %int_2 + %1940 = OpAccessChain %_ptr_Function_float %544 %1939 + %1941 = OpLoad %float %1940 + %1942 = OpCompositeConstruct %v3float %1935 %1938 %1941 + %1943 = OpFMul %float %1933 %1933 + %1944 = OpCompositeConstruct %v3float %1943 %1933 %float_1 + %1945 = OpMatrixTimesVector %v3float %466 %1942 + %1946 = OpDot %float %1944 %1945 + OpBranch %1893 + %1893 = OpLabel + %1947 = OpPhi %float %1926 %1901 %1946 %1894 + OpBranch %1887 + %1888 = OpLabel + %1948 = OpExtInst %float %1 Log %float_9_99999975en05 + %1949 = OpFDiv %float %1948 %1091 + OpBranch %1887 + %1887 = OpLabel + %1950 = OpPhi %float %1947 %1893 %1949 %1888 + %1951 = OpExtInst %float %1 Pow %float_10 %1950 + %1952 = OpCompositeExtract %float %1748 0 + OpStore %538 %506 + OpStore %537 %507 + %1953 = OpFOrdLessThanEqual %bool %1952 %float_0 + %1954 = OpSelect %float %1953 %float_9_99999975en05 %1952 + %1955 = OpExtInst %float %1 Log %1954 + %1956 = OpFDiv %float %1955 %1091 + %1957 = OpExtInst %float %1 Log %1822 + %1958 = OpFDiv %float %1957 %1091 + %1959 = OpFOrdLessThanEqual %bool %1956 %1958 + OpSelectionMerge %1960 None + OpBranchConditional %1959 %1961 %1962 + %1962 = OpLabel + %1963 = OpFOrdGreaterThan %bool %1956 %1958 + %1964 = OpExtInst %float %1 Log %1879 + %1965 = OpFDiv %float %1964 %1091 + %1966 = OpFOrdLessThan %bool %1956 %1965 + %1967 = OpLogicalAnd %bool %1963 %1966 + OpSelectionMerge %1968 None + OpBranchConditional %1967 %1969 %1970 + %1970 = OpLabel + %1971 = OpFOrdGreaterThanEqual %bool %1956 %1965 + %1972 = OpExtInst %float %1 Log %1951 + %1973 = OpFDiv %float %1972 %1091 + %1974 = OpFOrdLessThan %bool %1956 %1973 + %1975 = OpLogicalAnd %bool %1971 %1974 + OpSelectionMerge %1976 None + OpBranchConditional %1975 %1977 %1978 + %1978 = OpLabel + %1979 = OpFMul %float %1956 %float_0_119999997 + %1980 = OpExtInst %float %1 Log %float_2000 + %1981 = OpFDiv %float %1980 %1091 + %1982 = OpFMul %float %float_0_119999997 %1972 + %1983 = OpFDiv %float %1982 %1091 + %1984 = OpFSub %float %1981 %1983 + %1985 = OpFAdd %float %1979 %1984 + OpBranch %1976 + %1977 = OpLabel + %1986 = OpFSub %float %1956 %1965 + %1987 = OpFMul %float %float_7 %1986 + %1988 = OpFSub %float %1973 %1965 + %1989 = OpFDiv %float %1987 %1988 + %1990 = OpConvertFToS %int %1989 + %1991 = OpConvertSToF %float %1990 + %1992 = OpFSub %float %1989 %1991 + %1993 = OpAccessChain %_ptr_Function_float %537 %1990 + %1994 = OpLoad %float %1993 + %1995 = OpIAdd %int %1990 %int_1 + %1996 = OpAccessChain %_ptr_Function_float %537 %1995 + %1997 = OpLoad %float %1996 + %1998 = OpIAdd %int %1990 %int_2 + %1999 = OpAccessChain %_ptr_Function_float %537 %1998 + %2000 = OpLoad %float %1999 + %2001 = OpCompositeConstruct %v3float %1994 %1997 %2000 + %2002 = OpFMul %float %1992 %1992 + %2003 = OpCompositeConstruct %v3float %2002 %1992 %float_1 + %2004 = OpMatrixTimesVector %v3float %466 %2001 + %2005 = OpDot %float %2003 %2004 + OpBranch %1976 + %1976 = OpLabel + %2006 = OpPhi %float %1985 %1978 %2005 %1977 + OpBranch %1968 + %1969 = OpLabel + %2007 = OpFSub %float %1956 %1958 + %2008 = OpFMul %float %float_7 %2007 + %2009 = OpFSub %float %1965 %1958 + %2010 = OpFDiv %float %2008 %2009 + %2011 = OpConvertFToS %int %2010 + %2012 = OpConvertSToF %float %2011 + %2013 = OpFSub %float %2010 %2012 + %2014 = OpAccessChain %_ptr_Function_float %538 %2011 + %2015 = OpLoad %float %2014 + %2016 = OpIAdd %int %2011 %int_1 + %2017 = OpAccessChain %_ptr_Function_float %538 %2016 + %2018 = OpLoad %float %2017 + %2019 = OpIAdd %int %2011 %int_2 + %2020 = OpAccessChain %_ptr_Function_float %538 %2019 + %2021 = OpLoad %float %2020 + %2022 = OpCompositeConstruct %v3float %2015 %2018 %2021 + %2023 = OpFMul %float %2013 %2013 + %2024 = OpCompositeConstruct %v3float %2023 %2013 %float_1 + %2025 = OpMatrixTimesVector %v3float %466 %2022 + %2026 = OpDot %float %2024 %2025 + OpBranch %1968 + %1968 = OpLabel + %2027 = OpPhi %float %2006 %1976 %2026 %1969 + OpBranch %1960 + %1961 = OpLabel + %2028 = OpExtInst %float %1 Log %float_0_00499999989 + %2029 = OpFDiv %float %2028 %1091 + OpBranch %1960 + %1960 = OpLabel + %2030 = OpPhi %float %2027 %1968 %2029 %1961 + %2031 = OpExtInst %float %1 Pow %float_10 %2030 + %2032 = OpCompositeInsert %v3float %2031 %523 0 + %2033 = OpCompositeExtract %float %1748 1 + OpStore %536 %506 + OpStore %535 %507 + %2034 = OpFOrdLessThanEqual %bool %2033 %float_0 + %2035 = OpSelect %float %2034 %float_9_99999975en05 %2033 + %2036 = OpExtInst %float %1 Log %2035 + %2037 = OpFDiv %float %2036 %1091 + %2038 = OpFOrdLessThanEqual %bool %2037 %1958 + OpSelectionMerge %2039 None + OpBranchConditional %2038 %2040 %2041 + %2041 = OpLabel + %2042 = OpFOrdGreaterThan %bool %2037 %1958 + %2043 = OpExtInst %float %1 Log %1879 + %2044 = OpFDiv %float %2043 %1091 + %2045 = OpFOrdLessThan %bool %2037 %2044 + %2046 = OpLogicalAnd %bool %2042 %2045 + OpSelectionMerge %2047 None + OpBranchConditional %2046 %2048 %2049 + %2049 = OpLabel + %2050 = OpFOrdGreaterThanEqual %bool %2037 %2044 + %2051 = OpExtInst %float %1 Log %1951 + %2052 = OpFDiv %float %2051 %1091 + %2053 = OpFOrdLessThan %bool %2037 %2052 + %2054 = OpLogicalAnd %bool %2050 %2053 + OpSelectionMerge %2055 None + OpBranchConditional %2054 %2056 %2057 + %2057 = OpLabel + %2058 = OpFMul %float %2037 %float_0_119999997 + %2059 = OpExtInst %float %1 Log %float_2000 + %2060 = OpFDiv %float %2059 %1091 + %2061 = OpFMul %float %float_0_119999997 %2051 + %2062 = OpFDiv %float %2061 %1091 + %2063 = OpFSub %float %2060 %2062 + %2064 = OpFAdd %float %2058 %2063 + OpBranch %2055 + %2056 = OpLabel + %2065 = OpFSub %float %2037 %2044 + %2066 = OpFMul %float %float_7 %2065 + %2067 = OpFSub %float %2052 %2044 + %2068 = OpFDiv %float %2066 %2067 + %2069 = OpConvertFToS %int %2068 + %2070 = OpConvertSToF %float %2069 + %2071 = OpFSub %float %2068 %2070 + %2072 = OpAccessChain %_ptr_Function_float %535 %2069 + %2073 = OpLoad %float %2072 + %2074 = OpIAdd %int %2069 %int_1 + %2075 = OpAccessChain %_ptr_Function_float %535 %2074 + %2076 = OpLoad %float %2075 + %2077 = OpIAdd %int %2069 %int_2 + %2078 = OpAccessChain %_ptr_Function_float %535 %2077 + %2079 = OpLoad %float %2078 + %2080 = OpCompositeConstruct %v3float %2073 %2076 %2079 + %2081 = OpFMul %float %2071 %2071 + %2082 = OpCompositeConstruct %v3float %2081 %2071 %float_1 + %2083 = OpMatrixTimesVector %v3float %466 %2080 + %2084 = OpDot %float %2082 %2083 + OpBranch %2055 + %2055 = OpLabel + %2085 = OpPhi %float %2064 %2057 %2084 %2056 + OpBranch %2047 + %2048 = OpLabel + %2086 = OpFSub %float %2037 %1958 + %2087 = OpFMul %float %float_7 %2086 + %2088 = OpFSub %float %2044 %1958 + %2089 = OpFDiv %float %2087 %2088 + %2090 = OpConvertFToS %int %2089 + %2091 = OpConvertSToF %float %2090 + %2092 = OpFSub %float %2089 %2091 + %2093 = OpAccessChain %_ptr_Function_float %536 %2090 + %2094 = OpLoad %float %2093 + %2095 = OpIAdd %int %2090 %int_1 + %2096 = OpAccessChain %_ptr_Function_float %536 %2095 + %2097 = OpLoad %float %2096 + %2098 = OpIAdd %int %2090 %int_2 + %2099 = OpAccessChain %_ptr_Function_float %536 %2098 + %2100 = OpLoad %float %2099 + %2101 = OpCompositeConstruct %v3float %2094 %2097 %2100 + %2102 = OpFMul %float %2092 %2092 + %2103 = OpCompositeConstruct %v3float %2102 %2092 %float_1 + %2104 = OpMatrixTimesVector %v3float %466 %2101 + %2105 = OpDot %float %2103 %2104 + OpBranch %2047 + %2047 = OpLabel + %2106 = OpPhi %float %2085 %2055 %2105 %2048 + OpBranch %2039 + %2040 = OpLabel + %2107 = OpExtInst %float %1 Log %float_0_00499999989 + %2108 = OpFDiv %float %2107 %1091 + OpBranch %2039 + %2039 = OpLabel + %2109 = OpPhi %float %2106 %2047 %2108 %2040 + %2110 = OpExtInst %float %1 Pow %float_10 %2109 + %2111 = OpCompositeInsert %v3float %2110 %2032 1 + %2112 = OpCompositeExtract %float %1748 2 + OpStore %534 %506 + OpStore %533 %507 + %2113 = OpFOrdLessThanEqual %bool %2112 %float_0 + %2114 = OpSelect %float %2113 %float_9_99999975en05 %2112 + %2115 = OpExtInst %float %1 Log %2114 + %2116 = OpFDiv %float %2115 %1091 + %2117 = OpFOrdLessThanEqual %bool %2116 %1958 + OpSelectionMerge %2118 None + OpBranchConditional %2117 %2119 %2120 + %2120 = OpLabel + %2121 = OpFOrdGreaterThan %bool %2116 %1958 + %2122 = OpExtInst %float %1 Log %1879 + %2123 = OpFDiv %float %2122 %1091 + %2124 = OpFOrdLessThan %bool %2116 %2123 + %2125 = OpLogicalAnd %bool %2121 %2124 + OpSelectionMerge %2126 None + OpBranchConditional %2125 %2127 %2128 + %2128 = OpLabel + %2129 = OpFOrdGreaterThanEqual %bool %2116 %2123 + %2130 = OpExtInst %float %1 Log %1951 + %2131 = OpFDiv %float %2130 %1091 + %2132 = OpFOrdLessThan %bool %2116 %2131 + %2133 = OpLogicalAnd %bool %2129 %2132 + OpSelectionMerge %2134 None + OpBranchConditional %2133 %2135 %2136 + %2136 = OpLabel + %2137 = OpFMul %float %2116 %float_0_119999997 + %2138 = OpExtInst %float %1 Log %float_2000 + %2139 = OpFDiv %float %2138 %1091 + %2140 = OpFMul %float %float_0_119999997 %2130 + %2141 = OpFDiv %float %2140 %1091 + %2142 = OpFSub %float %2139 %2141 + %2143 = OpFAdd %float %2137 %2142 + OpBranch %2134 + %2135 = OpLabel + %2144 = OpFSub %float %2116 %2123 + %2145 = OpFMul %float %float_7 %2144 + %2146 = OpFSub %float %2131 %2123 + %2147 = OpFDiv %float %2145 %2146 + %2148 = OpConvertFToS %int %2147 + %2149 = OpConvertSToF %float %2148 + %2150 = OpFSub %float %2147 %2149 + %2151 = OpAccessChain %_ptr_Function_float %533 %2148 + %2152 = OpLoad %float %2151 + %2153 = OpIAdd %int %2148 %int_1 + %2154 = OpAccessChain %_ptr_Function_float %533 %2153 + %2155 = OpLoad %float %2154 + %2156 = OpIAdd %int %2148 %int_2 + %2157 = OpAccessChain %_ptr_Function_float %533 %2156 + %2158 = OpLoad %float %2157 + %2159 = OpCompositeConstruct %v3float %2152 %2155 %2158 + %2160 = OpFMul %float %2150 %2150 + %2161 = OpCompositeConstruct %v3float %2160 %2150 %float_1 + %2162 = OpMatrixTimesVector %v3float %466 %2159 + %2163 = OpDot %float %2161 %2162 + OpBranch %2134 + %2134 = OpLabel + %2164 = OpPhi %float %2143 %2136 %2163 %2135 + OpBranch %2126 + %2127 = OpLabel + %2165 = OpFSub %float %2116 %1958 + %2166 = OpFMul %float %float_7 %2165 + %2167 = OpFSub %float %2123 %1958 + %2168 = OpFDiv %float %2166 %2167 + %2169 = OpConvertFToS %int %2168 + %2170 = OpConvertSToF %float %2169 + %2171 = OpFSub %float %2168 %2170 + %2172 = OpAccessChain %_ptr_Function_float %534 %2169 + %2173 = OpLoad %float %2172 + %2174 = OpIAdd %int %2169 %int_1 + %2175 = OpAccessChain %_ptr_Function_float %534 %2174 + %2176 = OpLoad %float %2175 + %2177 = OpIAdd %int %2169 %int_2 + %2178 = OpAccessChain %_ptr_Function_float %534 %2177 + %2179 = OpLoad %float %2178 + %2180 = OpCompositeConstruct %v3float %2173 %2176 %2179 + %2181 = OpFMul %float %2171 %2171 + %2182 = OpCompositeConstruct %v3float %2181 %2171 %float_1 + %2183 = OpMatrixTimesVector %v3float %466 %2180 + %2184 = OpDot %float %2182 %2183 + OpBranch %2126 + %2126 = OpLabel + %2185 = OpPhi %float %2164 %2134 %2184 %2127 + OpBranch %2118 + %2119 = OpLabel + %2186 = OpExtInst %float %1 Log %float_0_00499999989 + %2187 = OpFDiv %float %2186 %1091 + OpBranch %2118 + %2118 = OpLabel + %2188 = OpPhi %float %2185 %2126 %2187 %2119 + %2189 = OpExtInst %float %1 Pow %float_10 %2188 + %2190 = OpCompositeInsert %v3float %2189 %2111 2 + %2191 = OpVectorTimesMatrix %v3float %2190 %602 + %2192 = OpFMul %v3float %2191 %519 + %2193 = OpExtInst %v3float %1 Pow %2192 %286 + %2194 = OpFMul %v3float %196 %2193 + %2195 = OpFAdd %v3float %195 %2194 + %2196 = OpFMul %v3float %197 %2193 + %2197 = OpFAdd %v3float %141 %2196 + %2198 = OpFDiv %v3float %141 %2197 + %2199 = OpFMul %v3float %2195 %2198 + %2200 = OpExtInst %v3float %1 Pow %2199 %287 + OpBranch %1342 + %1342 = OpLabel + %2201 = OpPhi %v3float %1366 %1346 %2200 %2118 + OpBranch %1336 + %1337 = OpLabel + %2202 = OpMatrixTimesMatrix %mat3v3float %572 %423 + %2203 = OpFMul %v3float %932 %285 + %2204 = OpVectorTimesMatrix %v3float %2203 %2202 + %2205 = OpCompositeExtract %float %2204 0 + %2206 = OpCompositeExtract %float %2204 1 + %2207 = OpExtInst %float %1 FMin %2205 %2206 + %2208 = OpCompositeExtract %float %2204 2 + %2209 = OpExtInst %float %1 FMin %2207 %2208 + %2210 = OpExtInst %float %1 FMax %2205 %2206 + %2211 = OpExtInst %float %1 FMax %2210 %2208 + %2212 = OpExtInst %float %1 FMax %2211 %float_1_00000001en10 + %2213 = OpExtInst %float %1 FMax %2209 %float_1_00000001en10 + %2214 = OpFSub %float %2212 %2213 + %2215 = OpExtInst %float %1 FMax %2211 %float_0_00999999978 + %2216 = OpFDiv %float %2214 %2215 + %2217 = OpFSub %float %2208 %2206 + %2218 = OpFMul %float %2208 %2217 + %2219 = OpFSub %float %2206 %2205 + %2220 = OpFMul %float %2206 %2219 + %2221 = OpFAdd %float %2218 %2220 + %2222 = OpFSub %float %2205 %2208 + %2223 = OpFMul %float %2205 %2222 + %2224 = OpFAdd %float %2221 %2223 + %2225 = OpExtInst %float %1 Sqrt %2224 + %2226 = OpFAdd %float %2208 %2206 + %2227 = OpFAdd %float %2226 %2205 + %2228 = OpFMul %float %float_1_75 %2225 + %2229 = OpFAdd %float %2227 %2228 + %2230 = OpFMul %float %2229 %float_0_333333343 + %2231 = OpFSub %float %2216 %float_0_400000006 + %2232 = OpFMul %float %2231 %float_5 + %2233 = OpFMul %float %2231 %float_2_5 + %2234 = OpExtInst %float %1 FAbs %2233 + %2235 = OpFSub %float %float_1 %2234 + %2236 = OpExtInst %float %1 FMax %2235 %float_0 + %2237 = OpExtInst %float %1 FSign %2232 + %2238 = OpConvertFToS %int %2237 + %2239 = OpConvertSToF %float %2238 + %2240 = OpFMul %float %2236 %2236 + %2241 = OpFSub %float %float_1 %2240 + %2242 = OpFMul %float %2239 %2241 + %2243 = OpFAdd %float %float_1 %2242 + %2244 = OpFMul %float %2243 %float_0_0250000004 + %2245 = OpFOrdLessThanEqual %bool %2230 %float_0_0533333346 + OpSelectionMerge %2246 None + OpBranchConditional %2245 %2247 %2248 + %2248 = OpLabel + %2249 = OpFOrdGreaterThanEqual %bool %2230 %float_0_159999996 + OpSelectionMerge %2250 None + OpBranchConditional %2249 %2251 %2252 + %2252 = OpLabel + %2253 = OpFDiv %float %float_0_239999995 %2229 + %2254 = OpFSub %float %2253 %float_0_5 + %2255 = OpFMul %float %2244 %2254 + OpBranch %2250 + %2251 = OpLabel + OpBranch %2250 + %2250 = OpLabel + %2256 = OpPhi %float %2255 %2252 %float_0 %2251 + OpBranch %2246 + %2247 = OpLabel + OpBranch %2246 + %2246 = OpLabel + %2257 = OpPhi %float %2256 %2250 %2244 %2247 + %2258 = OpFAdd %float %float_1 %2257 + %2259 = OpCompositeConstruct %v3float %2258 %2258 %2258 + %2260 = OpFMul %v3float %2204 %2259 + %2261 = OpCompositeExtract %float %2260 0 + %2262 = OpCompositeExtract %float %2260 1 + %2263 = OpFOrdEqual %bool %2261 %2262 + %2264 = OpCompositeExtract %float %2260 2 + %2265 = OpFOrdEqual %bool %2262 %2264 + %2266 = OpLogicalAnd %bool %2263 %2265 + OpSelectionMerge %2267 None + OpBranchConditional %2266 %2268 %2269 + %2269 = OpLabel + %2270 = OpExtInst %float %1 Sqrt %float_3 + %2271 = OpFSub %float %2262 %2264 + %2272 = OpFMul %float %2270 %2271 + %2273 = OpFMul %float %float_2 %2261 + %2274 = OpFSub %float %2273 %2262 + %2275 = OpFSub %float %2274 %2264 + %2276 = OpExtInst %float %1 Atan2 %2272 %2275 + %2277 = OpFMul %float %float_57_2957764 %2276 + OpBranch %2267 + %2268 = OpLabel + OpBranch %2267 + %2267 = OpLabel + %2278 = OpPhi %float %2277 %2269 %float_0 %2268 + %2279 = OpFOrdLessThan %bool %2278 %float_0 + OpSelectionMerge %2280 None + OpBranchConditional %2279 %2281 %2280 + %2281 = OpLabel + %2282 = OpFAdd %float %2278 %float_360 + OpBranch %2280 + %2280 = OpLabel + %2283 = OpPhi %float %2278 %2267 %2282 %2281 + %2284 = OpExtInst %float %1 FClamp %2283 %float_0 %float_360 + %2285 = OpFOrdGreaterThan %bool %2284 %float_180 + OpSelectionMerge %2286 None + OpBranchConditional %2285 %2287 %2286 + %2287 = OpLabel + %2288 = OpFSub %float %2284 %float_360 + OpBranch %2286 + %2286 = OpLabel + %2289 = OpPhi %float %2284 %2280 %2288 %2287 + %2290 = OpFOrdGreaterThan %bool %2289 %float_n67_5 + %2291 = OpFOrdLessThan %bool %2289 %float_67_5 + %2292 = OpLogicalAnd %bool %2290 %2291 + OpSelectionMerge %2293 None + OpBranchConditional %2292 %2294 %2293 + %2294 = OpLabel + %2295 = OpFSub %float %2289 %float_n67_5 + %2296 = OpFMul %float %2295 %float_0_0296296291 + %2297 = OpConvertFToS %int %2296 + %2298 = OpConvertSToF %float %2297 + %2299 = OpFSub %float %2296 %2298 + %2300 = OpFMul %float %2299 %2299 + %2301 = OpFMul %float %2300 %2299 + %2302 = OpIEqual %bool %2297 %int_3 + OpSelectionMerge %2303 None + OpBranchConditional %2302 %2304 %2305 + %2305 = OpLabel + %2306 = OpIEqual %bool %2297 %int_2 + OpSelectionMerge %2307 None + OpBranchConditional %2306 %2308 %2309 + %2309 = OpLabel + %2310 = OpIEqual %bool %2297 %int_1 + OpSelectionMerge %2311 None + OpBranchConditional %2310 %2312 %2313 + %2313 = OpLabel + %2314 = OpIEqual %bool %2297 %int_0 + OpSelectionMerge %2315 None + OpBranchConditional %2314 %2316 %2317 + %2317 = OpLabel + OpBranch %2315 + %2316 = OpLabel + %2318 = OpFMul %float %2301 %float_0_166666672 + OpBranch %2315 + %2315 = OpLabel + %2319 = OpPhi %float %float_0 %2317 %2318 %2316 + OpBranch %2311 + %2312 = OpLabel + %2320 = OpFMul %float %2301 %float_n0_5 + %2321 = OpFMul %float %2300 %float_0_5 + %2322 = OpFAdd %float %2320 %2321 + %2323 = OpFMul %float %2299 %float_0_5 + %2324 = OpFAdd %float %2322 %2323 + %2325 = OpFAdd %float %2324 %float_0_166666672 + OpBranch %2311 + %2311 = OpLabel + %2326 = OpPhi %float %2319 %2315 %2325 %2312 + OpBranch %2307 + %2308 = OpLabel + %2327 = OpFMul %float %2301 %float_0_5 + %2328 = OpFMul %float %2300 %float_n1 + %2329 = OpFAdd %float %2327 %2328 + %2330 = OpFAdd %float %2329 %float_0_666666687 + OpBranch %2307 + %2307 = OpLabel + %2331 = OpPhi %float %2326 %2311 %2330 %2308 + OpBranch %2303 + %2304 = OpLabel + %2332 = OpFMul %float %2301 %float_n0_166666672 + %2333 = OpFMul %float %2300 %float_0_5 + %2334 = OpFAdd %float %2332 %2333 + %2335 = OpFMul %float %2299 %float_n0_5 + %2336 = OpFAdd %float %2334 %2335 + %2337 = OpFAdd %float %2336 %float_0_166666672 + OpBranch %2303 + %2303 = OpLabel + %2338 = OpPhi %float %2331 %2307 %2337 %2304 + OpBranch %2293 + %2293 = OpLabel + %2339 = OpPhi %float %float_0 %2286 %2338 %2303 + %2340 = OpFMul %float %2339 %float_1_5 + %2341 = OpFMul %float %2340 %2216 + %2342 = OpFSub %float %float_0_0299999993 %2261 + %2343 = OpFMul %float %2341 %2342 + %2344 = OpFMul %float %2343 %float_0_180000007 + %2345 = OpFAdd %float %2261 %2344 + %2346 = OpCompositeInsert %v3float %2345 %2260 0 + %2347 = OpExtInst %v3float %1 FClamp %2346 %138 %337 + %2348 = OpVectorTimesMatrix %v3float %2347 %434 + %2349 = OpExtInst %v3float %1 FClamp %2348 %138 %337 + %2350 = OpDot %float %2349 %73 + %2351 = OpCompositeConstruct %v3float %2350 %2350 %2350 + %2352 = OpExtInst %v3float %1 FMix %2351 %2349 %241 + %2353 = OpCompositeExtract %float %2352 0 + %2354 = OpExtInst %float %1 Exp2 %float_n15 + %2355 = OpFMul %float %float_0_179999992 %2354 + %2356 = OpExtInst %float %1 Exp2 %float_18 + %2357 = OpFMul %float %float_0_179999992 %2356 + OpStore %546 %499 + OpStore %545 %500 + %2358 = OpFOrdLessThanEqual %bool %2353 %float_0 + %2359 = OpExtInst %float %1 Exp2 %float_n14 + %2360 = OpSelect %float %2358 %2359 %2353 + %2361 = OpExtInst %float %1 Log %2360 + %2362 = OpFDiv %float %2361 %1091 + %2363 = OpExtInst %float %1 Log %2355 + %2364 = OpFDiv %float %2363 %1091 + %2365 = OpFOrdLessThanEqual %bool %2362 %2364 + OpSelectionMerge %2366 None + OpBranchConditional %2365 %2367 %2368 + %2368 = OpLabel + %2369 = OpFOrdGreaterThan %bool %2362 %2364 + %2370 = OpExtInst %float %1 Log %float_0_180000007 + %2371 = OpFDiv %float %2370 %1091 + %2372 = OpFOrdLessThan %bool %2362 %2371 + %2373 = OpLogicalAnd %bool %2369 %2372 + OpSelectionMerge %2374 None + OpBranchConditional %2373 %2375 %2376 + %2376 = OpLabel + %2377 = OpFOrdGreaterThanEqual %bool %2362 %2371 + %2378 = OpExtInst %float %1 Log %2357 + %2379 = OpFDiv %float %2378 %1091 + %2380 = OpFOrdLessThan %bool %2362 %2379 + %2381 = OpLogicalAnd %bool %2377 %2380 + OpSelectionMerge %2382 None + OpBranchConditional %2381 %2383 %2384 + %2384 = OpLabel + %2385 = OpExtInst %float %1 Log %float_10000 + %2386 = OpFDiv %float %2385 %1091 + OpBranch %2382 + %2383 = OpLabel + %2387 = OpFSub %float %2362 %2371 + %2388 = OpFMul %float %float_3 %2387 + %2389 = OpFSub %float %2379 %2371 + %2390 = OpFDiv %float %2388 %2389 + %2391 = OpConvertFToS %int %2390 + %2392 = OpConvertSToF %float %2391 + %2393 = OpFSub %float %2390 %2392 + %2394 = OpAccessChain %_ptr_Function_float %545 %2391 + %2395 = OpLoad %float %2394 + %2396 = OpIAdd %int %2391 %int_1 + %2397 = OpAccessChain %_ptr_Function_float %545 %2396 + %2398 = OpLoad %float %2397 + %2399 = OpIAdd %int %2391 %int_2 + %2400 = OpAccessChain %_ptr_Function_float %545 %2399 + %2401 = OpLoad %float %2400 + %2402 = OpCompositeConstruct %v3float %2395 %2398 %2401 + %2403 = OpFMul %float %2393 %2393 + %2404 = OpCompositeConstruct %v3float %2403 %2393 %float_1 + %2405 = OpMatrixTimesVector %v3float %466 %2402 + %2406 = OpDot %float %2404 %2405 + OpBranch %2382 + %2382 = OpLabel + %2407 = OpPhi %float %2386 %2384 %2406 %2383 + OpBranch %2374 + %2375 = OpLabel + %2408 = OpFSub %float %2362 %2364 + %2409 = OpFMul %float %float_3 %2408 + %2410 = OpFSub %float %2371 %2364 + %2411 = OpFDiv %float %2409 %2410 + %2412 = OpConvertFToS %int %2411 + %2413 = OpConvertSToF %float %2412 + %2414 = OpFSub %float %2411 %2413 + %2415 = OpAccessChain %_ptr_Function_float %546 %2412 + %2416 = OpLoad %float %2415 + %2417 = OpIAdd %int %2412 %int_1 + %2418 = OpAccessChain %_ptr_Function_float %546 %2417 + %2419 = OpLoad %float %2418 + %2420 = OpIAdd %int %2412 %int_2 + %2421 = OpAccessChain %_ptr_Function_float %546 %2420 + %2422 = OpLoad %float %2421 + %2423 = OpCompositeConstruct %v3float %2416 %2419 %2422 + %2424 = OpFMul %float %2414 %2414 + %2425 = OpCompositeConstruct %v3float %2424 %2414 %float_1 + %2426 = OpMatrixTimesVector %v3float %466 %2423 + %2427 = OpDot %float %2425 %2426 + OpBranch %2374 + %2374 = OpLabel + %2428 = OpPhi %float %2407 %2382 %2427 %2375 + OpBranch %2366 + %2367 = OpLabel + %2429 = OpExtInst %float %1 Log %float_9_99999975en05 + %2430 = OpFDiv %float %2429 %1091 + OpBranch %2366 + %2366 = OpLabel + %2431 = OpPhi %float %2428 %2374 %2430 %2367 + %2432 = OpExtInst %float %1 Pow %float_10 %2431 + %2433 = OpCompositeInsert %v3float %2432 %523 0 + %2434 = OpCompositeExtract %float %2352 1 + OpStore %548 %499 + OpStore %547 %500 + %2435 = OpFOrdLessThanEqual %bool %2434 %float_0 + %2436 = OpSelect %float %2435 %2359 %2434 + %2437 = OpExtInst %float %1 Log %2436 + %2438 = OpFDiv %float %2437 %1091 + %2439 = OpFOrdLessThanEqual %bool %2438 %2364 + OpSelectionMerge %2440 None + OpBranchConditional %2439 %2441 %2442 + %2442 = OpLabel + %2443 = OpFOrdGreaterThan %bool %2438 %2364 + %2444 = OpExtInst %float %1 Log %float_0_180000007 + %2445 = OpFDiv %float %2444 %1091 + %2446 = OpFOrdLessThan %bool %2438 %2445 + %2447 = OpLogicalAnd %bool %2443 %2446 + OpSelectionMerge %2448 None + OpBranchConditional %2447 %2449 %2450 + %2450 = OpLabel + %2451 = OpFOrdGreaterThanEqual %bool %2438 %2445 + %2452 = OpExtInst %float %1 Log %2357 + %2453 = OpFDiv %float %2452 %1091 + %2454 = OpFOrdLessThan %bool %2438 %2453 + %2455 = OpLogicalAnd %bool %2451 %2454 + OpSelectionMerge %2456 None + OpBranchConditional %2455 %2457 %2458 + %2458 = OpLabel + %2459 = OpExtInst %float %1 Log %float_10000 + %2460 = OpFDiv %float %2459 %1091 + OpBranch %2456 + %2457 = OpLabel + %2461 = OpFSub %float %2438 %2445 + %2462 = OpFMul %float %float_3 %2461 + %2463 = OpFSub %float %2453 %2445 + %2464 = OpFDiv %float %2462 %2463 + %2465 = OpConvertFToS %int %2464 + %2466 = OpConvertSToF %float %2465 + %2467 = OpFSub %float %2464 %2466 + %2468 = OpAccessChain %_ptr_Function_float %547 %2465 + %2469 = OpLoad %float %2468 + %2470 = OpIAdd %int %2465 %int_1 + %2471 = OpAccessChain %_ptr_Function_float %547 %2470 + %2472 = OpLoad %float %2471 + %2473 = OpIAdd %int %2465 %int_2 + %2474 = OpAccessChain %_ptr_Function_float %547 %2473 + %2475 = OpLoad %float %2474 + %2476 = OpCompositeConstruct %v3float %2469 %2472 %2475 + %2477 = OpFMul %float %2467 %2467 + %2478 = OpCompositeConstruct %v3float %2477 %2467 %float_1 + %2479 = OpMatrixTimesVector %v3float %466 %2476 + %2480 = OpDot %float %2478 %2479 + OpBranch %2456 + %2456 = OpLabel + %2481 = OpPhi %float %2460 %2458 %2480 %2457 + OpBranch %2448 + %2449 = OpLabel + %2482 = OpFSub %float %2438 %2364 + %2483 = OpFMul %float %float_3 %2482 + %2484 = OpFSub %float %2445 %2364 + %2485 = OpFDiv %float %2483 %2484 + %2486 = OpConvertFToS %int %2485 + %2487 = OpConvertSToF %float %2486 + %2488 = OpFSub %float %2485 %2487 + %2489 = OpAccessChain %_ptr_Function_float %548 %2486 + %2490 = OpLoad %float %2489 + %2491 = OpIAdd %int %2486 %int_1 + %2492 = OpAccessChain %_ptr_Function_float %548 %2491 + %2493 = OpLoad %float %2492 + %2494 = OpIAdd %int %2486 %int_2 + %2495 = OpAccessChain %_ptr_Function_float %548 %2494 + %2496 = OpLoad %float %2495 + %2497 = OpCompositeConstruct %v3float %2490 %2493 %2496 + %2498 = OpFMul %float %2488 %2488 + %2499 = OpCompositeConstruct %v3float %2498 %2488 %float_1 + %2500 = OpMatrixTimesVector %v3float %466 %2497 + %2501 = OpDot %float %2499 %2500 + OpBranch %2448 + %2448 = OpLabel + %2502 = OpPhi %float %2481 %2456 %2501 %2449 + OpBranch %2440 + %2441 = OpLabel + %2503 = OpExtInst %float %1 Log %float_9_99999975en05 + %2504 = OpFDiv %float %2503 %1091 + OpBranch %2440 + %2440 = OpLabel + %2505 = OpPhi %float %2502 %2448 %2504 %2441 + %2506 = OpExtInst %float %1 Pow %float_10 %2505 + %2507 = OpCompositeInsert %v3float %2506 %2433 1 + %2508 = OpCompositeExtract %float %2352 2 + OpStore %550 %499 + OpStore %549 %500 + %2509 = OpFOrdLessThanEqual %bool %2508 %float_0 + %2510 = OpSelect %float %2509 %2359 %2508 + %2511 = OpExtInst %float %1 Log %2510 + %2512 = OpFDiv %float %2511 %1091 + %2513 = OpFOrdLessThanEqual %bool %2512 %2364 + OpSelectionMerge %2514 None + OpBranchConditional %2513 %2515 %2516 + %2516 = OpLabel + %2517 = OpFOrdGreaterThan %bool %2512 %2364 + %2518 = OpExtInst %float %1 Log %float_0_180000007 + %2519 = OpFDiv %float %2518 %1091 + %2520 = OpFOrdLessThan %bool %2512 %2519 + %2521 = OpLogicalAnd %bool %2517 %2520 + OpSelectionMerge %2522 None + OpBranchConditional %2521 %2523 %2524 + %2524 = OpLabel + %2525 = OpFOrdGreaterThanEqual %bool %2512 %2519 + %2526 = OpExtInst %float %1 Log %2357 + %2527 = OpFDiv %float %2526 %1091 + %2528 = OpFOrdLessThan %bool %2512 %2527 + %2529 = OpLogicalAnd %bool %2525 %2528 + OpSelectionMerge %2530 None + OpBranchConditional %2529 %2531 %2532 + %2532 = OpLabel + %2533 = OpExtInst %float %1 Log %float_10000 + %2534 = OpFDiv %float %2533 %1091 + OpBranch %2530 + %2531 = OpLabel + %2535 = OpFSub %float %2512 %2519 + %2536 = OpFMul %float %float_3 %2535 + %2537 = OpFSub %float %2527 %2519 + %2538 = OpFDiv %float %2536 %2537 + %2539 = OpConvertFToS %int %2538 + %2540 = OpConvertSToF %float %2539 + %2541 = OpFSub %float %2538 %2540 + %2542 = OpAccessChain %_ptr_Function_float %549 %2539 + %2543 = OpLoad %float %2542 + %2544 = OpIAdd %int %2539 %int_1 + %2545 = OpAccessChain %_ptr_Function_float %549 %2544 + %2546 = OpLoad %float %2545 + %2547 = OpIAdd %int %2539 %int_2 + %2548 = OpAccessChain %_ptr_Function_float %549 %2547 + %2549 = OpLoad %float %2548 + %2550 = OpCompositeConstruct %v3float %2543 %2546 %2549 + %2551 = OpFMul %float %2541 %2541 + %2552 = OpCompositeConstruct %v3float %2551 %2541 %float_1 + %2553 = OpMatrixTimesVector %v3float %466 %2550 + %2554 = OpDot %float %2552 %2553 + OpBranch %2530 + %2530 = OpLabel + %2555 = OpPhi %float %2534 %2532 %2554 %2531 + OpBranch %2522 + %2523 = OpLabel + %2556 = OpFSub %float %2512 %2364 + %2557 = OpFMul %float %float_3 %2556 + %2558 = OpFSub %float %2519 %2364 + %2559 = OpFDiv %float %2557 %2558 + %2560 = OpConvertFToS %int %2559 + %2561 = OpConvertSToF %float %2560 + %2562 = OpFSub %float %2559 %2561 + %2563 = OpAccessChain %_ptr_Function_float %550 %2560 + %2564 = OpLoad %float %2563 + %2565 = OpIAdd %int %2560 %int_1 + %2566 = OpAccessChain %_ptr_Function_float %550 %2565 + %2567 = OpLoad %float %2566 + %2568 = OpIAdd %int %2560 %int_2 + %2569 = OpAccessChain %_ptr_Function_float %550 %2568 + %2570 = OpLoad %float %2569 + %2571 = OpCompositeConstruct %v3float %2564 %2567 %2570 + %2572 = OpFMul %float %2562 %2562 + %2573 = OpCompositeConstruct %v3float %2572 %2562 %float_1 + %2574 = OpMatrixTimesVector %v3float %466 %2571 + %2575 = OpDot %float %2573 %2574 + OpBranch %2522 + %2522 = OpLabel + %2576 = OpPhi %float %2555 %2530 %2575 %2523 + OpBranch %2514 + %2515 = OpLabel + %2577 = OpExtInst %float %1 Log %float_9_99999975en05 + %2578 = OpFDiv %float %2577 %1091 + OpBranch %2514 + %2514 = OpLabel + %2579 = OpPhi %float %2576 %2522 %2578 %2515 + %2580 = OpExtInst %float %1 Pow %float_10 %2579 + %2581 = OpCompositeInsert %v3float %2580 %2507 2 + %2582 = OpVectorTimesMatrix %v3float %2581 %438 + %2583 = OpVectorTimesMatrix %v3float %2582 %434 + %2584 = OpExtInst %float %1 Pow %float_2 %float_n12 + %2585 = OpFMul %float %float_0_179999992 %2584 + OpStore %558 %499 + OpStore %557 %500 + %2586 = OpFOrdLessThanEqual %bool %2585 %float_0 + %2587 = OpSelect %float %2586 %2359 %2585 + %2588 = OpExtInst %float %1 Log %2587 + %2589 = OpFDiv %float %2588 %1091 + %2590 = OpFOrdLessThanEqual %bool %2589 %2364 + OpSelectionMerge %2591 None + OpBranchConditional %2590 %2592 %2593 + %2593 = OpLabel + %2594 = OpFOrdGreaterThan %bool %2589 %2364 + %2595 = OpExtInst %float %1 Log %float_0_180000007 + %2596 = OpFDiv %float %2595 %1091 + %2597 = OpFOrdLessThan %bool %2589 %2596 + %2598 = OpLogicalAnd %bool %2594 %2597 + OpSelectionMerge %2599 None + OpBranchConditional %2598 %2600 %2601 + %2601 = OpLabel + %2602 = OpFOrdGreaterThanEqual %bool %2589 %2596 + %2603 = OpExtInst %float %1 Log %2357 + %2604 = OpFDiv %float %2603 %1091 + %2605 = OpFOrdLessThan %bool %2589 %2604 + %2606 = OpLogicalAnd %bool %2602 %2605 + OpSelectionMerge %2607 None + OpBranchConditional %2606 %2608 %2609 + %2609 = OpLabel + %2610 = OpExtInst %float %1 Log %float_10000 + %2611 = OpFDiv %float %2610 %1091 + OpBranch %2607 + %2608 = OpLabel + %2612 = OpFSub %float %2589 %2596 + %2613 = OpFMul %float %float_3 %2612 + %2614 = OpFSub %float %2604 %2596 + %2615 = OpFDiv %float %2613 %2614 + %2616 = OpConvertFToS %int %2615 + %2617 = OpConvertSToF %float %2616 + %2618 = OpFSub %float %2615 %2617 + %2619 = OpAccessChain %_ptr_Function_float %557 %2616 + %2620 = OpLoad %float %2619 + %2621 = OpIAdd %int %2616 %int_1 + %2622 = OpAccessChain %_ptr_Function_float %557 %2621 + %2623 = OpLoad %float %2622 + %2624 = OpIAdd %int %2616 %int_2 + %2625 = OpAccessChain %_ptr_Function_float %557 %2624 + %2626 = OpLoad %float %2625 + %2627 = OpCompositeConstruct %v3float %2620 %2623 %2626 + %2628 = OpFMul %float %2618 %2618 + %2629 = OpCompositeConstruct %v3float %2628 %2618 %float_1 + %2630 = OpMatrixTimesVector %v3float %466 %2627 + %2631 = OpDot %float %2629 %2630 + OpBranch %2607 + %2607 = OpLabel + %2632 = OpPhi %float %2611 %2609 %2631 %2608 + OpBranch %2599 + %2600 = OpLabel + %2633 = OpFSub %float %2589 %2364 + %2634 = OpFMul %float %float_3 %2633 + %2635 = OpFSub %float %2596 %2364 + %2636 = OpFDiv %float %2634 %2635 + %2637 = OpConvertFToS %int %2636 + %2638 = OpConvertSToF %float %2637 + %2639 = OpFSub %float %2636 %2638 + %2640 = OpAccessChain %_ptr_Function_float %558 %2637 + %2641 = OpLoad %float %2640 + %2642 = OpIAdd %int %2637 %int_1 + %2643 = OpAccessChain %_ptr_Function_float %558 %2642 + %2644 = OpLoad %float %2643 + %2645 = OpIAdd %int %2637 %int_2 + %2646 = OpAccessChain %_ptr_Function_float %558 %2645 + %2647 = OpLoad %float %2646 + %2648 = OpCompositeConstruct %v3float %2641 %2644 %2647 + %2649 = OpFMul %float %2639 %2639 + %2650 = OpCompositeConstruct %v3float %2649 %2639 %float_1 + %2651 = OpMatrixTimesVector %v3float %466 %2648 + %2652 = OpDot %float %2650 %2651 + OpBranch %2599 + %2599 = OpLabel + %2653 = OpPhi %float %2632 %2607 %2652 %2600 + OpBranch %2591 + %2592 = OpLabel + %2654 = OpExtInst %float %1 Log %float_9_99999975en05 + %2655 = OpFDiv %float %2654 %1091 + OpBranch %2591 + %2591 = OpLabel + %2656 = OpPhi %float %2653 %2599 %2655 %2592 + %2657 = OpExtInst %float %1 Pow %float_10 %2656 + OpStore %560 %499 + OpStore %559 %500 + %2658 = OpExtInst %float %1 Log %float_0_180000007 + %2659 = OpFDiv %float %2658 %1091 + %2660 = OpFOrdLessThanEqual %bool %2659 %2364 + OpSelectionMerge %2661 None + OpBranchConditional %2660 %2662 %2663 + %2663 = OpLabel + %2664 = OpFOrdGreaterThan %bool %2659 %2364 + %2665 = OpFOrdLessThan %bool %2659 %2659 + %2666 = OpLogicalAnd %bool %2664 %2665 + OpSelectionMerge %2667 None + OpBranchConditional %2666 %2668 %2669 + %2669 = OpLabel + %2670 = OpFOrdGreaterThanEqual %bool %2659 %2659 + %2671 = OpExtInst %float %1 Log %2357 + %2672 = OpFDiv %float %2671 %1091 + %2673 = OpFOrdLessThan %bool %2659 %2672 + %2674 = OpLogicalAnd %bool %2670 %2673 + OpSelectionMerge %2675 None + OpBranchConditional %2674 %2676 %2677 + %2677 = OpLabel + %2678 = OpExtInst %float %1 Log %float_10000 + %2679 = OpFDiv %float %2678 %1091 + OpBranch %2675 + %2676 = OpLabel + %2680 = OpFSub %float %2659 %2659 + %2681 = OpFMul %float %float_3 %2680 + %2682 = OpFSub %float %2672 %2659 + %2683 = OpFDiv %float %2681 %2682 + %2684 = OpConvertFToS %int %2683 + %2685 = OpConvertSToF %float %2684 + %2686 = OpFSub %float %2683 %2685 + %2687 = OpAccessChain %_ptr_Function_float %559 %2684 + %2688 = OpLoad %float %2687 + %2689 = OpIAdd %int %2684 %int_1 + %2690 = OpAccessChain %_ptr_Function_float %559 %2689 + %2691 = OpLoad %float %2690 + %2692 = OpIAdd %int %2684 %int_2 + %2693 = OpAccessChain %_ptr_Function_float %559 %2692 + %2694 = OpLoad %float %2693 + %2695 = OpCompositeConstruct %v3float %2688 %2691 %2694 + %2696 = OpFMul %float %2686 %2686 + %2697 = OpCompositeConstruct %v3float %2696 %2686 %float_1 + %2698 = OpMatrixTimesVector %v3float %466 %2695 + %2699 = OpDot %float %2697 %2698 + OpBranch %2675 + %2675 = OpLabel + %2700 = OpPhi %float %2679 %2677 %2699 %2676 + OpBranch %2667 + %2668 = OpLabel + %2701 = OpAccessChain %_ptr_Function_float %560 %int_3 + %2702 = OpLoad %float %2701 + %2703 = OpAccessChain %_ptr_Function_float %560 %int_4 + %2704 = OpLoad %float %2703 + %2705 = OpAccessChain %_ptr_Function_float %560 %int_5 + %2706 = OpLoad %float %2705 + %2707 = OpCompositeConstruct %v3float %2702 %2704 %2706 + %2708 = OpMatrixTimesVector %v3float %466 %2707 + %2709 = OpCompositeExtract %float %2708 2 + OpBranch %2667 + %2667 = OpLabel + %2710 = OpPhi %float %2700 %2675 %2709 %2668 + OpBranch %2661 + %2662 = OpLabel + %2711 = OpExtInst %float %1 Log %float_9_99999975en05 + %2712 = OpFDiv %float %2711 %1091 + OpBranch %2661 + %2661 = OpLabel + %2713 = OpPhi %float %2710 %2667 %2712 %2662 + %2714 = OpExtInst %float %1 Pow %float_10 %2713 + %2715 = OpExtInst %float %1 Pow %float_2 %float_10 + %2716 = OpFMul %float %float_0_179999992 %2715 + OpStore %562 %499 + OpStore %561 %500 + %2717 = OpFOrdLessThanEqual %bool %2716 %float_0 + %2718 = OpSelect %float %2717 %2359 %2716 + %2719 = OpExtInst %float %1 Log %2718 + %2720 = OpFDiv %float %2719 %1091 + %2721 = OpFOrdLessThanEqual %bool %2720 %2364 + OpSelectionMerge %2722 None + OpBranchConditional %2721 %2723 %2724 + %2724 = OpLabel + %2725 = OpFOrdGreaterThan %bool %2720 %2364 + %2726 = OpFOrdLessThan %bool %2720 %2659 + %2727 = OpLogicalAnd %bool %2725 %2726 + OpSelectionMerge %2728 None + OpBranchConditional %2727 %2729 %2730 + %2730 = OpLabel + %2731 = OpFOrdGreaterThanEqual %bool %2720 %2659 + %2732 = OpExtInst %float %1 Log %2357 + %2733 = OpFDiv %float %2732 %1091 + %2734 = OpFOrdLessThan %bool %2720 %2733 + %2735 = OpLogicalAnd %bool %2731 %2734 + OpSelectionMerge %2736 None + OpBranchConditional %2735 %2737 %2738 + %2738 = OpLabel + %2739 = OpExtInst %float %1 Log %float_10000 + %2740 = OpFDiv %float %2739 %1091 + OpBranch %2736 + %2737 = OpLabel + %2741 = OpFSub %float %2720 %2659 + %2742 = OpFMul %float %float_3 %2741 + %2743 = OpFSub %float %2733 %2659 + %2744 = OpFDiv %float %2742 %2743 + %2745 = OpConvertFToS %int %2744 + %2746 = OpConvertSToF %float %2745 + %2747 = OpFSub %float %2744 %2746 + %2748 = OpAccessChain %_ptr_Function_float %561 %2745 + %2749 = OpLoad %float %2748 + %2750 = OpIAdd %int %2745 %int_1 + %2751 = OpAccessChain %_ptr_Function_float %561 %2750 + %2752 = OpLoad %float %2751 + %2753 = OpIAdd %int %2745 %int_2 + %2754 = OpAccessChain %_ptr_Function_float %561 %2753 + %2755 = OpLoad %float %2754 + %2756 = OpCompositeConstruct %v3float %2749 %2752 %2755 + %2757 = OpFMul %float %2747 %2747 + %2758 = OpCompositeConstruct %v3float %2757 %2747 %float_1 + %2759 = OpMatrixTimesVector %v3float %466 %2756 + %2760 = OpDot %float %2758 %2759 + OpBranch %2736 + %2736 = OpLabel + %2761 = OpPhi %float %2740 %2738 %2760 %2737 + OpBranch %2728 + %2729 = OpLabel + %2762 = OpFSub %float %2720 %2364 + %2763 = OpFMul %float %float_3 %2762 + %2764 = OpFSub %float %2659 %2364 + %2765 = OpFDiv %float %2763 %2764 + %2766 = OpConvertFToS %int %2765 + %2767 = OpConvertSToF %float %2766 + %2768 = OpFSub %float %2765 %2767 + %2769 = OpAccessChain %_ptr_Function_float %562 %2766 + %2770 = OpLoad %float %2769 + %2771 = OpIAdd %int %2766 %int_1 + %2772 = OpAccessChain %_ptr_Function_float %562 %2771 + %2773 = OpLoad %float %2772 + %2774 = OpIAdd %int %2766 %int_2 + %2775 = OpAccessChain %_ptr_Function_float %562 %2774 + %2776 = OpLoad %float %2775 + %2777 = OpCompositeConstruct %v3float %2770 %2773 %2776 + %2778 = OpFMul %float %2768 %2768 + %2779 = OpCompositeConstruct %v3float %2778 %2768 %float_1 + %2780 = OpMatrixTimesVector %v3float %466 %2777 + %2781 = OpDot %float %2779 %2780 + OpBranch %2728 + %2728 = OpLabel + %2782 = OpPhi %float %2761 %2736 %2781 %2729 + OpBranch %2722 + %2723 = OpLabel + %2783 = OpExtInst %float %1 Log %float_9_99999975en05 + %2784 = OpFDiv %float %2783 %1091 + OpBranch %2722 + %2722 = OpLabel + %2785 = OpPhi %float %2782 %2728 %2784 %2723 + %2786 = OpExtInst %float %1 Pow %float_10 %2785 + %2787 = OpCompositeExtract %float %2583 0 + OpStore %556 %503 + OpStore %555 %504 + %2788 = OpFOrdLessThanEqual %bool %2787 %float_0 + %2789 = OpSelect %float %2788 %float_9_99999975en05 %2787 + %2790 = OpExtInst %float %1 Log %2789 + %2791 = OpFDiv %float %2790 %1091 + %2792 = OpExtInst %float %1 Log %2657 + %2793 = OpFDiv %float %2792 %1091 + %2794 = OpFOrdLessThanEqual %bool %2791 %2793 + OpSelectionMerge %2795 None + OpBranchConditional %2794 %2796 %2797 + %2797 = OpLabel + %2798 = OpFOrdGreaterThan %bool %2791 %2793 + %2799 = OpExtInst %float %1 Log %2714 + %2800 = OpFDiv %float %2799 %1091 + %2801 = OpFOrdLessThan %bool %2791 %2800 + %2802 = OpLogicalAnd %bool %2798 %2801 + OpSelectionMerge %2803 None + OpBranchConditional %2802 %2804 %2805 + %2805 = OpLabel + %2806 = OpFOrdGreaterThanEqual %bool %2791 %2800 + %2807 = OpExtInst %float %1 Log %2786 + %2808 = OpFDiv %float %2807 %1091 + %2809 = OpFOrdLessThan %bool %2791 %2808 + %2810 = OpLogicalAnd %bool %2806 %2809 + OpSelectionMerge %2811 None + OpBranchConditional %2810 %2812 %2813 + %2813 = OpLabel + %2814 = OpFMul %float %2791 %float_0_0599999987 + %2815 = OpExtInst %float %1 Log %float_1000 + %2816 = OpFDiv %float %2815 %1091 + %2817 = OpFMul %float %float_0_0599999987 %2807 + %2818 = OpFDiv %float %2817 %1091 + %2819 = OpFSub %float %2816 %2818 + %2820 = OpFAdd %float %2814 %2819 + OpBranch %2811 + %2812 = OpLabel + %2821 = OpFSub %float %2791 %2800 + %2822 = OpFMul %float %float_7 %2821 + %2823 = OpFSub %float %2808 %2800 + %2824 = OpFDiv %float %2822 %2823 + %2825 = OpConvertFToS %int %2824 + %2826 = OpConvertSToF %float %2825 + %2827 = OpFSub %float %2824 %2826 + %2828 = OpAccessChain %_ptr_Function_float %555 %2825 + %2829 = OpLoad %float %2828 + %2830 = OpIAdd %int %2825 %int_1 + %2831 = OpAccessChain %_ptr_Function_float %555 %2830 + %2832 = OpLoad %float %2831 + %2833 = OpIAdd %int %2825 %int_2 + %2834 = OpAccessChain %_ptr_Function_float %555 %2833 + %2835 = OpLoad %float %2834 + %2836 = OpCompositeConstruct %v3float %2829 %2832 %2835 + %2837 = OpFMul %float %2827 %2827 + %2838 = OpCompositeConstruct %v3float %2837 %2827 %float_1 + %2839 = OpMatrixTimesVector %v3float %466 %2836 + %2840 = OpDot %float %2838 %2839 + OpBranch %2811 + %2811 = OpLabel + %2841 = OpPhi %float %2820 %2813 %2840 %2812 + OpBranch %2803 + %2804 = OpLabel + %2842 = OpFSub %float %2791 %2793 + %2843 = OpFMul %float %float_7 %2842 + %2844 = OpFSub %float %2800 %2793 + %2845 = OpFDiv %float %2843 %2844 + %2846 = OpConvertFToS %int %2845 + %2847 = OpConvertSToF %float %2846 + %2848 = OpFSub %float %2845 %2847 + %2849 = OpAccessChain %_ptr_Function_float %556 %2846 + %2850 = OpLoad %float %2849 + %2851 = OpIAdd %int %2846 %int_1 + %2852 = OpAccessChain %_ptr_Function_float %556 %2851 + %2853 = OpLoad %float %2852 + %2854 = OpIAdd %int %2846 %int_2 + %2855 = OpAccessChain %_ptr_Function_float %556 %2854 + %2856 = OpLoad %float %2855 + %2857 = OpCompositeConstruct %v3float %2850 %2853 %2856 + %2858 = OpFMul %float %2848 %2848 + %2859 = OpCompositeConstruct %v3float %2858 %2848 %float_1 + %2860 = OpMatrixTimesVector %v3float %466 %2857 + %2861 = OpDot %float %2859 %2860 + OpBranch %2803 + %2803 = OpLabel + %2862 = OpPhi %float %2841 %2811 %2861 %2804 + OpBranch %2795 + %2796 = OpLabel + %2863 = OpFMul %float %2791 %float_3 + %2864 = OpExtInst %float %1 Log %float_9_99999975en05 + %2865 = OpFDiv %float %2864 %1091 + %2866 = OpFMul %float %float_3 %2792 + %2867 = OpFDiv %float %2866 %1091 + %2868 = OpFSub %float %2865 %2867 + %2869 = OpFAdd %float %2863 %2868 + OpBranch %2795 + %2795 = OpLabel + %2870 = OpPhi %float %2862 %2803 %2869 %2796 + %2871 = OpExtInst %float %1 Pow %float_10 %2870 + %2872 = OpCompositeInsert %v3float %2871 %523 0 + %2873 = OpCompositeExtract %float %2583 1 + OpStore %554 %503 + OpStore %553 %504 + %2874 = OpFOrdLessThanEqual %bool %2873 %float_0 + %2875 = OpSelect %float %2874 %float_9_99999975en05 %2873 + %2876 = OpExtInst %float %1 Log %2875 + %2877 = OpFDiv %float %2876 %1091 + %2878 = OpFOrdLessThanEqual %bool %2877 %2793 + OpSelectionMerge %2879 None + OpBranchConditional %2878 %2880 %2881 + %2881 = OpLabel + %2882 = OpFOrdGreaterThan %bool %2877 %2793 + %2883 = OpExtInst %float %1 Log %2714 + %2884 = OpFDiv %float %2883 %1091 + %2885 = OpFOrdLessThan %bool %2877 %2884 + %2886 = OpLogicalAnd %bool %2882 %2885 + OpSelectionMerge %2887 None + OpBranchConditional %2886 %2888 %2889 + %2889 = OpLabel + %2890 = OpFOrdGreaterThanEqual %bool %2877 %2884 + %2891 = OpExtInst %float %1 Log %2786 + %2892 = OpFDiv %float %2891 %1091 + %2893 = OpFOrdLessThan %bool %2877 %2892 + %2894 = OpLogicalAnd %bool %2890 %2893 + OpSelectionMerge %2895 None + OpBranchConditional %2894 %2896 %2897 + %2897 = OpLabel + %2898 = OpFMul %float %2877 %float_0_0599999987 + %2899 = OpExtInst %float %1 Log %float_1000 + %2900 = OpFDiv %float %2899 %1091 + %2901 = OpFMul %float %float_0_0599999987 %2891 + %2902 = OpFDiv %float %2901 %1091 + %2903 = OpFSub %float %2900 %2902 + %2904 = OpFAdd %float %2898 %2903 + OpBranch %2895 + %2896 = OpLabel + %2905 = OpFSub %float %2877 %2884 + %2906 = OpFMul %float %float_7 %2905 + %2907 = OpFSub %float %2892 %2884 + %2908 = OpFDiv %float %2906 %2907 + %2909 = OpConvertFToS %int %2908 + %2910 = OpConvertSToF %float %2909 + %2911 = OpFSub %float %2908 %2910 + %2912 = OpAccessChain %_ptr_Function_float %553 %2909 + %2913 = OpLoad %float %2912 + %2914 = OpIAdd %int %2909 %int_1 + %2915 = OpAccessChain %_ptr_Function_float %553 %2914 + %2916 = OpLoad %float %2915 + %2917 = OpIAdd %int %2909 %int_2 + %2918 = OpAccessChain %_ptr_Function_float %553 %2917 + %2919 = OpLoad %float %2918 + %2920 = OpCompositeConstruct %v3float %2913 %2916 %2919 + %2921 = OpFMul %float %2911 %2911 + %2922 = OpCompositeConstruct %v3float %2921 %2911 %float_1 + %2923 = OpMatrixTimesVector %v3float %466 %2920 + %2924 = OpDot %float %2922 %2923 + OpBranch %2895 + %2895 = OpLabel + %2925 = OpPhi %float %2904 %2897 %2924 %2896 + OpBranch %2887 + %2888 = OpLabel + %2926 = OpFSub %float %2877 %2793 + %2927 = OpFMul %float %float_7 %2926 + %2928 = OpFSub %float %2884 %2793 + %2929 = OpFDiv %float %2927 %2928 + %2930 = OpConvertFToS %int %2929 + %2931 = OpConvertSToF %float %2930 + %2932 = OpFSub %float %2929 %2931 + %2933 = OpAccessChain %_ptr_Function_float %554 %2930 + %2934 = OpLoad %float %2933 + %2935 = OpIAdd %int %2930 %int_1 + %2936 = OpAccessChain %_ptr_Function_float %554 %2935 + %2937 = OpLoad %float %2936 + %2938 = OpIAdd %int %2930 %int_2 + %2939 = OpAccessChain %_ptr_Function_float %554 %2938 + %2940 = OpLoad %float %2939 + %2941 = OpCompositeConstruct %v3float %2934 %2937 %2940 + %2942 = OpFMul %float %2932 %2932 + %2943 = OpCompositeConstruct %v3float %2942 %2932 %float_1 + %2944 = OpMatrixTimesVector %v3float %466 %2941 + %2945 = OpDot %float %2943 %2944 + OpBranch %2887 + %2887 = OpLabel + %2946 = OpPhi %float %2925 %2895 %2945 %2888 + OpBranch %2879 + %2880 = OpLabel + %2947 = OpFMul %float %2877 %float_3 + %2948 = OpExtInst %float %1 Log %float_9_99999975en05 + %2949 = OpFDiv %float %2948 %1091 + %2950 = OpFMul %float %float_3 %2792 + %2951 = OpFDiv %float %2950 %1091 + %2952 = OpFSub %float %2949 %2951 + %2953 = OpFAdd %float %2947 %2952 + OpBranch %2879 + %2879 = OpLabel + %2954 = OpPhi %float %2946 %2887 %2953 %2880 + %2955 = OpExtInst %float %1 Pow %float_10 %2954 + %2956 = OpCompositeInsert %v3float %2955 %2872 1 + %2957 = OpCompositeExtract %float %2583 2 + OpStore %552 %503 + OpStore %551 %504 + %2958 = OpFOrdLessThanEqual %bool %2957 %float_0 + %2959 = OpSelect %float %2958 %float_9_99999975en05 %2957 + %2960 = OpExtInst %float %1 Log %2959 + %2961 = OpFDiv %float %2960 %1091 + %2962 = OpFOrdLessThanEqual %bool %2961 %2793 + OpSelectionMerge %2963 None + OpBranchConditional %2962 %2964 %2965 + %2965 = OpLabel + %2966 = OpFOrdGreaterThan %bool %2961 %2793 + %2967 = OpExtInst %float %1 Log %2714 + %2968 = OpFDiv %float %2967 %1091 + %2969 = OpFOrdLessThan %bool %2961 %2968 + %2970 = OpLogicalAnd %bool %2966 %2969 + OpSelectionMerge %2971 None + OpBranchConditional %2970 %2972 %2973 + %2973 = OpLabel + %2974 = OpFOrdGreaterThanEqual %bool %2961 %2968 + %2975 = OpExtInst %float %1 Log %2786 + %2976 = OpFDiv %float %2975 %1091 + %2977 = OpFOrdLessThan %bool %2961 %2976 + %2978 = OpLogicalAnd %bool %2974 %2977 + OpSelectionMerge %2979 None + OpBranchConditional %2978 %2980 %2981 + %2981 = OpLabel + %2982 = OpFMul %float %2961 %float_0_0599999987 + %2983 = OpExtInst %float %1 Log %float_1000 + %2984 = OpFDiv %float %2983 %1091 + %2985 = OpFMul %float %float_0_0599999987 %2975 + %2986 = OpFDiv %float %2985 %1091 + %2987 = OpFSub %float %2984 %2986 + %2988 = OpFAdd %float %2982 %2987 + OpBranch %2979 + %2980 = OpLabel + %2989 = OpFSub %float %2961 %2968 + %2990 = OpFMul %float %float_7 %2989 + %2991 = OpFSub %float %2976 %2968 + %2992 = OpFDiv %float %2990 %2991 + %2993 = OpConvertFToS %int %2992 + %2994 = OpConvertSToF %float %2993 + %2995 = OpFSub %float %2992 %2994 + %2996 = OpAccessChain %_ptr_Function_float %551 %2993 + %2997 = OpLoad %float %2996 + %2998 = OpIAdd %int %2993 %int_1 + %2999 = OpAccessChain %_ptr_Function_float %551 %2998 + %3000 = OpLoad %float %2999 + %3001 = OpIAdd %int %2993 %int_2 + %3002 = OpAccessChain %_ptr_Function_float %551 %3001 + %3003 = OpLoad %float %3002 + %3004 = OpCompositeConstruct %v3float %2997 %3000 %3003 + %3005 = OpFMul %float %2995 %2995 + %3006 = OpCompositeConstruct %v3float %3005 %2995 %float_1 + %3007 = OpMatrixTimesVector %v3float %466 %3004 + %3008 = OpDot %float %3006 %3007 + OpBranch %2979 + %2979 = OpLabel + %3009 = OpPhi %float %2988 %2981 %3008 %2980 + OpBranch %2971 + %2972 = OpLabel + %3010 = OpFSub %float %2961 %2793 + %3011 = OpFMul %float %float_7 %3010 + %3012 = OpFSub %float %2968 %2793 + %3013 = OpFDiv %float %3011 %3012 + %3014 = OpConvertFToS %int %3013 + %3015 = OpConvertSToF %float %3014 + %3016 = OpFSub %float %3013 %3015 + %3017 = OpAccessChain %_ptr_Function_float %552 %3014 + %3018 = OpLoad %float %3017 + %3019 = OpIAdd %int %3014 %int_1 + %3020 = OpAccessChain %_ptr_Function_float %552 %3019 + %3021 = OpLoad %float %3020 + %3022 = OpIAdd %int %3014 %int_2 + %3023 = OpAccessChain %_ptr_Function_float %552 %3022 + %3024 = OpLoad %float %3023 + %3025 = OpCompositeConstruct %v3float %3018 %3021 %3024 + %3026 = OpFMul %float %3016 %3016 + %3027 = OpCompositeConstruct %v3float %3026 %3016 %float_1 + %3028 = OpMatrixTimesVector %v3float %466 %3025 + %3029 = OpDot %float %3027 %3028 + OpBranch %2971 + %2971 = OpLabel + %3030 = OpPhi %float %3009 %2979 %3029 %2972 + OpBranch %2963 + %2964 = OpLabel + %3031 = OpFMul %float %2961 %float_3 + %3032 = OpExtInst %float %1 Log %float_9_99999975en05 + %3033 = OpFDiv %float %3032 %1091 + %3034 = OpFMul %float %float_3 %2792 + %3035 = OpFDiv %float %3034 %1091 + %3036 = OpFSub %float %3033 %3035 + %3037 = OpFAdd %float %3031 %3036 + OpBranch %2963 + %2963 = OpLabel + %3038 = OpPhi %float %3030 %2971 %3037 %2964 + %3039 = OpExtInst %float %1 Pow %float_10 %3038 + %3040 = OpCompositeInsert %v3float %3039 %2956 2 + %3041 = OpFSub %v3float %3040 %361 + %3042 = OpVectorTimesMatrix %v3float %3041 %602 + %3043 = OpFMul %v3float %3042 %519 + %3044 = OpExtInst %v3float %1 Pow %3043 %286 + %3045 = OpFMul %v3float %196 %3044 + %3046 = OpFAdd %v3float %195 %3045 + %3047 = OpFMul %v3float %197 %3044 + %3048 = OpFAdd %v3float %141 %3047 + %3049 = OpFDiv %v3float %141 %3048 + %3050 = OpFMul %v3float %3046 %3049 + %3051 = OpExtInst %v3float %1 Pow %3050 %287 + OpBranch %1336 + %1336 = OpLabel + %3052 = OpPhi %v3float %2201 %1342 %3051 %2963 + OpBranch %1330 + %1331 = OpLabel + %3053 = OpVectorTimesMatrix %v3float %1324 %573 + %3054 = OpVectorTimesMatrix %v3float %3053 %602 + %3055 = OpExtInst %v3float %1 FMax %263 %3054 + %3056 = OpFMul %v3float %3055 %275 + %3057 = OpExtInst %v3float %1 FMax %3055 %277 + %3058 = OpExtInst %v3float %1 Pow %3057 %279 + %3059 = OpFMul %v3float %3058 %281 + %3060 = OpFSub %v3float %3059 %283 + %3061 = OpExtInst %v3float %1 FMin %3056 %3060 + OpBranch %1330 + %1330 = OpLabel + %3062 = OpPhi %v3float %3052 %1336 %3061 %1331 + OpBranch %1326 + %1327 = OpLabel + %3063 = OpCompositeExtract %float %1324 0 + OpBranch %3064 + %3064 = OpLabel + OpLoopMerge %3065 %3066 None + OpBranch %3067 + %3067 = OpLabel + %3068 = OpFOrdLessThan %bool %3063 %float_0_00313066994 + OpSelectionMerge %3069 None + OpBranchConditional %3068 %3070 %3069 + %3070 = OpLabel + %3071 = OpFMul %float %3063 %float_12_9200001 + OpBranch %3065 + %3069 = OpLabel + %3072 = OpExtInst %float %1 Pow %3063 %float_0_416666657 + %3073 = OpFMul %float %3072 %float_1_05499995 + %3074 = OpFSub %float %3073 %float_0_0549999997 + OpBranch %3065 + %3066 = OpLabel + OpBranch %3064 + %3065 = OpLabel + %3075 = OpPhi %float %3071 %3070 %3074 %3069 + %3076 = OpCompositeExtract %float %1324 1 + OpBranch %3077 + %3077 = OpLabel + OpLoopMerge %3078 %3079 None + OpBranch %3080 + %3080 = OpLabel + %3081 = OpFOrdLessThan %bool %3076 %float_0_00313066994 + OpSelectionMerge %3082 None + OpBranchConditional %3081 %3083 %3082 + %3083 = OpLabel + %3084 = OpFMul %float %3076 %float_12_9200001 + OpBranch %3078 + %3082 = OpLabel + %3085 = OpExtInst %float %1 Pow %3076 %float_0_416666657 + %3086 = OpFMul %float %3085 %float_1_05499995 + %3087 = OpFSub %float %3086 %float_0_0549999997 + OpBranch %3078 + %3079 = OpLabel + OpBranch %3077 + %3078 = OpLabel + %3088 = OpPhi %float %3084 %3083 %3087 %3082 + %3089 = OpCompositeExtract %float %1324 2 + OpBranch %3090 + %3090 = OpLabel + OpLoopMerge %3091 %3092 None + OpBranch %3093 + %3093 = OpLabel + %3094 = OpFOrdLessThan %bool %3089 %float_0_00313066994 + OpSelectionMerge %3095 None + OpBranchConditional %3094 %3096 %3095 + %3096 = OpLabel + %3097 = OpFMul %float %3089 %float_12_9200001 + OpBranch %3091 + %3095 = OpLabel + %3098 = OpExtInst %float %1 Pow %3089 %float_0_416666657 + %3099 = OpFMul %float %3098 %float_1_05499995 + %3100 = OpFSub %float %3099 %float_0_0549999997 + OpBranch %3091 + %3092 = OpLabel + OpBranch %3090 + %3091 = OpLabel + %3101 = OpPhi %float %3097 %3096 %3100 %3095 + %3102 = OpCompositeConstruct %v3float %3075 %3088 %3101 + OpBranch %1326 + %1326 = OpLabel + %3103 = OpPhi %v3float %3062 %1330 %3102 %3091 + %3104 = OpFMul %v3float %3103 %522 + %3105 = OpVectorShuffle %v4float %135 %3104 4 5 6 3 + %3106 = OpCompositeInsert %v4float %float_0 %3105 3 + OpStore %out_var_SV_Target0 %3106 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag new file mode 100644 index 000000000..eba220ba4 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag @@ -0,0 +1,878 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 353 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %MainPixelShader "main" %gl_FragCoord %in_var_TEXCOORD6 %in_var_TEXCOORD7 %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_TEXCOORD0 %in_var_PRIMITIVE_ID %gl_FrontFacing %gl_FragDepth %out_var_SV_Target0 + OpExecutionMode %MainPixelShader OriginUpperLeft + OpExecutionMode %MainPixelShader DepthReplacing + OpExecutionMode %MainPixelShader DepthLess + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_PrimitiveDither "type.PrimitiveDither" + OpMemberName %type_PrimitiveDither 0 "PrimitiveDither_LODFactor" + OpName %PrimitiveDither "PrimitiveDither" + OpName %type_PrimitiveFade "type.PrimitiveFade" + OpMemberName %type_PrimitiveFade 0 "PrimitiveFade_FadeTimeScaleBias" + OpName %PrimitiveFade "PrimitiveFade" + OpName %type_Material "type.Material" + OpMemberName %type_Material 0 "Material_VectorExpressions" + OpMemberName %type_Material 1 "Material_ScalarExpressions" + OpName %Material "Material" + OpName %type_2d_image "type.2d.image" + OpName %Material_Texture2D_0 "Material_Texture2D_0" + OpName %type_sampler "type.sampler" + OpName %Material_Texture2D_0Sampler "Material_Texture2D_0Sampler" + OpName %Material_Texture2D_3 "Material_Texture2D_3" + OpName %Material_Texture2D_3Sampler "Material_Texture2D_3Sampler" + OpName %in_var_TEXCOORD6 "in.var.TEXCOORD6" + OpName %in_var_TEXCOORD7 "in.var.TEXCOORD7" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_PRIMITIVE_ID "in.var.PRIMITIVE_ID" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %MainPixelShader "MainPixelShader" + OpName %type_sampled_image "type.sampled.image" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_Position" + OpDecorateString %in_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %in_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorate %in_var_PRIMITIVE_ID Flat + OpDecorate %gl_FrontFacing BuiltIn FrontFacing + OpDecorateString %gl_FrontFacing UserSemantic "SV_IsFrontFace" + OpDecorate %gl_FrontFacing Flat + OpDecorate %gl_FragDepth BuiltIn FragDepth + OpDecorateString %gl_FragDepth UserSemantic "SV_DepthLessEqual" + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD6 Location 0 + OpDecorate %in_var_TEXCOORD7 Location 1 + OpDecorate %in_var_TEXCOORD10_centroid Location 2 + OpDecorate %in_var_TEXCOORD11_centroid Location 3 + OpDecorate %in_var_TEXCOORD0 Location 4 + OpDecorate %in_var_PRIMITIVE_ID Location 5 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %PrimitiveDither DescriptorSet 0 + OpDecorate %PrimitiveDither Binding 1 + OpDecorate %PrimitiveFade DescriptorSet 0 + OpDecorate %PrimitiveFade Binding 2 + OpDecorate %Material DescriptorSet 0 + OpDecorate %Material Binding 3 + OpDecorate %Material_Texture2D_0 DescriptorSet 0 + OpDecorate %Material_Texture2D_0 Binding 0 + OpDecorate %Material_Texture2D_0Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_0Sampler Binding 0 + OpDecorate %Material_Texture2D_3 DescriptorSet 0 + OpDecorate %Material_Texture2D_3 Binding 1 + OpDecorate %Material_Texture2D_3Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_3Sampler Binding 1 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpDecorate %type_View Block + OpMemberDecorate %type_PrimitiveDither 0 Offset 0 + OpDecorate %type_PrimitiveDither Block + OpMemberDecorate %type_PrimitiveFade 0 Offset 0 + OpDecorate %type_PrimitiveFade Block + OpDecorate %_arr_v4float_uint_9 ArrayStride 16 + OpDecorate %_arr_v4float_uint_3 ArrayStride 16 + OpMemberDecorate %type_Material 0 Offset 0 + OpMemberDecorate %type_Material 1 Offset 144 + OpDecorate %type_Material Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 +%float_0_00100000005 = OpConstant %float 0.00100000005 + %int_2 = OpConstant %int 2 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_0 = OpConstant %float 0 + %49 = OpConstantComposite %v2float %float_0 %float_0 + %float_1 = OpConstant %float 1 + %int_4 = OpConstant %int 4 + %int_11 = OpConstant %int 11 +%float_0_249500006 = OpConstant %float 0.249500006 + %54 = OpConstantComposite %v2float %float_0_249500006 %float_0_249500006 +%float_0_499992371 = OpConstant %float 0.499992371 + %56 = OpConstantComposite %v2float %float_0_499992371 %float_0_499992371 + %int_32 = OpConstant %int 32 + %int_53 = OpConstant %int 53 + %int_57 = OpConstant %int 57 + %int_80 = OpConstant %int 80 + %int_82 = OpConstant %int 82 + %int_98 = OpConstant %int 98 + %uint_1 = OpConstant %uint 1 +%mat3v3float = OpTypeMatrix %v3float 3 + %float_2 = OpConstant %float 2 + %float_n1 = OpConstant %float -1 + %67 = OpConstantComposite %v2float %float_n1 %float_n1 + %bool = OpTypeBool + %float_n0_5 = OpConstant %float -0.5 + %70 = OpConstantComposite %v3float %float_0 %float_0 %float_1 +%float_0_333299994 = OpConstant %float 0.333299994 + %uint_5 = OpConstant %uint 5 +%float_347_834503 = OpConstant %float 347.834503 +%float_3343_28369 = OpConstant %float 3343.28369 + %75 = OpConstantComposite %v2float %float_347_834503 %float_3343_28369 + %float_1000 = OpConstant %float 1000 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_PrimitiveDither = OpTypeStruct %float +%_ptr_Uniform_type_PrimitiveDither = OpTypePointer Uniform %type_PrimitiveDither +%type_PrimitiveFade = OpTypeStruct %v2float +%_ptr_Uniform_type_PrimitiveFade = OpTypePointer Uniform %type_PrimitiveFade + %uint_9 = OpConstant %uint 9 +%_arr_v4float_uint_9 = OpTypeArray %v4float %uint_9 + %uint_3 = OpConstant %uint 3 +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%type_Material = OpTypeStruct %_arr_v4float_uint_9 %_arr_v4float_uint_3 +%_ptr_Uniform_type_Material = OpTypePointer Uniform %type_Material +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%_ptr_Input__arr_v4float_uint_1 = OpTypePointer Input %_arr_v4float_uint_1 +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Input_bool = OpTypePointer Input %bool +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %93 = OpTypeFunction %void +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%type_sampled_image = OpTypeSampledImage %type_2d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform +%PrimitiveDither = OpVariable %_ptr_Uniform_type_PrimitiveDither Uniform +%PrimitiveFade = OpVariable %_ptr_Uniform_type_PrimitiveFade Uniform + %Material = OpVariable %_ptr_Uniform_type_Material Uniform +%Material_Texture2D_0 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_0Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%Material_Texture2D_3 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_3Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD6 = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD7 = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input__arr_v4float_uint_1 Input +%in_var_PRIMITIVE_ID = OpVariable %_ptr_Input_uint Input +%gl_FrontFacing = OpVariable %_ptr_Input_bool Input +%gl_FragDepth = OpVariable %_ptr_Output_float Output +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %98 = OpUndef %float + %99 = OpConstantNull %v2float +%float_0_015625 = OpConstant %float 0.015625 + %101 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 +%float_0_166666672 = OpConstant %float 0.166666672 + %103 = OpUndef %float + %104 = OpConstantNull %v3float +%MainPixelShader = OpFunction %void None %93 + %105 = OpLabel + %106 = OpLoad %v4float %gl_FragCoord + %107 = OpLoad %v4float %in_var_TEXCOORD6 + %108 = OpLoad %v4float %in_var_TEXCOORD7 + %109 = OpLoad %v4float %in_var_TEXCOORD10_centroid + %110 = OpLoad %v4float %in_var_TEXCOORD11_centroid + %111 = OpLoad %_arr_v4float_uint_1 %in_var_TEXCOORD0 + %112 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_4 + %113 = OpLoad %mat4v4float %112 + %114 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_11 + %115 = OpLoad %mat4v4float %114 + %116 = OpAccessChain %_ptr_Uniform_v3float %View %int_32 + %117 = OpLoad %v3float %116 + %118 = OpAccessChain %_ptr_Uniform_v4float %View %int_53 + %119 = OpLoad %v4float %118 + %120 = OpAccessChain %_ptr_Uniform_v4float %View %int_57 + %121 = OpLoad %v4float %120 + %122 = OpAccessChain %_ptr_Uniform_float %View %int_80 + %123 = OpLoad %float %122 + %124 = OpCompositeExtract %v4float %111 0 + %125 = OpVectorShuffle %v2float %99 %124 2 3 + %126 = OpVectorShuffle %v3float %109 %109 0 1 2 + %127 = OpVectorShuffle %v3float %110 %110 0 1 2 + %128 = OpExtInst %v3float %1 Cross %127 %126 + %129 = OpCompositeExtract %float %110 3 + %130 = OpCompositeConstruct %v3float %129 %129 %129 + %131 = OpFMul %v3float %128 %130 + %132 = OpCompositeConstruct %mat3v3float %126 %131 %127 + %133 = OpVectorShuffle %v2float %106 %106 0 1 + %134 = OpVectorShuffle %v2float %121 %121 0 1 + %135 = OpFSub %v2float %133 %134 + %136 = OpCompositeExtract %float %106 2 + %137 = OpCompositeConstruct %v4float %103 %103 %136 %float_1 + %138 = OpCompositeExtract %float %106 3 + %139 = OpCompositeConstruct %v4float %138 %138 %138 %138 + %140 = OpFMul %v4float %137 %139 + %141 = OpCompositeExtract %float %106 0 + %142 = OpCompositeExtract %float %106 1 + %143 = OpCompositeConstruct %v4float %141 %142 %136 %float_1 + %144 = OpMatrixTimesVector %v4float %115 %143 + %145 = OpVectorShuffle %v3float %144 %144 0 1 2 + %146 = OpCompositeExtract %float %144 3 + %147 = OpCompositeConstruct %v3float %146 %146 %146 + %148 = OpFDiv %v3float %145 %147 + %149 = OpFSub %v3float %148 %117 + %150 = OpFNegate %v3float %148 + %151 = OpExtInst %v3float %1 Normalize %150 + %152 = OpVectorTimesMatrix %v3float %151 %132 + %153 = OpVectorShuffle %v2float %152 %152 0 1 + %154 = OpFMul %v2float %153 %67 + %155 = OpCompositeExtract %float %152 2 + %156 = OpCompositeConstruct %v2float %155 %155 + %157 = OpFDiv %v2float %154 %156 + %158 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_0 + %159 = OpLoad %float %158 + %160 = OpCompositeConstruct %v2float %159 %159 + %161 = OpFMul %v2float %160 %157 + %162 = OpDot %float %151 %127 + %163 = OpExtInst %float %1 FAbs %162 + %164 = OpExtInst %float %1 FMax %163 %float_0 + %165 = OpExtInst %float %1 FMin %164 %float_1 + %166 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_1 + %167 = OpLoad %float %166 + %168 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_2 + %169 = OpLoad %float %168 + %170 = OpExtInst %float %1 FMix %167 %169 %165 + %171 = OpExtInst %float %1 Floor %170 + %172 = OpFDiv %float %float_1 %170 + %173 = OpCompositeConstruct %v2float %172 %172 + %174 = OpFMul %v2float %161 %173 + %175 = OpDPdx %v2float %125 + %176 = OpDPdy %v2float %125 + %177 = OpLoad %type_2d_image %Material_Texture2D_0 + %178 = OpLoad %type_sampler %Material_Texture2D_0Sampler + OpBranch %179 + %179 = OpLabel + %180 = OpPhi %float %float_1 %105 %181 %182 + %183 = OpPhi %v2float %49 %105 %184 %182 + %185 = OpPhi %int %int_0 %105 %186 %182 + %187 = OpPhi %float %float_1 %105 %188 %182 + %189 = OpPhi %float %float_1 %105 %180 %182 + %190 = OpConvertSToF %float %185 + %191 = OpFAdd %float %171 %float_2 + %192 = OpFOrdLessThan %bool %190 %191 + OpLoopMerge %193 %182 None + OpBranchConditional %192 %194 %193 + %194 = OpLabel + %195 = OpFAdd %v2float %125 %183 + %196 = OpSampledImage %type_sampled_image %177 %178 + %197 = OpImageSampleExplicitLod %v4float %196 %195 Grad %175 %176 + %188 = OpCompositeExtract %float %197 1 + %198 = OpFOrdLessThan %bool %180 %188 + OpSelectionMerge %182 None + OpBranchConditional %198 %199 %182 + %199 = OpLabel + %200 = OpFSub %float %189 %187 + %201 = OpFSub %float %188 %180 + %202 = OpFAdd %float %200 %201 + %203 = OpFDiv %float %201 %202 + %204 = OpFMul %float %189 %203 + %205 = OpFSub %float %float_1 %203 + %206 = OpFMul %float %180 %205 + %207 = OpFAdd %float %204 %206 + %208 = OpCompositeConstruct %v2float %203 %203 + %209 = OpFMul %v2float %208 %174 + %210 = OpFSub %v2float %183 %209 + OpBranch %193 + %182 = OpLabel + %181 = OpFSub %float %180 %172 + %184 = OpFAdd %v2float %183 %174 + %186 = OpIAdd %int %185 %int_1 + OpBranch %179 + %193 = OpLabel + %211 = OpPhi %float %98 %179 %207 %199 + %212 = OpPhi %v2float %183 %179 %210 %199 + %213 = OpVectorShuffle %v2float %212 %104 0 1 + %214 = OpFAdd %v2float %125 %213 + %215 = OpAccessChain %_ptr_Uniform_float %View %int_82 + %216 = OpLoad %float %215 + %217 = OpSampledImage %type_sampled_image %177 %178 + %218 = OpImageSampleImplicitLod %v4float %217 %214 Bias %216 + %219 = OpCompositeExtract %float %218 0 + %220 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_2 %int_1 + %221 = OpLoad %float %220 + %222 = OpFMul %float %219 %221 + %223 = OpFSub %float %float_1 %222 + %224 = OpExtInst %float %1 FMax %223 %float_0 + %225 = OpExtInst %float %1 FMin %224 %float_1 + %226 = OpAccessChain %_ptr_Uniform_float %View %int_98 %int_0 + %227 = OpLoad %float %226 + %228 = OpCompositeConstruct %v2float %227 %227 + %229 = OpFAdd %v2float %135 %228 + %230 = OpCompositeExtract %float %229 0 + %231 = OpConvertFToU %uint %230 + %232 = OpCompositeExtract %float %229 1 + %233 = OpConvertFToU %uint %232 + %234 = OpIMul %uint %uint_2 %233 + %235 = OpIAdd %uint %231 %234 + %236 = OpUMod %uint %235 %uint_5 + %237 = OpConvertUToF %float %236 + %238 = OpFMul %v2float %135 %101 + %239 = OpLoad %type_2d_image %Material_Texture2D_3 + %240 = OpLoad %type_sampler %Material_Texture2D_3Sampler + %241 = OpSampledImage %type_sampled_image %239 %240 + %242 = OpImageSampleImplicitLod %v4float %241 %238 Bias %216 + %243 = OpCompositeExtract %float %242 0 + %244 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_2 %int_2 + %245 = OpLoad %float %244 + %246 = OpFMul %float %243 %245 + %247 = OpFAdd %float %237 %246 + %248 = OpFMul %float %247 %float_0_166666672 + %249 = OpFAdd %float %225 %248 + %250 = OpFAdd %float %249 %float_n0_5 + %251 = OpCompositeExtract %float %218 2 + %252 = OpFAdd %float %251 %250 + %253 = OpSampledImage %type_sampled_image %239 %240 + %254 = OpImageSampleImplicitLod %v4float %253 %238 Bias %216 + %255 = OpCompositeExtract %float %254 0 + %256 = OpFAdd %float %237 %255 + %257 = OpFMul %float %256 %float_0_166666672 + %258 = OpAccessChain %_ptr_Uniform_float %PrimitiveFade %int_0 %int_0 + %259 = OpLoad %float %258 + %260 = OpFMul %float %123 %259 + %261 = OpAccessChain %_ptr_Uniform_float %PrimitiveFade %int_0 %int_1 + %262 = OpLoad %float %261 + %263 = OpFAdd %float %260 %262 + %264 = OpExtInst %float %1 FClamp %263 %float_0 %float_1 + %265 = OpFAdd %float %264 %257 + %266 = OpFAdd %float %265 %float_n0_5 + %267 = OpFMul %float %252 %266 + %268 = OpFSub %float %float_1 %211 + %269 = OpFMul %float %268 %159 + %270 = OpCompositeExtract %float %212 0 + %271 = OpCompositeExtract %float %212 1 + %272 = OpCompositeConstruct %v3float %270 %271 %269 + %273 = OpDot %float %272 %272 + %274 = OpExtInst %float %1 Sqrt %273 + %275 = OpDPdx %v2float %125 + %276 = OpExtInst %v2float %1 FAbs %275 + %277 = OpDot %float %276 %276 + %278 = OpExtInst %float %1 Sqrt %277 + %279 = OpDPdx %v3float %149 + %280 = OpDot %float %279 %279 + %281 = OpExtInst %float %1 Sqrt %280 + %282 = OpFDiv %float %278 %281 + %283 = OpDPdy %v2float %125 + %284 = OpExtInst %v2float %1 FAbs %283 + %285 = OpDot %float %284 %284 + %286 = OpExtInst %float %1 Sqrt %285 + %287 = OpDPdy %v3float %149 + %288 = OpDot %float %287 %287 + %289 = OpExtInst %float %1 Sqrt %288 + %290 = OpFDiv %float %286 %289 + %291 = OpExtInst %float %1 FMax %282 %290 + %292 = OpCompositeExtract %v4float %113 0 + %293 = OpVectorShuffle %v3float %292 %292 0 1 2 + %294 = OpCompositeExtract %v4float %113 1 + %295 = OpVectorShuffle %v3float %294 %294 0 1 2 + %296 = OpCompositeExtract %v4float %113 2 + %297 = OpVectorShuffle %v3float %296 %296 0 1 2 + %298 = OpCompositeConstruct %mat3v3float %293 %295 %297 + %299 = OpMatrixTimesVector %v3float %298 %70 + %300 = OpDot %float %299 %151 + %301 = OpExtInst %float %1 FAbs %300 + %302 = OpFDiv %float %291 %301 + %303 = OpFDiv %float %274 %302 + %304 = OpAccessChain %_ptr_Uniform_float %PrimitiveDither %int_0 + %305 = OpLoad %float %304 + %306 = OpFOrdNotEqual %bool %305 %float_0 + OpSelectionMerge %307 None + OpBranchConditional %306 %308 %307 + %308 = OpLabel + %309 = OpExtInst %float %1 FAbs %305 + %310 = OpFOrdGreaterThan %bool %309 %float_0_00100000005 + OpSelectionMerge %311 None + OpBranchConditional %310 %312 %311 + %312 = OpLabel + %313 = OpExtInst %v2float %1 Floor %133 + %314 = OpDot %float %313 %75 + %315 = OpExtInst %float %1 Cos %314 + %316 = OpFMul %float %315 %float_1000 + %317 = OpExtInst %float %1 Fract %316 + %318 = OpFOrdLessThan %bool %305 %float_0 + %319 = OpFAdd %float %305 %float_1 + %320 = OpFOrdGreaterThan %bool %319 %317 + %321 = OpFOrdLessThan %bool %305 %317 + %322 = OpSelect %bool %318 %320 %321 + %323 = OpSelect %float %322 %float_1 %float_0 + %324 = OpFSub %float %323 %float_0_00100000005 + %325 = OpFOrdLessThan %bool %324 %float_0 + OpSelectionMerge %326 None + OpBranchConditional %325 %327 %326 + %327 = OpLabel + OpKill + %326 = OpLabel + OpBranch %311 + %311 = OpLabel + OpBranch %307 + %307 = OpLabel + %328 = OpFSub %float %267 %float_0_333299994 + %329 = OpFOrdLessThan %bool %328 %float_0 + OpSelectionMerge %330 None + OpBranchConditional %329 %331 %330 + %331 = OpLabel + OpKill + %330 = OpLabel + %332 = OpCompositeExtract %float %140 2 + %333 = OpCompositeExtract %float %140 3 + %334 = OpFAdd %float %333 %303 + %335 = OpFDiv %float %332 %334 + %336 = OpExtInst %float %1 FMin %335 %136 + %337 = OpVectorShuffle %v2float %107 %107 0 1 + %338 = OpCompositeExtract %float %107 3 + %339 = OpCompositeConstruct %v2float %338 %338 + %340 = OpFDiv %v2float %337 %339 + %341 = OpVectorShuffle %v2float %119 %119 0 1 + %342 = OpFSub %v2float %340 %341 + %343 = OpVectorShuffle %v2float %108 %108 0 1 + %344 = OpCompositeExtract %float %108 3 + %345 = OpCompositeConstruct %v2float %344 %344 + %346 = OpFDiv %v2float %343 %345 + %347 = OpVectorShuffle %v2float %119 %119 2 3 + %348 = OpFSub %v2float %346 %347 + %349 = OpFSub %v2float %342 %348 + %350 = OpFMul %v2float %349 %54 + %351 = OpFAdd %v2float %350 %56 + %352 = OpVectorShuffle %v4float %351 %49 0 1 2 3 + OpStore %gl_FragDepth %336 + OpStore %out_var_SV_Target0 %352 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag new file mode 100644 index 000000000..097eb6354 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag @@ -0,0 +1,1230 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 271 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %MainPS "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_PRIMITIVE_ID %in_var_TEXCOORD7 %gl_FragCoord %gl_FrontFacing %gl_SampleMask %out_var_SV_Target0 %gl_SampleMask_0 + OpExecutionMode %MainPS OriginUpperLeft + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_3d_image "type.3d.image" + OpName %type_sampler "type.sampler" + OpName %View_SharedBilinearClampedSampler "View_SharedBilinearClampedSampler" + OpName %type_StructuredBuffer_v4float "type.StructuredBuffer.v4float" + OpName %View_PrimitiveSceneData "View_PrimitiveSceneData" + OpName %type_TranslucentBasePass "type.TranslucentBasePass" + OpMemberName %type_TranslucentBasePass 0 "TranslucentBasePass_Shared_Forward_NumLocalLights" + OpMemberName %type_TranslucentBasePass 1 "TranslucentBasePass_Shared_Forward_NumReflectionCaptures" + OpMemberName %type_TranslucentBasePass 2 "TranslucentBasePass_Shared_Forward_HasDirectionalLight" + OpMemberName %type_TranslucentBasePass 3 "TranslucentBasePass_Shared_Forward_NumGridCells" + OpMemberName %type_TranslucentBasePass 4 "TranslucentBasePass_Shared_Forward_CulledGridSize" + OpMemberName %type_TranslucentBasePass 5 "TranslucentBasePass_Shared_Forward_MaxCulledLightsPerCell" + OpMemberName %type_TranslucentBasePass 6 "TranslucentBasePass_Shared_Forward_LightGridPixelSizeShift" + OpMemberName %type_TranslucentBasePass 7 "PrePadding_TranslucentBasePass_Shared_Forward_36" + OpMemberName %type_TranslucentBasePass 8 "PrePadding_TranslucentBasePass_Shared_Forward_40" + OpMemberName %type_TranslucentBasePass 9 "PrePadding_TranslucentBasePass_Shared_Forward_44" + OpMemberName %type_TranslucentBasePass 10 "TranslucentBasePass_Shared_Forward_LightGridZParams" + OpMemberName %type_TranslucentBasePass 11 "PrePadding_TranslucentBasePass_Shared_Forward_60" + OpMemberName %type_TranslucentBasePass 12 "TranslucentBasePass_Shared_Forward_DirectionalLightDirection" + OpMemberName %type_TranslucentBasePass 13 "PrePadding_TranslucentBasePass_Shared_Forward_76" + OpMemberName %type_TranslucentBasePass 14 "TranslucentBasePass_Shared_Forward_DirectionalLightColor" + OpMemberName %type_TranslucentBasePass 15 "TranslucentBasePass_Shared_Forward_DirectionalLightVolumetricScatteringIntensity" + OpMemberName %type_TranslucentBasePass 16 "TranslucentBasePass_Shared_Forward_DirectionalLightShadowMapChannelMask" + OpMemberName %type_TranslucentBasePass 17 "PrePadding_TranslucentBasePass_Shared_Forward_100" + OpMemberName %type_TranslucentBasePass 18 "TranslucentBasePass_Shared_Forward_DirectionalLightDistanceFadeMAD" + OpMemberName %type_TranslucentBasePass 19 "TranslucentBasePass_Shared_Forward_NumDirectionalLightCascades" + OpMemberName %type_TranslucentBasePass 20 "PrePadding_TranslucentBasePass_Shared_Forward_116" + OpMemberName %type_TranslucentBasePass 21 "PrePadding_TranslucentBasePass_Shared_Forward_120" + OpMemberName %type_TranslucentBasePass 22 "PrePadding_TranslucentBasePass_Shared_Forward_124" + OpMemberName %type_TranslucentBasePass 23 "TranslucentBasePass_Shared_Forward_CascadeEndDepths" + OpMemberName %type_TranslucentBasePass 24 "TranslucentBasePass_Shared_Forward_DirectionalLightWorldToShadowMatrix" + OpMemberName %type_TranslucentBasePass 25 "TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapMinMax" + OpMemberName %type_TranslucentBasePass 26 "TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapAtlasBufferSize" + OpMemberName %type_TranslucentBasePass 27 "TranslucentBasePass_Shared_Forward_DirectionalLightDepthBias" + OpMemberName %type_TranslucentBasePass 28 "TranslucentBasePass_Shared_Forward_DirectionalLightUseStaticShadowing" + OpMemberName %type_TranslucentBasePass 29 "PrePadding_TranslucentBasePass_Shared_Forward_488" + OpMemberName %type_TranslucentBasePass 30 "PrePadding_TranslucentBasePass_Shared_Forward_492" + OpMemberName %type_TranslucentBasePass 31 "TranslucentBasePass_Shared_Forward_DirectionalLightStaticShadowBufferSize" + OpMemberName %type_TranslucentBasePass 32 "TranslucentBasePass_Shared_Forward_DirectionalLightWorldToStaticShadow" + OpMemberName %type_TranslucentBasePass 33 "PrePadding_TranslucentBasePass_Shared_ForwardISR_576" + OpMemberName %type_TranslucentBasePass 34 "PrePadding_TranslucentBasePass_Shared_ForwardISR_580" + OpMemberName %type_TranslucentBasePass 35 "PrePadding_TranslucentBasePass_Shared_ForwardISR_584" + OpMemberName %type_TranslucentBasePass 36 "PrePadding_TranslucentBasePass_Shared_ForwardISR_588" + OpMemberName %type_TranslucentBasePass 37 "PrePadding_TranslucentBasePass_Shared_ForwardISR_592" + OpMemberName %type_TranslucentBasePass 38 "PrePadding_TranslucentBasePass_Shared_ForwardISR_596" + OpMemberName %type_TranslucentBasePass 39 "PrePadding_TranslucentBasePass_Shared_ForwardISR_600" + OpMemberName %type_TranslucentBasePass 40 "PrePadding_TranslucentBasePass_Shared_ForwardISR_604" + OpMemberName %type_TranslucentBasePass 41 "PrePadding_TranslucentBasePass_Shared_ForwardISR_608" + OpMemberName %type_TranslucentBasePass 42 "PrePadding_TranslucentBasePass_Shared_ForwardISR_612" + OpMemberName %type_TranslucentBasePass 43 "PrePadding_TranslucentBasePass_Shared_ForwardISR_616" + OpMemberName %type_TranslucentBasePass 44 "PrePadding_TranslucentBasePass_Shared_ForwardISR_620" + OpMemberName %type_TranslucentBasePass 45 "PrePadding_TranslucentBasePass_Shared_ForwardISR_624" + OpMemberName %type_TranslucentBasePass 46 "PrePadding_TranslucentBasePass_Shared_ForwardISR_628" + OpMemberName %type_TranslucentBasePass 47 "PrePadding_TranslucentBasePass_Shared_ForwardISR_632" + OpMemberName %type_TranslucentBasePass 48 "PrePadding_TranslucentBasePass_Shared_ForwardISR_636" + OpMemberName %type_TranslucentBasePass 49 "TranslucentBasePass_Shared_ForwardISR_NumLocalLights" + OpMemberName %type_TranslucentBasePass 50 "TranslucentBasePass_Shared_ForwardISR_NumReflectionCaptures" + OpMemberName %type_TranslucentBasePass 51 "TranslucentBasePass_Shared_ForwardISR_HasDirectionalLight" + OpMemberName %type_TranslucentBasePass 52 "TranslucentBasePass_Shared_ForwardISR_NumGridCells" + OpMemberName %type_TranslucentBasePass 53 "TranslucentBasePass_Shared_ForwardISR_CulledGridSize" + OpMemberName %type_TranslucentBasePass 54 "TranslucentBasePass_Shared_ForwardISR_MaxCulledLightsPerCell" + OpMemberName %type_TranslucentBasePass 55 "TranslucentBasePass_Shared_ForwardISR_LightGridPixelSizeShift" + OpMemberName %type_TranslucentBasePass 56 "PrePadding_TranslucentBasePass_Shared_ForwardISR_676" + OpMemberName %type_TranslucentBasePass 57 "PrePadding_TranslucentBasePass_Shared_ForwardISR_680" + OpMemberName %type_TranslucentBasePass 58 "PrePadding_TranslucentBasePass_Shared_ForwardISR_684" + OpMemberName %type_TranslucentBasePass 59 "TranslucentBasePass_Shared_ForwardISR_LightGridZParams" + OpMemberName %type_TranslucentBasePass 60 "PrePadding_TranslucentBasePass_Shared_ForwardISR_700" + OpMemberName %type_TranslucentBasePass 61 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightDirection" + OpMemberName %type_TranslucentBasePass 62 "PrePadding_TranslucentBasePass_Shared_ForwardISR_716" + OpMemberName %type_TranslucentBasePass 63 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightColor" + OpMemberName %type_TranslucentBasePass 64 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightVolumetricScatteringIntensity" + OpMemberName %type_TranslucentBasePass 65 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowMapChannelMask" + OpMemberName %type_TranslucentBasePass 66 "PrePadding_TranslucentBasePass_Shared_ForwardISR_740" + OpMemberName %type_TranslucentBasePass 67 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightDistanceFadeMAD" + OpMemberName %type_TranslucentBasePass 68 "TranslucentBasePass_Shared_ForwardISR_NumDirectionalLightCascades" + OpMemberName %type_TranslucentBasePass 69 "PrePadding_TranslucentBasePass_Shared_ForwardISR_756" + OpMemberName %type_TranslucentBasePass 70 "PrePadding_TranslucentBasePass_Shared_ForwardISR_760" + OpMemberName %type_TranslucentBasePass 71 "PrePadding_TranslucentBasePass_Shared_ForwardISR_764" + OpMemberName %type_TranslucentBasePass 72 "TranslucentBasePass_Shared_ForwardISR_CascadeEndDepths" + OpMemberName %type_TranslucentBasePass 73 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToShadowMatrix" + OpMemberName %type_TranslucentBasePass 74 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapMinMax" + OpMemberName %type_TranslucentBasePass 75 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapAtlasBufferSize" + OpMemberName %type_TranslucentBasePass 76 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightDepthBias" + OpMemberName %type_TranslucentBasePass 77 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightUseStaticShadowing" + OpMemberName %type_TranslucentBasePass 78 "PrePadding_TranslucentBasePass_Shared_ForwardISR_1128" + OpMemberName %type_TranslucentBasePass 79 "PrePadding_TranslucentBasePass_Shared_ForwardISR_1132" + OpMemberName %type_TranslucentBasePass 80 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightStaticShadowBufferSize" + OpMemberName %type_TranslucentBasePass 81 "TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToStaticShadow" + OpMemberName %type_TranslucentBasePass 82 "PrePadding_TranslucentBasePass_Shared_Reflection_1216" + OpMemberName %type_TranslucentBasePass 83 "PrePadding_TranslucentBasePass_Shared_Reflection_1220" + OpMemberName %type_TranslucentBasePass 84 "PrePadding_TranslucentBasePass_Shared_Reflection_1224" + OpMemberName %type_TranslucentBasePass 85 "PrePadding_TranslucentBasePass_Shared_Reflection_1228" + OpMemberName %type_TranslucentBasePass 86 "PrePadding_TranslucentBasePass_Shared_Reflection_1232" + OpMemberName %type_TranslucentBasePass 87 "PrePadding_TranslucentBasePass_Shared_Reflection_1236" + OpMemberName %type_TranslucentBasePass 88 "PrePadding_TranslucentBasePass_Shared_Reflection_1240" + OpMemberName %type_TranslucentBasePass 89 "PrePadding_TranslucentBasePass_Shared_Reflection_1244" + OpMemberName %type_TranslucentBasePass 90 "PrePadding_TranslucentBasePass_Shared_Reflection_1248" + OpMemberName %type_TranslucentBasePass 91 "PrePadding_TranslucentBasePass_Shared_Reflection_1252" + OpMemberName %type_TranslucentBasePass 92 "PrePadding_TranslucentBasePass_Shared_Reflection_1256" + OpMemberName %type_TranslucentBasePass 93 "PrePadding_TranslucentBasePass_Shared_Reflection_1260" + OpMemberName %type_TranslucentBasePass 94 "PrePadding_TranslucentBasePass_Shared_Reflection_1264" + OpMemberName %type_TranslucentBasePass 95 "PrePadding_TranslucentBasePass_Shared_Reflection_1268" + OpMemberName %type_TranslucentBasePass 96 "PrePadding_TranslucentBasePass_Shared_Reflection_1272" + OpMemberName %type_TranslucentBasePass 97 "PrePadding_TranslucentBasePass_Shared_Reflection_1276" + OpMemberName %type_TranslucentBasePass 98 "TranslucentBasePass_Shared_Reflection_SkyLightParameters" + OpMemberName %type_TranslucentBasePass 99 "TranslucentBasePass_Shared_Reflection_SkyLightCubemapBrightness" + OpMemberName %type_TranslucentBasePass 100 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1300" + OpMemberName %type_TranslucentBasePass 101 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1304" + OpMemberName %type_TranslucentBasePass 102 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1308" + OpMemberName %type_TranslucentBasePass 103 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1312" + OpMemberName %type_TranslucentBasePass 104 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1316" + OpMemberName %type_TranslucentBasePass 105 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1320" + OpMemberName %type_TranslucentBasePass 106 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1324" + OpMemberName %type_TranslucentBasePass 107 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1328" + OpMemberName %type_TranslucentBasePass 108 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1332" + OpMemberName %type_TranslucentBasePass 109 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1336" + OpMemberName %type_TranslucentBasePass 110 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1340" + OpMemberName %type_TranslucentBasePass 111 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1344" + OpMemberName %type_TranslucentBasePass 112 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1348" + OpMemberName %type_TranslucentBasePass 113 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1352" + OpMemberName %type_TranslucentBasePass 114 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1356" + OpMemberName %type_TranslucentBasePass 115 "TranslucentBasePass_Shared_PlanarReflection_ReflectionPlane" + OpMemberName %type_TranslucentBasePass 116 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionOrigin" + OpMemberName %type_TranslucentBasePass 117 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionXAxis" + OpMemberName %type_TranslucentBasePass 118 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionYAxis" + OpMemberName %type_TranslucentBasePass 119 "TranslucentBasePass_Shared_PlanarReflection_InverseTransposeMirrorMatrix" + OpMemberName %type_TranslucentBasePass 120 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters" + OpMemberName %type_TranslucentBasePass 121 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1484" + OpMemberName %type_TranslucentBasePass 122 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters2" + OpMemberName %type_TranslucentBasePass 123 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1496" + OpMemberName %type_TranslucentBasePass 124 "PrePadding_TranslucentBasePass_Shared_PlanarReflection_1500" + OpMemberName %type_TranslucentBasePass 125 "TranslucentBasePass_Shared_PlanarReflection_ProjectionWithExtraFOV" + OpMemberName %type_TranslucentBasePass 126 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenScaleBias" + OpMemberName %type_TranslucentBasePass 127 "TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenBound" + OpMemberName %type_TranslucentBasePass 128 "TranslucentBasePass_Shared_PlanarReflection_bIsStereo" + OpMemberName %type_TranslucentBasePass 129 "PrePadding_TranslucentBasePass_Shared_Fog_1676" + OpMemberName %type_TranslucentBasePass 130 "PrePadding_TranslucentBasePass_Shared_Fog_1680" + OpMemberName %type_TranslucentBasePass 131 "PrePadding_TranslucentBasePass_Shared_Fog_1684" + OpMemberName %type_TranslucentBasePass 132 "PrePadding_TranslucentBasePass_Shared_Fog_1688" + OpMemberName %type_TranslucentBasePass 133 "PrePadding_TranslucentBasePass_Shared_Fog_1692" + OpMemberName %type_TranslucentBasePass 134 "TranslucentBasePass_Shared_Fog_ExponentialFogParameters" + OpMemberName %type_TranslucentBasePass 135 "TranslucentBasePass_Shared_Fog_ExponentialFogParameters2" + OpMemberName %type_TranslucentBasePass 136 "TranslucentBasePass_Shared_Fog_ExponentialFogColorParameter" + OpMemberName %type_TranslucentBasePass 137 "TranslucentBasePass_Shared_Fog_ExponentialFogParameters3" + OpMemberName %type_TranslucentBasePass 138 "TranslucentBasePass_Shared_Fog_InscatteringLightDirection" + OpMemberName %type_TranslucentBasePass 139 "TranslucentBasePass_Shared_Fog_DirectionalInscatteringColor" + OpMemberName %type_TranslucentBasePass 140 "TranslucentBasePass_Shared_Fog_SinCosInscatteringColorCubemapRotation" + OpMemberName %type_TranslucentBasePass 141 "PrePadding_TranslucentBasePass_Shared_Fog_1800" + OpMemberName %type_TranslucentBasePass 142 "PrePadding_TranslucentBasePass_Shared_Fog_1804" + OpMemberName %type_TranslucentBasePass 143 "TranslucentBasePass_Shared_Fog_FogInscatteringTextureParameters" + OpMemberName %type_TranslucentBasePass 144 "TranslucentBasePass_Shared_Fog_ApplyVolumetricFog" + OpMemberName %type_TranslucentBasePass 145 "PrePadding_TranslucentBasePass_1824" + OpMemberName %type_TranslucentBasePass 146 "PrePadding_TranslucentBasePass_1828" + OpMemberName %type_TranslucentBasePass 147 "PrePadding_TranslucentBasePass_1832" + OpMemberName %type_TranslucentBasePass 148 "PrePadding_TranslucentBasePass_1836" + OpMemberName %type_TranslucentBasePass 149 "PrePadding_TranslucentBasePass_1840" + OpMemberName %type_TranslucentBasePass 150 "PrePadding_TranslucentBasePass_1844" + OpMemberName %type_TranslucentBasePass 151 "PrePadding_TranslucentBasePass_1848" + OpMemberName %type_TranslucentBasePass 152 "PrePadding_TranslucentBasePass_1852" + OpMemberName %type_TranslucentBasePass 153 "PrePadding_TranslucentBasePass_1856" + OpMemberName %type_TranslucentBasePass 154 "PrePadding_TranslucentBasePass_1860" + OpMemberName %type_TranslucentBasePass 155 "PrePadding_TranslucentBasePass_1864" + OpMemberName %type_TranslucentBasePass 156 "PrePadding_TranslucentBasePass_1868" + OpMemberName %type_TranslucentBasePass 157 "PrePadding_TranslucentBasePass_1872" + OpMemberName %type_TranslucentBasePass 158 "PrePadding_TranslucentBasePass_1876" + OpMemberName %type_TranslucentBasePass 159 "PrePadding_TranslucentBasePass_1880" + OpMemberName %type_TranslucentBasePass 160 "PrePadding_TranslucentBasePass_1884" + OpMemberName %type_TranslucentBasePass 161 "PrePadding_TranslucentBasePass_1888" + OpMemberName %type_TranslucentBasePass 162 "PrePadding_TranslucentBasePass_1892" + OpMemberName %type_TranslucentBasePass 163 "PrePadding_TranslucentBasePass_1896" + OpMemberName %type_TranslucentBasePass 164 "PrePadding_TranslucentBasePass_1900" + OpMemberName %type_TranslucentBasePass 165 "PrePadding_TranslucentBasePass_1904" + OpMemberName %type_TranslucentBasePass 166 "PrePadding_TranslucentBasePass_1908" + OpMemberName %type_TranslucentBasePass 167 "PrePadding_TranslucentBasePass_1912" + OpMemberName %type_TranslucentBasePass 168 "PrePadding_TranslucentBasePass_1916" + OpMemberName %type_TranslucentBasePass 169 "PrePadding_TranslucentBasePass_1920" + OpMemberName %type_TranslucentBasePass 170 "PrePadding_TranslucentBasePass_1924" + OpMemberName %type_TranslucentBasePass 171 "PrePadding_TranslucentBasePass_1928" + OpMemberName %type_TranslucentBasePass 172 "PrePadding_TranslucentBasePass_1932" + OpMemberName %type_TranslucentBasePass 173 "PrePadding_TranslucentBasePass_1936" + OpMemberName %type_TranslucentBasePass 174 "PrePadding_TranslucentBasePass_1940" + OpMemberName %type_TranslucentBasePass 175 "PrePadding_TranslucentBasePass_1944" + OpMemberName %type_TranslucentBasePass 176 "PrePadding_TranslucentBasePass_1948" + OpMemberName %type_TranslucentBasePass 177 "PrePadding_TranslucentBasePass_1952" + OpMemberName %type_TranslucentBasePass 178 "PrePadding_TranslucentBasePass_1956" + OpMemberName %type_TranslucentBasePass 179 "PrePadding_TranslucentBasePass_1960" + OpMemberName %type_TranslucentBasePass 180 "PrePadding_TranslucentBasePass_1964" + OpMemberName %type_TranslucentBasePass 181 "PrePadding_TranslucentBasePass_1968" + OpMemberName %type_TranslucentBasePass 182 "PrePadding_TranslucentBasePass_1972" + OpMemberName %type_TranslucentBasePass 183 "PrePadding_TranslucentBasePass_1976" + OpMemberName %type_TranslucentBasePass 184 "PrePadding_TranslucentBasePass_1980" + OpMemberName %type_TranslucentBasePass 185 "PrePadding_TranslucentBasePass_1984" + OpMemberName %type_TranslucentBasePass 186 "PrePadding_TranslucentBasePass_1988" + OpMemberName %type_TranslucentBasePass 187 "PrePadding_TranslucentBasePass_1992" + OpMemberName %type_TranslucentBasePass 188 "PrePadding_TranslucentBasePass_1996" + OpMemberName %type_TranslucentBasePass 189 "PrePadding_TranslucentBasePass_2000" + OpMemberName %type_TranslucentBasePass 190 "PrePadding_TranslucentBasePass_2004" + OpMemberName %type_TranslucentBasePass 191 "PrePadding_TranslucentBasePass_2008" + OpMemberName %type_TranslucentBasePass 192 "PrePadding_TranslucentBasePass_2012" + OpMemberName %type_TranslucentBasePass 193 "PrePadding_TranslucentBasePass_2016" + OpMemberName %type_TranslucentBasePass 194 "PrePadding_TranslucentBasePass_2020" + OpMemberName %type_TranslucentBasePass 195 "PrePadding_TranslucentBasePass_2024" + OpMemberName %type_TranslucentBasePass 196 "PrePadding_TranslucentBasePass_2028" + OpMemberName %type_TranslucentBasePass 197 "PrePadding_TranslucentBasePass_2032" + OpMemberName %type_TranslucentBasePass 198 "PrePadding_TranslucentBasePass_2036" + OpMemberName %type_TranslucentBasePass 199 "PrePadding_TranslucentBasePass_2040" + OpMemberName %type_TranslucentBasePass 200 "PrePadding_TranslucentBasePass_2044" + OpMemberName %type_TranslucentBasePass 201 "PrePadding_TranslucentBasePass_2048" + OpMemberName %type_TranslucentBasePass 202 "PrePadding_TranslucentBasePass_2052" + OpMemberName %type_TranslucentBasePass 203 "PrePadding_TranslucentBasePass_2056" + OpMemberName %type_TranslucentBasePass 204 "PrePadding_TranslucentBasePass_2060" + OpMemberName %type_TranslucentBasePass 205 "PrePadding_TranslucentBasePass_2064" + OpMemberName %type_TranslucentBasePass 206 "PrePadding_TranslucentBasePass_2068" + OpMemberName %type_TranslucentBasePass 207 "PrePadding_TranslucentBasePass_2072" + OpMemberName %type_TranslucentBasePass 208 "PrePadding_TranslucentBasePass_2076" + OpMemberName %type_TranslucentBasePass 209 "PrePadding_TranslucentBasePass_2080" + OpMemberName %type_TranslucentBasePass 210 "PrePadding_TranslucentBasePass_2084" + OpMemberName %type_TranslucentBasePass 211 "PrePadding_TranslucentBasePass_2088" + OpMemberName %type_TranslucentBasePass 212 "PrePadding_TranslucentBasePass_2092" + OpMemberName %type_TranslucentBasePass 213 "PrePadding_TranslucentBasePass_2096" + OpMemberName %type_TranslucentBasePass 214 "PrePadding_TranslucentBasePass_2100" + OpMemberName %type_TranslucentBasePass 215 "PrePadding_TranslucentBasePass_2104" + OpMemberName %type_TranslucentBasePass 216 "PrePadding_TranslucentBasePass_2108" + OpMemberName %type_TranslucentBasePass 217 "PrePadding_TranslucentBasePass_2112" + OpMemberName %type_TranslucentBasePass 218 "PrePadding_TranslucentBasePass_2116" + OpMemberName %type_TranslucentBasePass 219 "PrePadding_TranslucentBasePass_2120" + OpMemberName %type_TranslucentBasePass 220 "PrePadding_TranslucentBasePass_2124" + OpMemberName %type_TranslucentBasePass 221 "PrePadding_TranslucentBasePass_2128" + OpMemberName %type_TranslucentBasePass 222 "PrePadding_TranslucentBasePass_2132" + OpMemberName %type_TranslucentBasePass 223 "PrePadding_TranslucentBasePass_2136" + OpMemberName %type_TranslucentBasePass 224 "PrePadding_TranslucentBasePass_2140" + OpMemberName %type_TranslucentBasePass 225 "TranslucentBasePass_HZBUvFactorAndInvFactor" + OpMemberName %type_TranslucentBasePass 226 "TranslucentBasePass_PrevScreenPositionScaleBias" + OpMemberName %type_TranslucentBasePass 227 "TranslucentBasePass_PrevSceneColorPreExposureInv" + OpName %TranslucentBasePass "TranslucentBasePass" + OpName %TranslucentBasePass_Shared_Fog_IntegratedLightScattering "TranslucentBasePass_Shared_Fog_IntegratedLightScattering" + OpName %type_Material "type.Material" + OpMemberName %type_Material 0 "Material_VectorExpressions" + OpMemberName %type_Material 1 "Material_ScalarExpressions" + OpName %Material "Material" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_PRIMITIVE_ID "in.var.PRIMITIVE_ID" + OpName %in_var_TEXCOORD7 "in.var.TEXCOORD7" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %MainPS "MainPS" + OpName %type_sampled_image "type.sampled.image" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorate %in_var_PRIMITIVE_ID Flat + OpDecorateString %in_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_Position" + OpDecorate %gl_FrontFacing BuiltIn FrontFacing + OpDecorateString %gl_FrontFacing UserSemantic "SV_IsFrontFace" + OpDecorate %gl_FrontFacing Flat + OpDecorate %gl_SampleMask BuiltIn SampleMask + OpDecorateString %gl_SampleMask UserSemantic "SV_Coverage" + OpDecorate %gl_SampleMask Flat + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %gl_SampleMask_0 BuiltIn SampleMask + OpDecorateString %gl_SampleMask_0 UserSemantic "SV_Coverage" + OpDecorate %in_var_TEXCOORD10_centroid Location 0 + OpDecorate %in_var_TEXCOORD11_centroid Location 1 + OpDecorate %in_var_PRIMITIVE_ID Location 2 + OpDecorate %in_var_TEXCOORD7 Location 3 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 1 + OpDecorate %View_SharedBilinearClampedSampler DescriptorSet 0 + OpDecorate %View_SharedBilinearClampedSampler Binding 0 + OpDecorate %View_PrimitiveSceneData DescriptorSet 0 + OpDecorate %View_PrimitiveSceneData Binding 0 + OpDecorate %TranslucentBasePass DescriptorSet 0 + OpDecorate %TranslucentBasePass Binding 2 + OpDecorate %TranslucentBasePass_Shared_Fog_IntegratedLightScattering DescriptorSet 0 + OpDecorate %TranslucentBasePass_Shared_Fog_IntegratedLightScattering Binding 0 + OpDecorate %Material DescriptorSet 0 + OpDecorate %Material Binding 3 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpDecorate %_runtimearr_v4float ArrayStride 16 + OpMemberDecorate %type_StructuredBuffer_v4float 0 Offset 0 + OpMemberDecorate %type_StructuredBuffer_v4float 0 NonWritable + OpDecorate %type_StructuredBuffer_v4float BufferBlock + OpDecorate %_arr_mat4v4float_uint_4 ArrayStride 64 + OpDecorate %_arr_mat4v4float_uint_2 ArrayStride 64 + OpMemberDecorate %type_TranslucentBasePass 0 Offset 0 + OpMemberDecorate %type_TranslucentBasePass 1 Offset 4 + OpMemberDecorate %type_TranslucentBasePass 2 Offset 8 + OpMemberDecorate %type_TranslucentBasePass 3 Offset 12 + OpMemberDecorate %type_TranslucentBasePass 4 Offset 16 + OpMemberDecorate %type_TranslucentBasePass 5 Offset 28 + OpMemberDecorate %type_TranslucentBasePass 6 Offset 32 + OpMemberDecorate %type_TranslucentBasePass 7 Offset 36 + OpMemberDecorate %type_TranslucentBasePass 8 Offset 40 + OpMemberDecorate %type_TranslucentBasePass 9 Offset 44 + OpMemberDecorate %type_TranslucentBasePass 10 Offset 48 + OpMemberDecorate %type_TranslucentBasePass 11 Offset 60 + OpMemberDecorate %type_TranslucentBasePass 12 Offset 64 + OpMemberDecorate %type_TranslucentBasePass 13 Offset 76 + OpMemberDecorate %type_TranslucentBasePass 14 Offset 80 + OpMemberDecorate %type_TranslucentBasePass 15 Offset 92 + OpMemberDecorate %type_TranslucentBasePass 16 Offset 96 + OpMemberDecorate %type_TranslucentBasePass 17 Offset 100 + OpMemberDecorate %type_TranslucentBasePass 18 Offset 104 + OpMemberDecorate %type_TranslucentBasePass 19 Offset 112 + OpMemberDecorate %type_TranslucentBasePass 20 Offset 116 + OpMemberDecorate %type_TranslucentBasePass 21 Offset 120 + OpMemberDecorate %type_TranslucentBasePass 22 Offset 124 + OpMemberDecorate %type_TranslucentBasePass 23 Offset 128 + OpMemberDecorate %type_TranslucentBasePass 24 Offset 144 + OpMemberDecorate %type_TranslucentBasePass 24 MatrixStride 16 + OpMemberDecorate %type_TranslucentBasePass 24 ColMajor + OpMemberDecorate %type_TranslucentBasePass 25 Offset 400 + OpMemberDecorate %type_TranslucentBasePass 26 Offset 464 + OpMemberDecorate %type_TranslucentBasePass 27 Offset 480 + OpMemberDecorate %type_TranslucentBasePass 28 Offset 484 + OpMemberDecorate %type_TranslucentBasePass 29 Offset 488 + OpMemberDecorate %type_TranslucentBasePass 30 Offset 492 + OpMemberDecorate %type_TranslucentBasePass 31 Offset 496 + OpMemberDecorate %type_TranslucentBasePass 32 Offset 512 + OpMemberDecorate %type_TranslucentBasePass 32 MatrixStride 16 + OpMemberDecorate %type_TranslucentBasePass 32 ColMajor + OpMemberDecorate %type_TranslucentBasePass 33 Offset 576 + OpMemberDecorate %type_TranslucentBasePass 34 Offset 580 + OpMemberDecorate %type_TranslucentBasePass 35 Offset 584 + OpMemberDecorate %type_TranslucentBasePass 36 Offset 588 + OpMemberDecorate %type_TranslucentBasePass 37 Offset 592 + OpMemberDecorate %type_TranslucentBasePass 38 Offset 596 + OpMemberDecorate %type_TranslucentBasePass 39 Offset 600 + OpMemberDecorate %type_TranslucentBasePass 40 Offset 604 + OpMemberDecorate %type_TranslucentBasePass 41 Offset 608 + OpMemberDecorate %type_TranslucentBasePass 42 Offset 612 + OpMemberDecorate %type_TranslucentBasePass 43 Offset 616 + OpMemberDecorate %type_TranslucentBasePass 44 Offset 620 + OpMemberDecorate %type_TranslucentBasePass 45 Offset 624 + OpMemberDecorate %type_TranslucentBasePass 46 Offset 628 + OpMemberDecorate %type_TranslucentBasePass 47 Offset 632 + OpMemberDecorate %type_TranslucentBasePass 48 Offset 636 + OpMemberDecorate %type_TranslucentBasePass 49 Offset 640 + OpMemberDecorate %type_TranslucentBasePass 50 Offset 644 + OpMemberDecorate %type_TranslucentBasePass 51 Offset 648 + OpMemberDecorate %type_TranslucentBasePass 52 Offset 652 + OpMemberDecorate %type_TranslucentBasePass 53 Offset 656 + OpMemberDecorate %type_TranslucentBasePass 54 Offset 668 + OpMemberDecorate %type_TranslucentBasePass 55 Offset 672 + OpMemberDecorate %type_TranslucentBasePass 56 Offset 676 + OpMemberDecorate %type_TranslucentBasePass 57 Offset 680 + OpMemberDecorate %type_TranslucentBasePass 58 Offset 684 + OpMemberDecorate %type_TranslucentBasePass 59 Offset 688 + OpMemberDecorate %type_TranslucentBasePass 60 Offset 700 + OpMemberDecorate %type_TranslucentBasePass 61 Offset 704 + OpMemberDecorate %type_TranslucentBasePass 62 Offset 716 + OpMemberDecorate %type_TranslucentBasePass 63 Offset 720 + OpMemberDecorate %type_TranslucentBasePass 64 Offset 732 + OpMemberDecorate %type_TranslucentBasePass 65 Offset 736 + OpMemberDecorate %type_TranslucentBasePass 66 Offset 740 + OpMemberDecorate %type_TranslucentBasePass 67 Offset 744 + OpMemberDecorate %type_TranslucentBasePass 68 Offset 752 + OpMemberDecorate %type_TranslucentBasePass 69 Offset 756 + OpMemberDecorate %type_TranslucentBasePass 70 Offset 760 + OpMemberDecorate %type_TranslucentBasePass 71 Offset 764 + OpMemberDecorate %type_TranslucentBasePass 72 Offset 768 + OpMemberDecorate %type_TranslucentBasePass 73 Offset 784 + OpMemberDecorate %type_TranslucentBasePass 73 MatrixStride 16 + OpMemberDecorate %type_TranslucentBasePass 73 ColMajor + OpMemberDecorate %type_TranslucentBasePass 74 Offset 1040 + OpMemberDecorate %type_TranslucentBasePass 75 Offset 1104 + OpMemberDecorate %type_TranslucentBasePass 76 Offset 1120 + OpMemberDecorate %type_TranslucentBasePass 77 Offset 1124 + OpMemberDecorate %type_TranslucentBasePass 78 Offset 1128 + OpMemberDecorate %type_TranslucentBasePass 79 Offset 1132 + OpMemberDecorate %type_TranslucentBasePass 80 Offset 1136 + OpMemberDecorate %type_TranslucentBasePass 81 Offset 1152 + OpMemberDecorate %type_TranslucentBasePass 81 MatrixStride 16 + OpMemberDecorate %type_TranslucentBasePass 81 ColMajor + OpMemberDecorate %type_TranslucentBasePass 82 Offset 1216 + OpMemberDecorate %type_TranslucentBasePass 83 Offset 1220 + OpMemberDecorate %type_TranslucentBasePass 84 Offset 1224 + OpMemberDecorate %type_TranslucentBasePass 85 Offset 1228 + OpMemberDecorate %type_TranslucentBasePass 86 Offset 1232 + OpMemberDecorate %type_TranslucentBasePass 87 Offset 1236 + OpMemberDecorate %type_TranslucentBasePass 88 Offset 1240 + OpMemberDecorate %type_TranslucentBasePass 89 Offset 1244 + OpMemberDecorate %type_TranslucentBasePass 90 Offset 1248 + OpMemberDecorate %type_TranslucentBasePass 91 Offset 1252 + OpMemberDecorate %type_TranslucentBasePass 92 Offset 1256 + OpMemberDecorate %type_TranslucentBasePass 93 Offset 1260 + OpMemberDecorate %type_TranslucentBasePass 94 Offset 1264 + OpMemberDecorate %type_TranslucentBasePass 95 Offset 1268 + OpMemberDecorate %type_TranslucentBasePass 96 Offset 1272 + OpMemberDecorate %type_TranslucentBasePass 97 Offset 1276 + OpMemberDecorate %type_TranslucentBasePass 98 Offset 1280 + OpMemberDecorate %type_TranslucentBasePass 99 Offset 1296 + OpMemberDecorate %type_TranslucentBasePass 100 Offset 1300 + OpMemberDecorate %type_TranslucentBasePass 101 Offset 1304 + OpMemberDecorate %type_TranslucentBasePass 102 Offset 1308 + OpMemberDecorate %type_TranslucentBasePass 103 Offset 1312 + OpMemberDecorate %type_TranslucentBasePass 104 Offset 1316 + OpMemberDecorate %type_TranslucentBasePass 105 Offset 1320 + OpMemberDecorate %type_TranslucentBasePass 106 Offset 1324 + OpMemberDecorate %type_TranslucentBasePass 107 Offset 1328 + OpMemberDecorate %type_TranslucentBasePass 108 Offset 1332 + OpMemberDecorate %type_TranslucentBasePass 109 Offset 1336 + OpMemberDecorate %type_TranslucentBasePass 110 Offset 1340 + OpMemberDecorate %type_TranslucentBasePass 111 Offset 1344 + OpMemberDecorate %type_TranslucentBasePass 112 Offset 1348 + OpMemberDecorate %type_TranslucentBasePass 113 Offset 1352 + OpMemberDecorate %type_TranslucentBasePass 114 Offset 1356 + OpMemberDecorate %type_TranslucentBasePass 115 Offset 1360 + OpMemberDecorate %type_TranslucentBasePass 116 Offset 1376 + OpMemberDecorate %type_TranslucentBasePass 117 Offset 1392 + OpMemberDecorate %type_TranslucentBasePass 118 Offset 1408 + OpMemberDecorate %type_TranslucentBasePass 119 Offset 1424 + OpMemberDecorate %type_TranslucentBasePass 119 MatrixStride 16 + OpMemberDecorate %type_TranslucentBasePass 119 ColMajor + OpMemberDecorate %type_TranslucentBasePass 120 Offset 1472 + OpMemberDecorate %type_TranslucentBasePass 121 Offset 1484 + OpMemberDecorate %type_TranslucentBasePass 122 Offset 1488 + OpMemberDecorate %type_TranslucentBasePass 123 Offset 1496 + OpMemberDecorate %type_TranslucentBasePass 124 Offset 1500 + OpMemberDecorate %type_TranslucentBasePass 125 Offset 1504 + OpMemberDecorate %type_TranslucentBasePass 125 MatrixStride 16 + OpMemberDecorate %type_TranslucentBasePass 125 ColMajor + OpMemberDecorate %type_TranslucentBasePass 126 Offset 1632 + OpMemberDecorate %type_TranslucentBasePass 127 Offset 1664 + OpMemberDecorate %type_TranslucentBasePass 128 Offset 1672 + OpMemberDecorate %type_TranslucentBasePass 129 Offset 1676 + OpMemberDecorate %type_TranslucentBasePass 130 Offset 1680 + OpMemberDecorate %type_TranslucentBasePass 131 Offset 1684 + OpMemberDecorate %type_TranslucentBasePass 132 Offset 1688 + OpMemberDecorate %type_TranslucentBasePass 133 Offset 1692 + OpMemberDecorate %type_TranslucentBasePass 134 Offset 1696 + OpMemberDecorate %type_TranslucentBasePass 135 Offset 1712 + OpMemberDecorate %type_TranslucentBasePass 136 Offset 1728 + OpMemberDecorate %type_TranslucentBasePass 137 Offset 1744 + OpMemberDecorate %type_TranslucentBasePass 138 Offset 1760 + OpMemberDecorate %type_TranslucentBasePass 139 Offset 1776 + OpMemberDecorate %type_TranslucentBasePass 140 Offset 1792 + OpMemberDecorate %type_TranslucentBasePass 141 Offset 1800 + OpMemberDecorate %type_TranslucentBasePass 142 Offset 1804 + OpMemberDecorate %type_TranslucentBasePass 143 Offset 1808 + OpMemberDecorate %type_TranslucentBasePass 144 Offset 1820 + OpMemberDecorate %type_TranslucentBasePass 145 Offset 1824 + OpMemberDecorate %type_TranslucentBasePass 146 Offset 1828 + OpMemberDecorate %type_TranslucentBasePass 147 Offset 1832 + OpMemberDecorate %type_TranslucentBasePass 148 Offset 1836 + OpMemberDecorate %type_TranslucentBasePass 149 Offset 1840 + OpMemberDecorate %type_TranslucentBasePass 150 Offset 1844 + OpMemberDecorate %type_TranslucentBasePass 151 Offset 1848 + OpMemberDecorate %type_TranslucentBasePass 152 Offset 1852 + OpMemberDecorate %type_TranslucentBasePass 153 Offset 1856 + OpMemberDecorate %type_TranslucentBasePass 154 Offset 1860 + OpMemberDecorate %type_TranslucentBasePass 155 Offset 1864 + OpMemberDecorate %type_TranslucentBasePass 156 Offset 1868 + OpMemberDecorate %type_TranslucentBasePass 157 Offset 1872 + OpMemberDecorate %type_TranslucentBasePass 158 Offset 1876 + OpMemberDecorate %type_TranslucentBasePass 159 Offset 1880 + OpMemberDecorate %type_TranslucentBasePass 160 Offset 1884 + OpMemberDecorate %type_TranslucentBasePass 161 Offset 1888 + OpMemberDecorate %type_TranslucentBasePass 162 Offset 1892 + OpMemberDecorate %type_TranslucentBasePass 163 Offset 1896 + OpMemberDecorate %type_TranslucentBasePass 164 Offset 1900 + OpMemberDecorate %type_TranslucentBasePass 165 Offset 1904 + OpMemberDecorate %type_TranslucentBasePass 166 Offset 1908 + OpMemberDecorate %type_TranslucentBasePass 167 Offset 1912 + OpMemberDecorate %type_TranslucentBasePass 168 Offset 1916 + OpMemberDecorate %type_TranslucentBasePass 169 Offset 1920 + OpMemberDecorate %type_TranslucentBasePass 170 Offset 1924 + OpMemberDecorate %type_TranslucentBasePass 171 Offset 1928 + OpMemberDecorate %type_TranslucentBasePass 172 Offset 1932 + OpMemberDecorate %type_TranslucentBasePass 173 Offset 1936 + OpMemberDecorate %type_TranslucentBasePass 174 Offset 1940 + OpMemberDecorate %type_TranslucentBasePass 175 Offset 1944 + OpMemberDecorate %type_TranslucentBasePass 176 Offset 1948 + OpMemberDecorate %type_TranslucentBasePass 177 Offset 1952 + OpMemberDecorate %type_TranslucentBasePass 178 Offset 1956 + OpMemberDecorate %type_TranslucentBasePass 179 Offset 1960 + OpMemberDecorate %type_TranslucentBasePass 180 Offset 1964 + OpMemberDecorate %type_TranslucentBasePass 181 Offset 1968 + OpMemberDecorate %type_TranslucentBasePass 182 Offset 1972 + OpMemberDecorate %type_TranslucentBasePass 183 Offset 1976 + OpMemberDecorate %type_TranslucentBasePass 184 Offset 1980 + OpMemberDecorate %type_TranslucentBasePass 185 Offset 1984 + OpMemberDecorate %type_TranslucentBasePass 186 Offset 1988 + OpMemberDecorate %type_TranslucentBasePass 187 Offset 1992 + OpMemberDecorate %type_TranslucentBasePass 188 Offset 1996 + OpMemberDecorate %type_TranslucentBasePass 189 Offset 2000 + OpMemberDecorate %type_TranslucentBasePass 190 Offset 2004 + OpMemberDecorate %type_TranslucentBasePass 191 Offset 2008 + OpMemberDecorate %type_TranslucentBasePass 192 Offset 2012 + OpMemberDecorate %type_TranslucentBasePass 193 Offset 2016 + OpMemberDecorate %type_TranslucentBasePass 194 Offset 2020 + OpMemberDecorate %type_TranslucentBasePass 195 Offset 2024 + OpMemberDecorate %type_TranslucentBasePass 196 Offset 2028 + OpMemberDecorate %type_TranslucentBasePass 197 Offset 2032 + OpMemberDecorate %type_TranslucentBasePass 198 Offset 2036 + OpMemberDecorate %type_TranslucentBasePass 199 Offset 2040 + OpMemberDecorate %type_TranslucentBasePass 200 Offset 2044 + OpMemberDecorate %type_TranslucentBasePass 201 Offset 2048 + OpMemberDecorate %type_TranslucentBasePass 202 Offset 2052 + OpMemberDecorate %type_TranslucentBasePass 203 Offset 2056 + OpMemberDecorate %type_TranslucentBasePass 204 Offset 2060 + OpMemberDecorate %type_TranslucentBasePass 205 Offset 2064 + OpMemberDecorate %type_TranslucentBasePass 206 Offset 2068 + OpMemberDecorate %type_TranslucentBasePass 207 Offset 2072 + OpMemberDecorate %type_TranslucentBasePass 208 Offset 2076 + OpMemberDecorate %type_TranslucentBasePass 209 Offset 2080 + OpMemberDecorate %type_TranslucentBasePass 210 Offset 2084 + OpMemberDecorate %type_TranslucentBasePass 211 Offset 2088 + OpMemberDecorate %type_TranslucentBasePass 212 Offset 2092 + OpMemberDecorate %type_TranslucentBasePass 213 Offset 2096 + OpMemberDecorate %type_TranslucentBasePass 214 Offset 2100 + OpMemberDecorate %type_TranslucentBasePass 215 Offset 2104 + OpMemberDecorate %type_TranslucentBasePass 216 Offset 2108 + OpMemberDecorate %type_TranslucentBasePass 217 Offset 2112 + OpMemberDecorate %type_TranslucentBasePass 218 Offset 2116 + OpMemberDecorate %type_TranslucentBasePass 219 Offset 2120 + OpMemberDecorate %type_TranslucentBasePass 220 Offset 2124 + OpMemberDecorate %type_TranslucentBasePass 221 Offset 2128 + OpMemberDecorate %type_TranslucentBasePass 222 Offset 2132 + OpMemberDecorate %type_TranslucentBasePass 223 Offset 2136 + OpMemberDecorate %type_TranslucentBasePass 224 Offset 2140 + OpMemberDecorate %type_TranslucentBasePass 225 Offset 2144 + OpMemberDecorate %type_TranslucentBasePass 226 Offset 2160 + OpMemberDecorate %type_TranslucentBasePass 227 Offset 2176 + OpDecorate %type_TranslucentBasePass Block + OpDecorate %_arr_v4float_uint_1 ArrayStride 16 + OpMemberDecorate %type_Material 0 Offset 0 + OpMemberDecorate %type_Material 1 Offset 32 + OpDecorate %type_Material Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %uint_0 = OpConstant %uint 0 + %bool = OpTypeBool + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %float_0 = OpConstant %float 0 + %48 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %int_10 = OpConstant %int 10 + %int_144 = OpConstant %int 144 + %int_70 = OpConstant %int 70 + %float_1 = OpConstant %float 1 + %53 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%float_0_577000022 = OpConstant %float 0.577000022 + %55 = OpConstantComposite %v3float %float_0_577000022 %float_0_577000022 %float_0_577000022 + %56 = OpConstantComposite %v3float %float_1 %float_1 %float_0 + %57 = OpConstantComposite %v3float %float_0 %float_1 %float_1 + %float_0_5 = OpConstant %float 0.5 + %59 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %int_60 = OpConstant %int 60 + %61 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %uint_26 = OpConstant %uint 26 + %uint_1 = OpConstant %uint 1 + %uint_5 = OpConstant %uint 5 + %uint_19 = OpConstant %uint 19 + %float_n0_5 = OpConstant %float -0.5 + %67 = OpConstantComposite %v2float %float_0_5 %float_n0_5 + %68 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 + %float_0_25 = OpConstant %float 0.25 + %int_31 = OpConstant %int 31 + %int_66 = OpConstant %int 66 + %int_153 = OpConstant %int 153 + %int_155 = OpConstant %int 155 +%mat3v3float = OpTypeMatrix %v3float 3 + %75 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %float_n1 = OpConstant %float -1 +%float_0_200000003 = OpConstant %float 0.200000003 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_3d_image = OpTypeImage %float 3D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_3d_image = OpTypePointer UniformConstant %type_3d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%_runtimearr_v4float = OpTypeRuntimeArray %v4float +%type_StructuredBuffer_v4float = OpTypeStruct %_runtimearr_v4float +%_ptr_Uniform_type_StructuredBuffer_v4float = OpTypePointer Uniform %type_StructuredBuffer_v4float + %v3int = OpTypeVector %int 3 +%_arr_mat4v4float_uint_4 = OpTypeArray %mat4v4float %uint_4 +%mat3v4float = OpTypeMatrix %v4float 3 +%_arr_mat4v4float_uint_2 = OpTypeArray %mat4v4float %uint_2 +%type_TranslucentBasePass = OpTypeStruct %uint %uint %uint %uint %v3int %uint %uint %uint %uint %uint %v3float %float %v3float %float %v3float %float %uint %uint %v2float %uint %uint %uint %uint %v4float %_arr_mat4v4float_uint_4 %_arr_v4float_uint_4 %v4float %float %uint %uint %uint %v4float %mat4v4float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %v3int %uint %uint %uint %uint %uint %v3float %float %v3float %float %v3float %float %uint %uint %v2float %uint %uint %uint %uint %v4float %_arr_mat4v4float_uint_4 %_arr_v4float_uint_4 %v4float %float %uint %uint %uint %v4float %mat4v4float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %v4float %v4float %v4float %mat3v4float %v3float %float %v2float %float %float %_arr_mat4v4float_uint_2 %_arr_v4float_uint_2 %v2float %uint %float %float %float %float %float %v4float %v4float %v4float %v4float %v4float %v4float %v2float %float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %v4float %float +%_ptr_Uniform_type_TranslucentBasePass = OpTypePointer Uniform %type_TranslucentBasePass +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%type_Material = OpTypeStruct %_arr_v4float_uint_2 %_arr_v4float_uint_1 +%_ptr_Uniform_type_Material = OpTypePointer Uniform %type_Material +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Input_bool = OpTypePointer Input %bool +%_arr_uint_uint_1 = OpTypeArray %uint %uint_1 +%_ptr_Input__arr_uint_uint_1 = OpTypePointer Input %_arr_uint_uint_1 +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_ptr_Output__arr_uint_uint_1 = OpTypePointer Output %_arr_uint_uint_1 + %void = OpTypeVoid + %94 = OpTypeFunction %void +%_ptr_Output_uint = OpTypePointer Output %uint +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_int = OpTypePointer Uniform %int +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%type_sampled_image = OpTypeSampledImage %type_3d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform +%View_SharedBilinearClampedSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%View_PrimitiveSceneData = OpVariable %_ptr_Uniform_type_StructuredBuffer_v4float Uniform +%TranslucentBasePass = OpVariable %_ptr_Uniform_type_TranslucentBasePass Uniform +%TranslucentBasePass_Shared_Fog_IntegratedLightScattering = OpVariable %_ptr_UniformConstant_type_3d_image UniformConstant + %Material = OpVariable %_ptr_Uniform_type_Material Uniform +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input_v4float Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input_v4float Input +%in_var_PRIMITIVE_ID = OpVariable %_ptr_Input_uint Input +%in_var_TEXCOORD7 = OpVariable %_ptr_Input_v4float Input +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%gl_FrontFacing = OpVariable %_ptr_Input_bool Input +%gl_SampleMask = OpVariable %_ptr_Input__arr_uint_uint_1 Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output +%gl_SampleMask_0 = OpVariable %_ptr_Output__arr_uint_uint_1 Output + %102 = OpConstantNull %v4float + %float_n1_5 = OpConstant %float -1.5 + %float_3 = OpConstant %float 3 + %105 = OpConstantComposite %v3float %float_n1 %float_n1_5 %float_3 +%float_12_25 = OpConstant %float 12.25 +%float_0_00200000009 = OpConstant %float 0.00200000009 + %108 = OpUndef %float + %uint_15 = OpConstant %uint 15 + %MainPS = OpFunction %void None %94 + %110 = OpLabel + %111 = OpLoad %v4float %in_var_TEXCOORD10_centroid + %112 = OpLoad %v4float %in_var_TEXCOORD11_centroid + %113 = OpLoad %uint %in_var_PRIMITIVE_ID + %114 = OpLoad %v4float %in_var_TEXCOORD7 + %115 = OpLoad %v4float %gl_FragCoord + %116 = OpLoad %_arr_uint_uint_1 %gl_SampleMask + %117 = OpCompositeExtract %uint %116 0 + %118 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_1 + %119 = OpLoad %mat4v4float %118 + %120 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_10 + %121 = OpLoad %mat4v4float %120 + %122 = OpAccessChain %_ptr_Uniform_v3float %View %int_31 + %123 = OpLoad %v3float %122 + %124 = OpAccessChain %_ptr_Uniform_v4float %View %int_66 + %125 = OpLoad %v4float %124 + %126 = OpVectorShuffle %v3float %111 %111 0 1 2 + %127 = OpVectorShuffle %v3float %112 %112 0 1 2 + %128 = OpExtInst %v3float %1 Cross %127 %126 + %129 = OpCompositeExtract %float %112 3 + %130 = OpCompositeConstruct %v3float %129 %129 %129 + %131 = OpFMul %v3float %128 %130 + %132 = OpCompositeConstruct %mat3v3float %126 %131 %127 + %133 = OpCompositeExtract %float %115 0 + %134 = OpCompositeExtract %float %115 1 + %135 = OpCompositeExtract %float %115 2 + %136 = OpCompositeConstruct %v4float %133 %134 %135 %float_1 + %137 = OpMatrixTimesVector %v4float %121 %136 + %138 = OpVectorShuffle %v3float %137 %137 0 1 2 + %139 = OpCompositeExtract %float %137 3 + %140 = OpCompositeConstruct %v3float %139 %139 %139 + %141 = OpFDiv %v3float %138 %140 + %142 = OpFSub %v3float %141 %123 + %143 = OpVectorShuffle %v3float %125 %125 0 1 2 + %144 = OpCompositeExtract %float %125 3 + %145 = OpCompositeConstruct %v3float %144 %144 %144 + %146 = OpFMul %v3float %75 %145 + %147 = OpFAdd %v3float %146 %143 + %148 = OpExtInst %v3float %1 Normalize %147 + %149 = OpMatrixTimesVector %v3float %132 %148 + %150 = OpExtInst %v3float %1 Normalize %149 + %151 = OpExtInst %float %1 Sqrt %float_12_25 + %152 = OpCompositeConstruct %v3float %151 %151 %151 + %153 = OpFDiv %v3float %105 %152 + %154 = OpDot %float %153 %150 + %155 = OpFAdd %float %float_1 %154 + %156 = OpFMul %float %155 %float_0_5 + %157 = OpFAdd %float %156 %float_0_200000003 + %158 = OpAccessChain %_ptr_Uniform_v4float %Material %int_0 %int_1 + %159 = OpLoad %v4float %158 + %160 = OpVectorShuffle %v3float %159 %159 0 1 2 + %161 = OpCompositeConstruct %v3float %157 %157 %157 + %162 = OpFMul %v3float %160 %161 + %163 = OpAccessChain %_ptr_Uniform_float %TranslucentBasePass %int_144 + %164 = OpLoad %float %163 + %165 = OpFOrdGreaterThan %bool %164 %float_0 + OpSelectionMerge %166 None + OpBranchConditional %165 %167 %166 + %167 = OpLabel + %168 = OpCompositeExtract %float %142 0 + %169 = OpCompositeExtract %float %142 1 + %170 = OpCompositeExtract %float %142 2 + %171 = OpCompositeConstruct %v4float %168 %169 %170 %float_1 + %172 = OpMatrixTimesVector %v4float %119 %171 + %173 = OpCompositeExtract %float %172 3 + %174 = OpCompositeConstruct %v2float %173 %173 + %175 = OpVectorShuffle %v2float %172 %172 0 1 + %176 = OpFDiv %v2float %175 %174 + %177 = OpVectorShuffle %v2float %176 %102 0 1 + %178 = OpFMul %v2float %177 %67 + %179 = OpFAdd %v2float %178 %61 + %180 = OpCompositeExtract %float %179 0 + %181 = OpCompositeExtract %float %179 1 + %182 = OpAccessChain %_ptr_Uniform_float %View %int_155 %int_0 + %183 = OpLoad %float %182 + %184 = OpFMul %float %173 %183 + %185 = OpAccessChain %_ptr_Uniform_float %View %int_155 %int_1 + %186 = OpLoad %float %185 + %187 = OpFAdd %float %184 %186 + %188 = OpExtInst %float %1 Log2 %187 + %189 = OpAccessChain %_ptr_Uniform_float %View %int_155 %int_2 + %190 = OpLoad %float %189 + %191 = OpFMul %float %188 %190 + %192 = OpAccessChain %_ptr_Uniform_float %View %int_153 %int_2 + %193 = OpLoad %float %192 + %194 = OpFMul %float %191 %193 + %195 = OpCompositeConstruct %v3float %180 %181 %194 + OpSelectionMerge %196 None + OpBranchConditional %165 %197 %196 + %197 = OpLabel + %198 = OpLoad %type_3d_image %TranslucentBasePass_Shared_Fog_IntegratedLightScattering + %199 = OpLoad %type_sampler %View_SharedBilinearClampedSampler + %200 = OpSampledImage %type_sampled_image %198 %199 + %201 = OpImageSampleExplicitLod %v4float %200 %195 Lod %float_0 + OpBranch %196 + %196 = OpLabel + %202 = OpPhi %v4float %68 %167 %201 %197 + %203 = OpVectorShuffle %v3float %202 %202 0 1 2 + %204 = OpVectorShuffle %v3float %114 %114 0 1 2 + %205 = OpCompositeExtract %float %202 3 + %206 = OpCompositeConstruct %v3float %205 %205 %205 + %207 = OpFMul %v3float %204 %206 + %208 = OpFAdd %v3float %203 %207 + %209 = OpCompositeExtract %float %208 0 + %210 = OpCompositeExtract %float %208 1 + %211 = OpCompositeExtract %float %208 2 + %212 = OpCompositeExtract %float %114 3 + %213 = OpFMul %float %205 %212 + %214 = OpCompositeConstruct %v4float %209 %210 %211 %213 + OpBranch %166 + %166 = OpLabel + %215 = OpPhi %v4float %114 %110 %214 %196 + %216 = OpExtInst %v3float %1 FMax %162 %48 + %217 = OpAccessChain %_ptr_Uniform_float %View %int_70 + %218 = OpLoad %float %217 + %219 = OpFOrdGreaterThan %bool %218 %float_0 + OpSelectionMerge %220 DontFlatten + OpBranchConditional %219 %221 %220 + %221 = OpLabel + %222 = OpIMul %uint %113 %uint_26 + %223 = OpIAdd %uint %222 %uint_5 + %224 = OpAccessChain %_ptr_Uniform_v4float %View_PrimitiveSceneData %int_0 %223 + %225 = OpLoad %v4float %224 + %226 = OpVectorShuffle %v3float %225 %225 0 1 2 + %227 = OpFSub %v3float %142 %226 + %228 = OpExtInst %v3float %1 FAbs %227 + %229 = OpIAdd %uint %222 %uint_19 + %230 = OpAccessChain %_ptr_Uniform_v4float %View_PrimitiveSceneData %int_0 %229 + %231 = OpLoad %v4float %230 + %232 = OpVectorShuffle %v3float %231 %231 0 1 2 + %233 = OpFAdd %v3float %232 %53 + %234 = OpFOrdGreaterThan %v3bool %228 %233 + %235 = OpAny %bool %234 + OpSelectionMerge %236 None + OpBranchConditional %235 %237 %236 + %237 = OpLabel + %238 = OpDot %float %142 %55 + %239 = OpFMul %float %238 %float_0_00200000009 + %240 = OpExtInst %float %1 Fract %239 + %241 = OpCompositeConstruct %v3float %240 %240 %240 + %242 = OpFOrdGreaterThan %v3bool %241 %59 + %243 = OpSelect %v3float %242 %53 %48 + %244 = OpExtInst %v3float %1 FMix %56 %57 %243 + OpBranch %236 + %236 = OpLabel + %245 = OpPhi %v3float %216 %221 %244 %237 + OpBranch %220 + %220 = OpLabel + %246 = OpPhi %v3float %216 %166 %245 %236 + %247 = OpCompositeExtract %float %215 3 + %248 = OpCompositeConstruct %v3float %247 %247 %247 + %249 = OpFMul %v3float %246 %248 + %250 = OpVectorShuffle %v3float %215 %215 0 1 2 + %251 = OpFAdd %v3float %249 %250 + %252 = OpCompositeExtract %float %251 0 + %253 = OpCompositeExtract %float %251 1 + %254 = OpCompositeExtract %float %251 2 + %255 = OpCompositeConstruct %v4float %252 %253 %254 %108 + %256 = OpCompositeInsert %v4float %float_1 %255 3 + %257 = OpAccessChain %_ptr_Uniform_int %View %int_60 + %258 = OpLoad %int %257 + %259 = OpSGreaterThan %bool %258 %int_1 + OpSelectionMerge %260 None + OpBranchConditional %259 %261 %262 + %262 = OpLabel + OpBranch %260 + %261 = OpLabel + %263 = OpConvertSToF %float %258 + %264 = OpFMul %float %263 %float_0_25 + %265 = OpCompositeConstruct %v4float %264 %264 %264 %264 + %266 = OpFMul %v4float %256 %265 + %267 = OpBitwiseAnd %uint %117 %uint_15 + OpBranch %260 + %260 = OpLabel + %268 = OpPhi %v4float %266 %261 %256 %262 + %269 = OpPhi %uint %267 %261 %117 %262 + OpStore %out_var_SV_Target0 %268 + %270 = OpAccessChain %_ptr_Output_uint %gl_SampleMask_0 %uint_0 + OpStore %270 %269 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag new file mode 100644 index 000000000..e6565873a --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/subpass-input.ios.framebuffer-fetch.asm.frag @@ -0,0 +1,589 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 130 +; Schema: 0 + OpCapability Shader + OpCapability InputAttachment + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %Main "main" %gl_FragCoord %out_var_SV_Target0 + OpExecutionMode %Main OriginUpperLeft + OpSource HLSL 600 + OpName %type_subpass_image "type.subpass.image" + OpName %gl_LastFragData "gl_LastFragData" + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_sampler "type.sampler" + OpName %type_2d_image "type.2d.image" + OpName %ShadowDepthTexture "ShadowDepthTexture" + OpName %ShadowDepthTextureSampler "ShadowDepthTextureSampler" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "SoftTransitionScale" + OpMemberName %type__Globals 1 "ShadowBufferSize" + OpMemberName %type__Globals 2 "ShadowFadeFraction" + OpMemberName %type__Globals 3 "ShadowSharpen" + OpMemberName %type__Globals 4 "LightPositionAndInvRadius" + OpMemberName %type__Globals 5 "ScreenToShadowMatrix" + OpMemberName %type__Globals 6 "ProjectionDepthBiasParameters" + OpMemberName %type__Globals 7 "ModulatedShadowColor" + OpMemberName %type__Globals 8 "ShadowTileOffsetAndSize" + OpName %_Globals "$Globals" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %Main "Main" + OpName %type_sampled_image "type.sampled.image" + OpDecorate %gl_LastFragData InputAttachmentIndex 0 + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_POSITION" + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %gl_LastFragData DescriptorSet 0 + OpDecorate %gl_LastFragData Binding 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %ShadowDepthTexture DescriptorSet 0 + OpDecorate %ShadowDepthTexture Binding 0 + OpDecorate %ShadowDepthTextureSampler DescriptorSet 0 + OpDecorate %ShadowDepthTextureSampler Binding 0 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 1 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 2 Offset 32 + OpMemberDecorate %type__Globals 3 Offset 36 + OpMemberDecorate %type__Globals 4 Offset 48 + OpMemberDecorate %type__Globals 5 Offset 64 + OpMemberDecorate %type__Globals 5 MatrixStride 16 + OpMemberDecorate %type__Globals 5 ColMajor + OpMemberDecorate %type__Globals 6 Offset 128 + OpMemberDecorate %type__Globals 7 Offset 144 + OpMemberDecorate %type__Globals 8 Offset 160 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %float_1 = OpConstant %float 1 + %int_58 = OpConstant %int 58 + %int_24 = OpConstant %int 24 + %int_5 = OpConstant %int 5 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %int_8 = OpConstant %int 8 +%float_0_999989986 = OpConstant %float 0.999989986 + %int_0 = OpConstant %int 0 + %float_0 = OpConstant %float 0 + %int_7 = OpConstant %int 7 + %float_0_5 = OpConstant %float 0.5 + %41 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %v2int = OpTypeVector %int 2 + %43 = OpConstantComposite %v2int %int_0 %int_0 + %44 = OpConstantComposite %v3float %float_0 %float_0 %float_0 +%type_subpass_image = OpTypeImage %float SubpassData 2 0 0 2 Unknown +%_ptr_UniformConstant_type_subpass_image = OpTypePointer UniformConstant %type_subpass_image +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type__Globals = OpTypeStruct %v3float %v4float %float %float %v4float %mat4v4float %v2float %v4float %v4float +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %53 = OpTypeFunction %void +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%type_sampled_image = OpTypeSampledImage %type_2d_image +%gl_LastFragData = OpVariable %_ptr_UniformConstant_type_subpass_image UniformConstant + %View = OpVariable %_ptr_Uniform_type_View Uniform +%ShadowDepthTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%ShadowDepthTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %57 = OpConstantNull %v4float + %58 = OpUndef %v4float + %Main = OpFunction %void None %53 + %59 = OpLabel + %60 = OpLoad %v4float %gl_FragCoord + %61 = OpVectorShuffle %v2float %60 %60 0 1 + %62 = OpAccessChain %_ptr_Uniform_v4float %View %int_58 + %63 = OpLoad %v4float %62 + %64 = OpVectorShuffle %v2float %63 %63 2 3 + %65 = OpFMul %v2float %61 %64 + %66 = OpLoad %type_subpass_image %gl_LastFragData + %67 = OpImageRead %v4float %66 %43 None + %68 = OpCompositeExtract %float %67 3 + %69 = OpAccessChain %_ptr_Uniform_v4float %View %int_24 + %70 = OpLoad %v4float %69 + %71 = OpVectorShuffle %v2float %70 %70 3 2 + %72 = OpFSub %v2float %65 %71 + %73 = OpVectorShuffle %v2float %70 %70 0 1 + %74 = OpFDiv %v2float %72 %73 + %75 = OpCompositeConstruct %v2float %68 %68 + %76 = OpFMul %v2float %74 %75 + %77 = OpCompositeExtract %float %76 0 + %78 = OpCompositeExtract %float %76 1 + %79 = OpCompositeConstruct %v4float %77 %78 %68 %float_1 + %80 = OpAccessChain %_ptr_Uniform_mat4v4float %_Globals %int_5 + %81 = OpLoad %mat4v4float %80 + %82 = OpMatrixTimesVector %v4float %81 %79 + %83 = OpCompositeExtract %float %82 2 + %84 = OpCompositeExtract %float %82 3 + %85 = OpCompositeConstruct %v3float %84 %84 %84 + %86 = OpVectorShuffle %v3float %82 %82 0 1 2 + %87 = OpFDiv %v3float %86 %85 + %88 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_8 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 2 3 + %91 = OpVectorShuffle %v2float %87 %57 0 1 + %92 = OpFMul %v2float %91 %90 + %93 = OpVectorShuffle %v2float %89 %89 0 1 + %94 = OpVectorShuffle %v2float %92 %57 0 1 + %95 = OpFAdd %v2float %94 %93 + %96 = OpExtInst %float %1 FMin %83 %float_0_999989986 + %97 = OpLoad %type_2d_image %ShadowDepthTexture + %98 = OpLoad %type_sampler %ShadowDepthTextureSampler + %99 = OpAccessChain %_ptr_Uniform_float %_Globals %int_0 %int_2 + %100 = OpLoad %float %99 + %101 = OpVectorShuffle %v2float %95 %57 0 1 + %102 = OpSampledImage %type_sampled_image %97 %98 + %103 = OpImageSampleExplicitLod %v4float %102 %101 Lod %float_0 + %104 = OpVectorShuffle %v3float %103 %103 0 0 0 + %105 = OpFMul %float %96 %100 + %106 = OpFSub %float %105 %float_1 + %107 = OpCompositeConstruct %v3float %100 %100 %100 + %108 = OpFMul %v3float %104 %107 + %109 = OpCompositeConstruct %v3float %106 %106 %106 + %110 = OpFSub %v3float %108 %109 + %111 = OpExtInst %v3float %1 FClamp %110 %44 %41 + %112 = OpCompositeExtract %float %111 0 + %113 = OpFSub %float %112 %float_0_5 + %114 = OpAccessChain %_ptr_Uniform_float %_Globals %int_3 + %115 = OpLoad %float %114 + %116 = OpFMul %float %113 %115 + %117 = OpFAdd %float %116 %float_0_5 + %118 = OpExtInst %float %1 FClamp %117 %float_0 %float_1 + %119 = OpFMul %float %118 %118 + %120 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 + %121 = OpLoad %float %120 + %122 = OpExtInst %float %1 FMix %float_1 %119 %121 + %123 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_7 + %124 = OpLoad %v4float %123 + %125 = OpVectorShuffle %v3float %124 %124 0 1 2 + %126 = OpCompositeConstruct %v3float %122 %122 %122 + %127 = OpExtInst %v3float %1 FMix %125 %41 %126 + %128 = OpVectorShuffle %v4float %58 %127 4 5 6 3 + %129 = OpCompositeInsert %v4float %float_0 %128 3 + OpStore %out_var_SV_Target0 %129 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/texture-atomics.asm.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/texture-atomics.asm.frag new file mode 100644 index 000000000..270a1978f --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/texture-atomics.asm.frag @@ -0,0 +1,242 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 180 +; Schema: 0 + OpCapability Shader + OpCapability SampledBuffer + OpCapability ImageBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %ShadowObjectCullPS "main" %in_var_TEXCOORD0 %gl_FragCoord %out_var_SV_Target0 + OpExecutionMode %ShadowObjectCullPS OriginUpperLeft + OpSource HLSL 600 + OpName %type_StructuredBuffer_v4float "type.StructuredBuffer.v4float" + OpName %CulledObjectBoxBounds "CulledObjectBoxBounds" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "ShadowTileListGroupSize" + OpName %_Globals "$Globals" + OpName %type_buffer_image "type.buffer.image" + OpName %RWShadowTileNumCulledObjects "RWShadowTileNumCulledObjects" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %ShadowObjectCullPS "ShadowObjectCullPS" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorate %in_var_TEXCOORD0 Flat + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_POSITION" + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD0 Location 0 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %CulledObjectBoxBounds DescriptorSet 0 + OpDecorate %CulledObjectBoxBounds Binding 1 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 2 + OpDecorate %RWShadowTileNumCulledObjects DescriptorSet 0 + OpDecorate %RWShadowTileNumCulledObjects Binding 0 + OpDecorate %_runtimearr_v4float ArrayStride 16 + OpMemberDecorate %type_StructuredBuffer_v4float 0 Offset 0 + OpMemberDecorate %type_StructuredBuffer_v4float 0 NonWritable + OpDecorate %type_StructuredBuffer_v4float BufferBlock + OpMemberDecorate %type__Globals 0 Offset 0 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_4 = OpConstant %uint 4 + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %uint_1 = OpConstant %uint 1 + %float_2 = OpConstant %float 2 + %27 = OpConstantComposite %v2float %float_2 %float_2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 +%float_n1000 = OpConstant %float -1000 + %int_2 = OpConstant %int 2 + %float_0_5 = OpConstant %float 0.5 + %33 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 +%float_500000 = OpConstant %float 500000 + %35 = OpConstantComposite %v3float %float_500000 %float_500000 %float_500000 +%float_n500000 = OpConstant %float -500000 + %37 = OpConstantComposite %v3float %float_n500000 %float_n500000 %float_n500000 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %int_6 = OpConstant %int 6 + %int_7 = OpConstant %int 7 + %int_8 = OpConstant %int 8 + %44 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %float_n1 = OpConstant %float -1 + %46 = OpConstantComposite %v3float %float_n1 %float_n1 %float_n1 + %uint_5 = OpConstant %uint 5 + %uint_0 = OpConstant %uint 0 + %uint_3 = OpConstant %uint 3 +%_runtimearr_v4float = OpTypeRuntimeArray %v4float +%type_StructuredBuffer_v4float = OpTypeStruct %_runtimearr_v4float +%_ptr_Uniform_type_StructuredBuffer_v4float = OpTypePointer Uniform %type_StructuredBuffer_v4float + %v2uint = OpTypeVector %uint 2 +%type__Globals = OpTypeStruct %v2uint +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%type_buffer_image = OpTypeImage %uint Buffer 2 0 0 2 R32ui +%_ptr_UniformConstant_type_buffer_image = OpTypePointer UniformConstant %type_buffer_image +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %58 = OpTypeFunction %void +%_ptr_Function_v3float = OpTypePointer Function %v3float + %uint_8 = OpConstant %uint 8 +%_arr_v3float_uint_8 = OpTypeArray %v3float %uint_8 +%_ptr_Function__arr_v3float_uint_8 = OpTypePointer Function %_arr_v3float_uint_8 +%_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %bool = OpTypeBool + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Image_uint = OpTypePointer Image %uint +%CulledObjectBoxBounds = OpVariable %_ptr_Uniform_type_StructuredBuffer_v4float Uniform + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%RWShadowTileNumCulledObjects = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_uint Input +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %70 = OpUndef %v3float + %71 = OpConstantNull %v3float +%ShadowObjectCullPS = OpFunction %void None %58 + %72 = OpLabel + %73 = OpVariable %_ptr_Function__arr_v3float_uint_8 Function + %74 = OpLoad %uint %in_var_TEXCOORD0 + %75 = OpLoad %v4float %gl_FragCoord + %76 = OpVectorShuffle %v2float %75 %75 0 1 + %77 = OpConvertFToU %v2uint %76 + %78 = OpCompositeExtract %uint %77 1 + %79 = OpAccessChain %_ptr_Uniform_v2uint %_Globals %int_0 + %80 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_0 %int_0 + %81 = OpLoad %uint %80 + %82 = OpIMul %uint %78 %81 + %83 = OpCompositeExtract %uint %77 0 + %84 = OpIAdd %uint %82 %83 + %85 = OpConvertUToF %float %83 + %86 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_0 %int_1 + %87 = OpLoad %uint %86 + %88 = OpISub %uint %87 %uint_1 + %89 = OpISub %uint %88 %78 + %90 = OpConvertUToF %float %89 + %91 = OpCompositeConstruct %v2float %85 %90 + %92 = OpLoad %v2uint %79 + %93 = OpConvertUToF %v2float %92 + %94 = OpFDiv %v2float %91 %93 + %95 = OpFMul %v2float %94 %27 + %96 = OpFSub %v2float %95 %29 + %97 = OpFAdd %v2float %91 %29 + %98 = OpFDiv %v2float %97 %93 + %99 = OpFMul %v2float %98 %27 + %100 = OpFSub %v2float %99 %29 + %101 = OpVectorShuffle %v3float %70 %100 3 4 2 + %102 = OpCompositeInsert %v3float %float_1 %101 2 + %103 = OpIMul %uint %74 %uint_5 + %104 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %103 + %105 = OpLoad %v4float %104 + %106 = OpVectorShuffle %v3float %105 %105 0 1 2 + %107 = OpIAdd %uint %103 %uint_1 + %108 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %107 + %109 = OpLoad %v4float %108 + %110 = OpVectorShuffle %v3float %109 %109 0 1 2 + %111 = OpVectorShuffle %v2float %109 %71 0 1 + %112 = OpVectorShuffle %v2float %96 %71 0 1 + %113 = OpFOrdGreaterThan %v2bool %111 %112 + %114 = OpAll %bool %113 + %115 = OpFOrdLessThan %v3bool %106 %102 + %116 = OpAll %bool %115 + %117 = OpLogicalAnd %bool %114 %116 + OpSelectionMerge %118 DontFlatten + OpBranchConditional %117 %119 %118 + %119 = OpLabel + %120 = OpFAdd %v3float %106 %110 + %121 = OpFMul %v3float %33 %120 + %122 = OpCompositeExtract %float %96 0 + %123 = OpCompositeExtract %float %96 1 + %124 = OpCompositeConstruct %v3float %122 %123 %float_n1000 + %125 = OpAccessChain %_ptr_Function_v3float %73 %int_0 + OpStore %125 %124 + %126 = OpCompositeExtract %float %100 0 + %127 = OpCompositeConstruct %v3float %126 %123 %float_n1000 + %128 = OpAccessChain %_ptr_Function_v3float %73 %int_1 + OpStore %128 %127 + %129 = OpCompositeExtract %float %100 1 + %130 = OpCompositeConstruct %v3float %122 %129 %float_n1000 + %131 = OpAccessChain %_ptr_Function_v3float %73 %int_2 + OpStore %131 %130 + %132 = OpCompositeConstruct %v3float %126 %129 %float_n1000 + %133 = OpAccessChain %_ptr_Function_v3float %73 %int_3 + OpStore %133 %132 + %134 = OpCompositeConstruct %v3float %122 %123 %float_1 + %135 = OpAccessChain %_ptr_Function_v3float %73 %int_4 + OpStore %135 %134 + %136 = OpCompositeConstruct %v3float %126 %123 %float_1 + %137 = OpAccessChain %_ptr_Function_v3float %73 %int_5 + OpStore %137 %136 + %138 = OpCompositeConstruct %v3float %122 %129 %float_1 + %139 = OpAccessChain %_ptr_Function_v3float %73 %int_6 + OpStore %139 %138 + %140 = OpCompositeConstruct %v3float %126 %129 %float_1 + %141 = OpAccessChain %_ptr_Function_v3float %73 %int_7 + OpStore %141 %140 + %142 = OpIAdd %uint %103 %uint_2 + %143 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %142 + %144 = OpLoad %v4float %143 + %145 = OpVectorShuffle %v3float %144 %144 0 1 2 + %146 = OpIAdd %uint %103 %uint_3 + %147 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %146 + %148 = OpLoad %v4float %147 + %149 = OpVectorShuffle %v3float %148 %148 0 1 2 + %150 = OpIAdd %uint %103 %uint_4 + %151 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %150 + %152 = OpLoad %v4float %151 + %153 = OpVectorShuffle %v3float %152 %152 0 1 2 + OpBranch %154 + %154 = OpLabel + %155 = OpPhi %v3float %37 %119 %156 %157 + %158 = OpPhi %v3float %35 %119 %159 %157 + %160 = OpPhi %int %int_0 %119 %161 %157 + %162 = OpSLessThan %bool %160 %int_8 + OpLoopMerge %163 %157 Unroll + OpBranchConditional %162 %157 %163 + %157 = OpLabel + %164 = OpAccessChain %_ptr_Function_v3float %73 %160 + %165 = OpLoad %v3float %164 + %166 = OpFSub %v3float %165 %121 + %167 = OpDot %float %166 %145 + %168 = OpDot %float %166 %149 + %169 = OpDot %float %166 %153 + %170 = OpCompositeConstruct %v3float %167 %168 %169 + %159 = OpExtInst %v3float %1 FMin %158 %170 + %156 = OpExtInst %v3float %1 FMax %155 %170 + %161 = OpIAdd %int %160 %int_1 + OpBranch %154 + %163 = OpLabel + %171 = OpFOrdLessThan %v3bool %158 %44 + %172 = OpAll %bool %171 + %173 = OpFOrdGreaterThan %v3bool %155 %46 + %174 = OpAll %bool %173 + %175 = OpLogicalAnd %bool %172 %174 + OpSelectionMerge %176 DontFlatten + OpBranchConditional %175 %177 %176 + %177 = OpLabel + %178 = OpImageTexelPointer %_ptr_Image_uint %RWShadowTileNumCulledObjects %84 %uint_0 + %179 = OpAtomicIAdd %uint %178 %uint_1 %uint_0 %uint_1 + OpBranch %176 + %176 = OpLabel + OpBranch %118 + %118 = OpLabel + OpStore %out_var_SV_Target0 %22 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag b/3rdparty/spirv-cross/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag new file mode 100644 index 000000000..270a1978f --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/frag/texture-atomics.asm.graphics-robust-access.frag @@ -0,0 +1,242 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 180 +; Schema: 0 + OpCapability Shader + OpCapability SampledBuffer + OpCapability ImageBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %ShadowObjectCullPS "main" %in_var_TEXCOORD0 %gl_FragCoord %out_var_SV_Target0 + OpExecutionMode %ShadowObjectCullPS OriginUpperLeft + OpSource HLSL 600 + OpName %type_StructuredBuffer_v4float "type.StructuredBuffer.v4float" + OpName %CulledObjectBoxBounds "CulledObjectBoxBounds" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "ShadowTileListGroupSize" + OpName %_Globals "$Globals" + OpName %type_buffer_image "type.buffer.image" + OpName %RWShadowTileNumCulledObjects "RWShadowTileNumCulledObjects" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %out_var_SV_Target0 "out.var.SV_Target0" + OpName %ShadowObjectCullPS "ShadowObjectCullPS" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorate %in_var_TEXCOORD0 Flat + OpDecorate %gl_FragCoord BuiltIn FragCoord + OpDecorateString %gl_FragCoord UserSemantic "SV_POSITION" + OpDecorateString %out_var_SV_Target0 UserSemantic "SV_Target0" + OpDecorate %in_var_TEXCOORD0 Location 0 + OpDecorate %out_var_SV_Target0 Location 0 + OpDecorate %CulledObjectBoxBounds DescriptorSet 0 + OpDecorate %CulledObjectBoxBounds Binding 1 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 2 + OpDecorate %RWShadowTileNumCulledObjects DescriptorSet 0 + OpDecorate %RWShadowTileNumCulledObjects Binding 0 + OpDecorate %_runtimearr_v4float ArrayStride 16 + OpMemberDecorate %type_StructuredBuffer_v4float 0 Offset 0 + OpMemberDecorate %type_StructuredBuffer_v4float 0 NonWritable + OpDecorate %type_StructuredBuffer_v4float BufferBlock + OpMemberDecorate %type__Globals 0 Offset 0 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_4 = OpConstant %uint 4 + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %uint_1 = OpConstant %uint 1 + %float_2 = OpConstant %float 2 + %27 = OpConstantComposite %v2float %float_2 %float_2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 +%float_n1000 = OpConstant %float -1000 + %int_2 = OpConstant %int 2 + %float_0_5 = OpConstant %float 0.5 + %33 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 +%float_500000 = OpConstant %float 500000 + %35 = OpConstantComposite %v3float %float_500000 %float_500000 %float_500000 +%float_n500000 = OpConstant %float -500000 + %37 = OpConstantComposite %v3float %float_n500000 %float_n500000 %float_n500000 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %int_6 = OpConstant %int 6 + %int_7 = OpConstant %int 7 + %int_8 = OpConstant %int 8 + %44 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %float_n1 = OpConstant %float -1 + %46 = OpConstantComposite %v3float %float_n1 %float_n1 %float_n1 + %uint_5 = OpConstant %uint 5 + %uint_0 = OpConstant %uint 0 + %uint_3 = OpConstant %uint 3 +%_runtimearr_v4float = OpTypeRuntimeArray %v4float +%type_StructuredBuffer_v4float = OpTypeStruct %_runtimearr_v4float +%_ptr_Uniform_type_StructuredBuffer_v4float = OpTypePointer Uniform %type_StructuredBuffer_v4float + %v2uint = OpTypeVector %uint 2 +%type__Globals = OpTypeStruct %v2uint +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%type_buffer_image = OpTypeImage %uint Buffer 2 0 0 2 R32ui +%_ptr_UniformConstant_type_buffer_image = OpTypePointer UniformConstant %type_buffer_image +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %58 = OpTypeFunction %void +%_ptr_Function_v3float = OpTypePointer Function %v3float + %uint_8 = OpConstant %uint 8 +%_arr_v3float_uint_8 = OpTypeArray %v3float %uint_8 +%_ptr_Function__arr_v3float_uint_8 = OpTypePointer Function %_arr_v3float_uint_8 +%_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %bool = OpTypeBool + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Image_uint = OpTypePointer Image %uint +%CulledObjectBoxBounds = OpVariable %_ptr_Uniform_type_StructuredBuffer_v4float Uniform + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%RWShadowTileNumCulledObjects = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_uint Input +%gl_FragCoord = OpVariable %_ptr_Input_v4float Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output + %70 = OpUndef %v3float + %71 = OpConstantNull %v3float +%ShadowObjectCullPS = OpFunction %void None %58 + %72 = OpLabel + %73 = OpVariable %_ptr_Function__arr_v3float_uint_8 Function + %74 = OpLoad %uint %in_var_TEXCOORD0 + %75 = OpLoad %v4float %gl_FragCoord + %76 = OpVectorShuffle %v2float %75 %75 0 1 + %77 = OpConvertFToU %v2uint %76 + %78 = OpCompositeExtract %uint %77 1 + %79 = OpAccessChain %_ptr_Uniform_v2uint %_Globals %int_0 + %80 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_0 %int_0 + %81 = OpLoad %uint %80 + %82 = OpIMul %uint %78 %81 + %83 = OpCompositeExtract %uint %77 0 + %84 = OpIAdd %uint %82 %83 + %85 = OpConvertUToF %float %83 + %86 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_0 %int_1 + %87 = OpLoad %uint %86 + %88 = OpISub %uint %87 %uint_1 + %89 = OpISub %uint %88 %78 + %90 = OpConvertUToF %float %89 + %91 = OpCompositeConstruct %v2float %85 %90 + %92 = OpLoad %v2uint %79 + %93 = OpConvertUToF %v2float %92 + %94 = OpFDiv %v2float %91 %93 + %95 = OpFMul %v2float %94 %27 + %96 = OpFSub %v2float %95 %29 + %97 = OpFAdd %v2float %91 %29 + %98 = OpFDiv %v2float %97 %93 + %99 = OpFMul %v2float %98 %27 + %100 = OpFSub %v2float %99 %29 + %101 = OpVectorShuffle %v3float %70 %100 3 4 2 + %102 = OpCompositeInsert %v3float %float_1 %101 2 + %103 = OpIMul %uint %74 %uint_5 + %104 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %103 + %105 = OpLoad %v4float %104 + %106 = OpVectorShuffle %v3float %105 %105 0 1 2 + %107 = OpIAdd %uint %103 %uint_1 + %108 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %107 + %109 = OpLoad %v4float %108 + %110 = OpVectorShuffle %v3float %109 %109 0 1 2 + %111 = OpVectorShuffle %v2float %109 %71 0 1 + %112 = OpVectorShuffle %v2float %96 %71 0 1 + %113 = OpFOrdGreaterThan %v2bool %111 %112 + %114 = OpAll %bool %113 + %115 = OpFOrdLessThan %v3bool %106 %102 + %116 = OpAll %bool %115 + %117 = OpLogicalAnd %bool %114 %116 + OpSelectionMerge %118 DontFlatten + OpBranchConditional %117 %119 %118 + %119 = OpLabel + %120 = OpFAdd %v3float %106 %110 + %121 = OpFMul %v3float %33 %120 + %122 = OpCompositeExtract %float %96 0 + %123 = OpCompositeExtract %float %96 1 + %124 = OpCompositeConstruct %v3float %122 %123 %float_n1000 + %125 = OpAccessChain %_ptr_Function_v3float %73 %int_0 + OpStore %125 %124 + %126 = OpCompositeExtract %float %100 0 + %127 = OpCompositeConstruct %v3float %126 %123 %float_n1000 + %128 = OpAccessChain %_ptr_Function_v3float %73 %int_1 + OpStore %128 %127 + %129 = OpCompositeExtract %float %100 1 + %130 = OpCompositeConstruct %v3float %122 %129 %float_n1000 + %131 = OpAccessChain %_ptr_Function_v3float %73 %int_2 + OpStore %131 %130 + %132 = OpCompositeConstruct %v3float %126 %129 %float_n1000 + %133 = OpAccessChain %_ptr_Function_v3float %73 %int_3 + OpStore %133 %132 + %134 = OpCompositeConstruct %v3float %122 %123 %float_1 + %135 = OpAccessChain %_ptr_Function_v3float %73 %int_4 + OpStore %135 %134 + %136 = OpCompositeConstruct %v3float %126 %123 %float_1 + %137 = OpAccessChain %_ptr_Function_v3float %73 %int_5 + OpStore %137 %136 + %138 = OpCompositeConstruct %v3float %122 %129 %float_1 + %139 = OpAccessChain %_ptr_Function_v3float %73 %int_6 + OpStore %139 %138 + %140 = OpCompositeConstruct %v3float %126 %129 %float_1 + %141 = OpAccessChain %_ptr_Function_v3float %73 %int_7 + OpStore %141 %140 + %142 = OpIAdd %uint %103 %uint_2 + %143 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %142 + %144 = OpLoad %v4float %143 + %145 = OpVectorShuffle %v3float %144 %144 0 1 2 + %146 = OpIAdd %uint %103 %uint_3 + %147 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %146 + %148 = OpLoad %v4float %147 + %149 = OpVectorShuffle %v3float %148 %148 0 1 2 + %150 = OpIAdd %uint %103 %uint_4 + %151 = OpAccessChain %_ptr_Uniform_v4float %CulledObjectBoxBounds %int_0 %150 + %152 = OpLoad %v4float %151 + %153 = OpVectorShuffle %v3float %152 %152 0 1 2 + OpBranch %154 + %154 = OpLabel + %155 = OpPhi %v3float %37 %119 %156 %157 + %158 = OpPhi %v3float %35 %119 %159 %157 + %160 = OpPhi %int %int_0 %119 %161 %157 + %162 = OpSLessThan %bool %160 %int_8 + OpLoopMerge %163 %157 Unroll + OpBranchConditional %162 %157 %163 + %157 = OpLabel + %164 = OpAccessChain %_ptr_Function_v3float %73 %160 + %165 = OpLoad %v3float %164 + %166 = OpFSub %v3float %165 %121 + %167 = OpDot %float %166 %145 + %168 = OpDot %float %166 %149 + %169 = OpDot %float %166 %153 + %170 = OpCompositeConstruct %v3float %167 %168 %169 + %159 = OpExtInst %v3float %1 FMin %158 %170 + %156 = OpExtInst %v3float %1 FMax %155 %170 + %161 = OpIAdd %int %160 %int_1 + OpBranch %154 + %163 = OpLabel + %171 = OpFOrdLessThan %v3bool %158 %44 + %172 = OpAll %bool %171 + %173 = OpFOrdGreaterThan %v3bool %155 %46 + %174 = OpAll %bool %173 + %175 = OpLogicalAnd %bool %172 %174 + OpSelectionMerge %176 DontFlatten + OpBranchConditional %175 %177 %176 + %177 = OpLabel + %178 = OpImageTexelPointer %_ptr_Image_uint %RWShadowTileNumCulledObjects %84 %uint_0 + %179 = OpAtomicIAdd %uint %178 %uint_1 %uint_0 %uint_1 + OpBranch %176 + %176 = OpLabel + OpBranch %118 + %118 = OpLabel + OpStore %out_var_SV_Target0 %22 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc new file mode 100644 index 000000000..4c70e14cb --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc @@ -0,0 +1,1158 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 598 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpCapability StorageImageExtendedFormats + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationControl %MainHull "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_COLOR0 %in_var_TEXCOORD0 %in_var_TEXCOORD4 %in_var_PRIMITIVE_ID %in_var_LIGHTMAP_ID %in_var_VS_To_DS_Position %gl_InvocationID %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_COLOR0 %out_var_TEXCOORD0 %out_var_TEXCOORD4 %out_var_PRIMITIVE_ID %out_var_LIGHTMAP_ID %out_var_VS_To_DS_Position %out_var_PN_POSITION %out_var_PN_DisplacementScales %out_var_PN_TessellationMultiplier %out_var_PN_WorldDisplacementMultiplier %gl_TessLevelOuter %gl_TessLevelInner %out_var_PN_POSITION9 + OpExecutionMode %MainHull Triangles + OpExecutionMode %MainHull SpacingFractionalOdd + OpExecutionMode %MainHull VertexOrderCw + OpExecutionMode %MainHull OutputVertices 3 + OpSource HLSL 600 + OpName %FPNTessellationHSToDS "FPNTessellationHSToDS" + OpMemberName %FPNTessellationHSToDS 0 "PassSpecificData" + OpMemberName %FPNTessellationHSToDS 1 "WorldPosition" + OpMemberName %FPNTessellationHSToDS 2 "DisplacementScale" + OpMemberName %FPNTessellationHSToDS 3 "TessellationMultiplier" + OpMemberName %FPNTessellationHSToDS 4 "WorldDisplacementMultiplier" + OpName %FBasePassVSToDS "FBasePassVSToDS" + OpMemberName %FBasePassVSToDS 0 "FactoryInterpolants" + OpMemberName %FBasePassVSToDS 1 "BasePassInterpolants" + OpMemberName %FBasePassVSToDS 2 "Position" + OpName %FVertexFactoryInterpolantsVSToDS "FVertexFactoryInterpolantsVSToDS" + OpMemberName %FVertexFactoryInterpolantsVSToDS 0 "InterpolantsVSToPS" + OpName %FVertexFactoryInterpolantsVSToPS "FVertexFactoryInterpolantsVSToPS" + OpMemberName %FVertexFactoryInterpolantsVSToPS 0 "TangentToWorld0" + OpMemberName %FVertexFactoryInterpolantsVSToPS 1 "TangentToWorld2" + OpMemberName %FVertexFactoryInterpolantsVSToPS 2 "Color" + OpMemberName %FVertexFactoryInterpolantsVSToPS 3 "TexCoords" + OpMemberName %FVertexFactoryInterpolantsVSToPS 4 "LightMapCoordinate" + OpMemberName %FVertexFactoryInterpolantsVSToPS 5 "PrimitiveId" + OpMemberName %FVertexFactoryInterpolantsVSToPS 6 "LightmapDataIndex" + OpName %FBasePassInterpolantsVSToDS "FBasePassInterpolantsVSToDS" + OpName %FSharedBasePassInterpolants "FSharedBasePassInterpolants" + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_StructuredBuffer_v4float "type.StructuredBuffer.v4float" + OpName %View_PrimitiveSceneData "View_PrimitiveSceneData" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_COLOR0 "in.var.COLOR0" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_TEXCOORD4 "in.var.TEXCOORD4" + OpName %in_var_PRIMITIVE_ID "in.var.PRIMITIVE_ID" + OpName %in_var_LIGHTMAP_ID "in.var.LIGHTMAP_ID" + OpName %in_var_VS_To_DS_Position "in.var.VS_To_DS_Position" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_COLOR0 "out.var.COLOR0" + OpName %out_var_TEXCOORD0 "out.var.TEXCOORD0" + OpName %out_var_TEXCOORD4 "out.var.TEXCOORD4" + OpName %out_var_PRIMITIVE_ID "out.var.PRIMITIVE_ID" + OpName %out_var_LIGHTMAP_ID "out.var.LIGHTMAP_ID" + OpName %out_var_VS_To_DS_Position "out.var.VS_To_DS_Position" + OpName %out_var_PN_POSITION "out.var.PN_POSITION" + OpName %out_var_PN_DisplacementScales "out.var.PN_DisplacementScales" + OpName %out_var_PN_TessellationMultiplier "out.var.PN_TessellationMultiplier" + OpName %out_var_PN_WorldDisplacementMultiplier "out.var.PN_WorldDisplacementMultiplier" + OpName %out_var_PN_POSITION9 "out.var.PN_POSITION9" + OpName %MainHull "MainHull" + OpName %param_var_I "param.var.I" + OpName %temp_var_hullMainRetVal "temp.var.hullMainRetVal" + OpName %if_merge "if.merge" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_COLOR0 UserSemantic "COLOR0" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_TEXCOORD4 UserSemantic "TEXCOORD4" + OpDecorateString %in_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorateString %in_var_LIGHTMAP_ID UserSemantic "LIGHTMAP_ID" + OpDecorateString %in_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorate %gl_InvocationID BuiltIn InvocationId + OpDecorateString %gl_InvocationID UserSemantic "SV_OutputControlPointID" + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_COLOR0 UserSemantic "COLOR0" + OpDecorateString %out_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %out_var_TEXCOORD4 UserSemantic "TEXCOORD4" + OpDecorateString %out_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorateString %out_var_LIGHTMAP_ID UserSemantic "LIGHTMAP_ID" + OpDecorateString %out_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %out_var_PN_POSITION UserSemantic "PN_POSITION" + OpDecorateString %out_var_PN_DisplacementScales UserSemantic "PN_DisplacementScales" + OpDecorateString %out_var_PN_TessellationMultiplier UserSemantic "PN_TessellationMultiplier" + OpDecorateString %out_var_PN_WorldDisplacementMultiplier UserSemantic "PN_WorldDisplacementMultiplier" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %out_var_PN_POSITION9 UserSemantic "PN_POSITION9" + OpDecorate %out_var_PN_POSITION9 Patch + OpDecorate %in_var_TEXCOORD10_centroid Location 0 + OpDecorate %in_var_TEXCOORD11_centroid Location 1 + OpDecorate %in_var_COLOR0 Location 2 + OpDecorate %in_var_TEXCOORD0 Location 3 + OpDecorate %in_var_TEXCOORD4 Location 4 + OpDecorate %in_var_PRIMITIVE_ID Location 5 + OpDecorate %in_var_LIGHTMAP_ID Location 6 + OpDecorate %in_var_VS_To_DS_Position Location 7 + OpDecorate %out_var_COLOR0 Location 0 + OpDecorate %out_var_LIGHTMAP_ID Location 1 + OpDecorate %out_var_PN_DisplacementScales Location 2 + OpDecorate %out_var_PN_POSITION Location 3 + OpDecorate %out_var_PN_POSITION9 Location 6 + OpDecorate %out_var_PN_TessellationMultiplier Location 7 + OpDecorate %out_var_PN_WorldDisplacementMultiplier Location 8 + OpDecorate %out_var_PRIMITIVE_ID Location 9 + OpDecorate %out_var_TEXCOORD0 Location 10 + OpDecorate %out_var_TEXCOORD10_centroid Location 11 + OpDecorate %out_var_TEXCOORD11_centroid Location 12 + OpDecorate %out_var_TEXCOORD4 Location 13 + OpDecorate %out_var_VS_To_DS_Position Location 14 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 1 + OpDecorate %View_PrimitiveSceneData DescriptorSet 0 + OpDecorate %View_PrimitiveSceneData Binding 0 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpDecorate %_runtimearr_v4float ArrayStride 16 + OpMemberDecorate %type_StructuredBuffer_v4float 0 Offset 0 + OpMemberDecorate %type_StructuredBuffer_v4float 0 NonWritable + OpDecorate %type_StructuredBuffer_v4float BufferBlock + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %uint_3 = OpConstant %uint 3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %float_2 = OpConstant %float 2 + %62 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 + %float_0_5 = OpConstant %float 0.5 + %int_3 = OpConstant %int 3 +%float_0_333000004 = OpConstant %float 0.333000004 + %float_1 = OpConstant %float 1 + %67 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_15 = OpConstant %float 15 + %69 = OpConstantComposite %v4float %float_15 %float_15 %float_15 %float_15 +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%FVertexFactoryInterpolantsVSToPS = OpTypeStruct %v4float %v4float %v4float %_arr_v4float_uint_1 %v4float %uint %uint +%FVertexFactoryInterpolantsVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToPS +%FSharedBasePassInterpolants = OpTypeStruct +%FBasePassInterpolantsVSToDS = OpTypeStruct %FSharedBasePassInterpolants +%FBasePassVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToDS %FBasePassInterpolantsVSToDS %v4float +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%FPNTessellationHSToDS = OpTypeStruct %FBasePassVSToDS %_arr_v4float_uint_3 %v3float %float %float + %v3int = OpTypeVector %int 3 + %73 = OpConstantComposite %v3int %int_0 %int_0 %int_0 + %74 = OpConstantComposite %v3int %int_3 %int_3 %int_3 + %float_0 = OpConstant %float 0 + %76 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %77 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %int_77 = OpConstant %int 77 + %int_6 = OpConstant %int 6 + %int_27 = OpConstant %int 27 + %81 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %82 = OpConstantComposite %v3int %int_2 %int_2 %int_2 + %uint_26 = OpConstant %uint 26 + %uint_12 = OpConstant %uint 12 + %uint_22 = OpConstant %uint 22 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%_runtimearr_v4float = OpTypeRuntimeArray %v4float +%type_StructuredBuffer_v4float = OpTypeStruct %_runtimearr_v4float +%_ptr_Uniform_type_StructuredBuffer_v4float = OpTypePointer Uniform %type_StructuredBuffer_v4float +%_arr_v4float_uint_12 = OpTypeArray %v4float %uint_12 +%_ptr_Input__arr_v4float_uint_12 = OpTypePointer Input %_arr_v4float_uint_12 +%_arr__arr_v4float_uint_1_uint_12 = OpTypeArray %_arr_v4float_uint_1 %uint_12 +%_ptr_Input__arr__arr_v4float_uint_1_uint_12 = OpTypePointer Input %_arr__arr_v4float_uint_1_uint_12 +%_arr_uint_uint_12 = OpTypeArray %uint %uint_12 +%_ptr_Input__arr_uint_uint_12 = OpTypePointer Input %_arr_uint_uint_12 +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output__arr_v4float_uint_3 = OpTypePointer Output %_arr_v4float_uint_3 +%_arr__arr_v4float_uint_1_uint_3 = OpTypeArray %_arr_v4float_uint_1 %uint_3 +%_ptr_Output__arr__arr_v4float_uint_1_uint_3 = OpTypePointer Output %_arr__arr_v4float_uint_1_uint_3 +%_arr_uint_uint_3 = OpTypeArray %uint %uint_3 +%_ptr_Output__arr_uint_uint_3 = OpTypePointer Output %_arr_uint_uint_3 +%_arr__arr_v4float_uint_3_uint_3 = OpTypeArray %_arr_v4float_uint_3 %uint_3 +%_ptr_Output__arr__arr_v4float_uint_3_uint_3 = OpTypePointer Output %_arr__arr_v4float_uint_3_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Output__arr_v3float_uint_3 = OpTypePointer Output %_arr_v3float_uint_3 +%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %111 = OpTypeFunction %void +%_arr_FBasePassVSToDS_uint_12 = OpTypeArray %FBasePassVSToDS %uint_12 +%_ptr_Function__arr_FBasePassVSToDS_uint_12 = OpTypePointer Function %_arr_FBasePassVSToDS_uint_12 +%_arr_FPNTessellationHSToDS_uint_3 = OpTypeArray %FPNTessellationHSToDS %uint_3 +%_ptr_Workgroup__arr_FPNTessellationHSToDS_uint_3 = OpTypePointer Workgroup %_arr_FPNTessellationHSToDS_uint_3 +%_ptr_Output__arr_v4float_uint_1 = OpTypePointer Output %_arr_v4float_uint_1 +%_ptr_Output_uint = OpTypePointer Output %uint +%_ptr_Output_v3float = OpTypePointer Output %v3float +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Workgroup_FPNTessellationHSToDS = OpTypePointer Workgroup %FPNTessellationHSToDS + %bool = OpTypeBool +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Workgroup_float = OpTypePointer Workgroup %float +%mat3v3float = OpTypeMatrix %v3float 3 +%_ptr_Function_FVertexFactoryInterpolantsVSToDS = OpTypePointer Function %FVertexFactoryInterpolantsVSToDS +%_ptr_Function_FVertexFactoryInterpolantsVSToPS = OpTypePointer Function %FVertexFactoryInterpolantsVSToPS +%_ptr_Function_FBasePassVSToDS = OpTypePointer Function %FBasePassVSToDS + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %View = OpVariable %_ptr_Uniform_type_View Uniform +%View_PrimitiveSceneData = OpVariable %_ptr_Uniform_type_StructuredBuffer_v4float Uniform +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_COLOR0 = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input__arr__arr_v4float_uint_1_uint_12 Input +%in_var_TEXCOORD4 = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_PRIMITIVE_ID = OpVariable %_ptr_Input__arr_uint_uint_12 Input +%in_var_LIGHTMAP_ID = OpVariable %_ptr_Input__arr_uint_uint_12 Input +%in_var_VS_To_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%gl_InvocationID = OpVariable %_ptr_Input_uint Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_COLOR0 = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_TEXCOORD0 = OpVariable %_ptr_Output__arr__arr_v4float_uint_1_uint_3 Output +%out_var_TEXCOORD4 = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_PRIMITIVE_ID = OpVariable %_ptr_Output__arr_uint_uint_3 Output +%out_var_LIGHTMAP_ID = OpVariable %_ptr_Output__arr_uint_uint_3 Output +%out_var_VS_To_DS_Position = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_PN_POSITION = OpVariable %_ptr_Output__arr__arr_v4float_uint_3_uint_3 Output +%out_var_PN_DisplacementScales = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%out_var_PN_TessellationMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%out_var_PN_WorldDisplacementMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output +%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output +%out_var_PN_POSITION9 = OpVariable %_ptr_Output_v4float Output + %133 = OpConstantNull %FSharedBasePassInterpolants + %134 = OpConstantComposite %FBasePassInterpolantsVSToDS %133 +%float_0_333333343 = OpConstant %float 0.333333343 + %136 = OpConstantComposite %v4float %float_0_333333343 %float_0_333333343 %float_0_333333343 %float_0_333333343 + %137 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 +%float_0_166666672 = OpConstant %float 0.166666672 + %139 = OpConstantComposite %v4float %float_0_166666672 %float_0_166666672 %float_0_166666672 %float_0_166666672 + %140 = OpUndef %v4float + +; XXX: Original asm used Function here, which is wrong. +; This patches the SPIR-V to be correct. +%temp_var_hullMainRetVal = OpVariable %_ptr_Workgroup__arr_FPNTessellationHSToDS_uint_3 Workgroup + + %MainHull = OpFunction %void None %111 + %141 = OpLabel +%param_var_I = OpVariable %_ptr_Function__arr_FBasePassVSToDS_uint_12 Function + %142 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD10_centroid + %143 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD11_centroid + %144 = OpLoad %_arr_v4float_uint_12 %in_var_COLOR0 + %145 = OpLoad %_arr__arr_v4float_uint_1_uint_12 %in_var_TEXCOORD0 + %146 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD4 + %147 = OpLoad %_arr_uint_uint_12 %in_var_PRIMITIVE_ID + %148 = OpLoad %_arr_uint_uint_12 %in_var_LIGHTMAP_ID + %149 = OpCompositeExtract %v4float %142 0 + %150 = OpCompositeExtract %v4float %143 0 + %151 = OpCompositeExtract %v4float %144 0 + %152 = OpCompositeExtract %_arr_v4float_uint_1 %145 0 + %153 = OpCompositeExtract %v4float %146 0 + %154 = OpCompositeExtract %uint %147 0 + %155 = OpCompositeExtract %uint %148 0 + %156 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %149 %150 %151 %152 %153 %154 %155 + %157 = OpCompositeExtract %v4float %142 1 + %158 = OpCompositeExtract %v4float %143 1 + %159 = OpCompositeExtract %v4float %144 1 + %160 = OpCompositeExtract %_arr_v4float_uint_1 %145 1 + %161 = OpCompositeExtract %v4float %146 1 + %162 = OpCompositeExtract %uint %147 1 + %163 = OpCompositeExtract %uint %148 1 + %164 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %157 %158 %159 %160 %161 %162 %163 + %165 = OpCompositeExtract %v4float %142 2 + %166 = OpCompositeExtract %v4float %143 2 + %167 = OpCompositeExtract %v4float %144 2 + %168 = OpCompositeExtract %_arr_v4float_uint_1 %145 2 + %169 = OpCompositeExtract %v4float %146 2 + %170 = OpCompositeExtract %uint %147 2 + %171 = OpCompositeExtract %uint %148 2 + %172 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %165 %166 %167 %168 %169 %170 %171 + %173 = OpCompositeExtract %v4float %142 3 + %174 = OpCompositeExtract %v4float %143 3 + %175 = OpCompositeExtract %v4float %144 3 + %176 = OpCompositeExtract %_arr_v4float_uint_1 %145 3 + %177 = OpCompositeExtract %v4float %146 3 + %178 = OpCompositeExtract %uint %147 3 + %179 = OpCompositeExtract %uint %148 3 + %180 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %173 %174 %175 %176 %177 %178 %179 + %181 = OpCompositeExtract %v4float %142 4 + %182 = OpCompositeExtract %v4float %143 4 + %183 = OpCompositeExtract %v4float %144 4 + %184 = OpCompositeExtract %_arr_v4float_uint_1 %145 4 + %185 = OpCompositeExtract %v4float %146 4 + %186 = OpCompositeExtract %uint %147 4 + %187 = OpCompositeExtract %uint %148 4 + %188 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %181 %182 %183 %184 %185 %186 %187 + %189 = OpCompositeExtract %v4float %142 5 + %190 = OpCompositeExtract %v4float %143 5 + %191 = OpCompositeExtract %v4float %144 5 + %192 = OpCompositeExtract %_arr_v4float_uint_1 %145 5 + %193 = OpCompositeExtract %v4float %146 5 + %194 = OpCompositeExtract %uint %147 5 + %195 = OpCompositeExtract %uint %148 5 + %196 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %189 %190 %191 %192 %193 %194 %195 + %197 = OpCompositeExtract %v4float %142 6 + %198 = OpCompositeExtract %v4float %143 6 + %199 = OpCompositeExtract %v4float %144 6 + %200 = OpCompositeExtract %_arr_v4float_uint_1 %145 6 + %201 = OpCompositeExtract %v4float %146 6 + %202 = OpCompositeExtract %uint %147 6 + %203 = OpCompositeExtract %uint %148 6 + %204 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %197 %198 %199 %200 %201 %202 %203 + %205 = OpCompositeExtract %v4float %142 7 + %206 = OpCompositeExtract %v4float %143 7 + %207 = OpCompositeExtract %v4float %144 7 + %208 = OpCompositeExtract %_arr_v4float_uint_1 %145 7 + %209 = OpCompositeExtract %v4float %146 7 + %210 = OpCompositeExtract %uint %147 7 + %211 = OpCompositeExtract %uint %148 7 + %212 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %205 %206 %207 %208 %209 %210 %211 + %213 = OpCompositeExtract %v4float %142 8 + %214 = OpCompositeExtract %v4float %143 8 + %215 = OpCompositeExtract %v4float %144 8 + %216 = OpCompositeExtract %_arr_v4float_uint_1 %145 8 + %217 = OpCompositeExtract %v4float %146 8 + %218 = OpCompositeExtract %uint %147 8 + %219 = OpCompositeExtract %uint %148 8 + %220 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %213 %214 %215 %216 %217 %218 %219 + %221 = OpCompositeExtract %v4float %142 9 + %222 = OpCompositeExtract %v4float %143 9 + %223 = OpCompositeExtract %v4float %144 9 + %224 = OpCompositeExtract %_arr_v4float_uint_1 %145 9 + %225 = OpCompositeExtract %v4float %146 9 + %226 = OpCompositeExtract %uint %147 9 + %227 = OpCompositeExtract %uint %148 9 + %228 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %221 %222 %223 %224 %225 %226 %227 + %229 = OpCompositeExtract %v4float %142 10 + %230 = OpCompositeExtract %v4float %143 10 + %231 = OpCompositeExtract %v4float %144 10 + %232 = OpCompositeExtract %_arr_v4float_uint_1 %145 10 + %233 = OpCompositeExtract %v4float %146 10 + %234 = OpCompositeExtract %uint %147 10 + %235 = OpCompositeExtract %uint %148 10 + %236 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %229 %230 %231 %232 %233 %234 %235 + %237 = OpCompositeExtract %v4float %142 11 + %238 = OpCompositeExtract %v4float %143 11 + %239 = OpCompositeExtract %v4float %144 11 + %240 = OpCompositeExtract %_arr_v4float_uint_1 %145 11 + %241 = OpCompositeExtract %v4float %146 11 + %242 = OpCompositeExtract %uint %147 11 + %243 = OpCompositeExtract %uint %148 11 + %244 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %237 %238 %239 %240 %241 %242 %243 + %245 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %156 + %246 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %164 + %247 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %172 + %248 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %180 + %249 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %188 + %250 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %196 + %251 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %204 + %252 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %212 + %253 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %220 + %254 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %228 + %255 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %236 + %256 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %244 + %257 = OpLoad %_arr_v4float_uint_12 %in_var_VS_To_DS_Position + %258 = OpCompositeExtract %v4float %257 0 + %259 = OpCompositeConstruct %FBasePassVSToDS %245 %134 %258 + %260 = OpCompositeExtract %v4float %257 1 + %261 = OpCompositeConstruct %FBasePassVSToDS %246 %134 %260 + %262 = OpCompositeExtract %v4float %257 2 + %263 = OpCompositeConstruct %FBasePassVSToDS %247 %134 %262 + %264 = OpCompositeExtract %v4float %257 3 + %265 = OpCompositeConstruct %FBasePassVSToDS %248 %134 %264 + %266 = OpCompositeExtract %v4float %257 4 + %267 = OpCompositeConstruct %FBasePassVSToDS %249 %134 %266 + %268 = OpCompositeExtract %v4float %257 5 + %269 = OpCompositeConstruct %FBasePassVSToDS %250 %134 %268 + %270 = OpCompositeExtract %v4float %257 6 + %271 = OpCompositeConstruct %FBasePassVSToDS %251 %134 %270 + %272 = OpCompositeExtract %v4float %257 7 + %273 = OpCompositeConstruct %FBasePassVSToDS %252 %134 %272 + %274 = OpCompositeExtract %v4float %257 8 + %275 = OpCompositeConstruct %FBasePassVSToDS %253 %134 %274 + %276 = OpCompositeExtract %v4float %257 9 + %277 = OpCompositeConstruct %FBasePassVSToDS %254 %134 %276 + %278 = OpCompositeExtract %v4float %257 10 + %279 = OpCompositeConstruct %FBasePassVSToDS %255 %134 %278 + %280 = OpCompositeExtract %v4float %257 11 + %281 = OpCompositeConstruct %FBasePassVSToDS %256 %134 %280 + %282 = OpCompositeConstruct %_arr_FBasePassVSToDS_uint_12 %259 %261 %263 %265 %267 %269 %271 %273 %275 %277 %279 %281 + OpStore %param_var_I %282 + %283 = OpLoad %uint %gl_InvocationID + %284 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %283 %int_0 + %285 = OpLoad %FVertexFactoryInterpolantsVSToDS %284 + %286 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %285 0 + %287 = OpCompositeExtract %v4float %286 0 + %288 = OpCompositeExtract %v4float %286 1 + %289 = OpVectorShuffle %v3float %287 %287 0 1 2 + %290 = OpVectorShuffle %v3float %288 %288 0 1 2 + %291 = OpExtInst %v3float %1 Cross %290 %289 + %292 = OpCompositeExtract %float %288 3 + %293 = OpCompositeConstruct %v3float %292 %292 %292 + %294 = OpFMul %v3float %291 %293 + %295 = OpCompositeConstruct %mat3v3float %289 %294 %290 + %296 = OpCompositeExtract %float %288 0 + %297 = OpCompositeExtract %float %288 1 + %298 = OpCompositeExtract %float %288 2 + %299 = OpCompositeConstruct %v4float %296 %297 %298 %float_0 + %300 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToPS %param_var_I %283 %int_0 %int_0 + %301 = OpLoad %FVertexFactoryInterpolantsVSToPS %300 + %302 = OpCompositeExtract %uint %301 5 + %303 = OpIMul %uint %302 %uint_26 + %304 = OpIAdd %uint %303 %uint_22 + %305 = OpAccessChain %_ptr_Uniform_v4float %View_PrimitiveSceneData %int_0 %304 + %306 = OpLoad %v4float %305 + %307 = OpVectorShuffle %v3float %306 %306 0 1 2 + %308 = OpVectorTimesMatrix %v3float %307 %295 + %309 = OpULessThan %bool %283 %uint_2 + %310 = OpIAdd %uint %283 %uint_1 + %311 = OpSelect %uint %309 %310 %uint_0 + %312 = OpIMul %uint %uint_2 %283 + %313 = OpIAdd %uint %uint_3 %312 + %314 = OpIAdd %uint %312 %uint_4 + %315 = OpAccessChain %_ptr_Function_FBasePassVSToDS %param_var_I %283 + %316 = OpLoad %FBasePassVSToDS %315 + %317 = OpAccessChain %_ptr_Function_v4float %param_var_I %283 %int_2 + %318 = OpLoad %v4float %317 + %319 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %311 %int_0 + %320 = OpLoad %FVertexFactoryInterpolantsVSToDS %319 + %321 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %320 0 + %322 = OpCompositeExtract %v4float %321 1 + %323 = OpCompositeExtract %float %322 0 + %324 = OpCompositeExtract %float %322 1 + %325 = OpCompositeExtract %float %322 2 + %326 = OpCompositeConstruct %v4float %323 %324 %325 %float_0 + %327 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %313 %int_0 + %328 = OpLoad %FVertexFactoryInterpolantsVSToDS %327 + %329 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %328 0 + %330 = OpCompositeExtract %v4float %329 1 + %331 = OpCompositeExtract %float %330 0 + %332 = OpCompositeExtract %float %330 1 + %333 = OpCompositeExtract %float %330 2 + %334 = OpCompositeConstruct %v4float %331 %332 %333 %float_0 + %335 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %314 %int_0 + %336 = OpLoad %FVertexFactoryInterpolantsVSToDS %335 + %337 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %336 0 + %338 = OpCompositeExtract %v4float %337 1 + %339 = OpCompositeExtract %float %338 0 + %340 = OpCompositeExtract %float %338 1 + %341 = OpCompositeExtract %float %338 2 + %342 = OpCompositeConstruct %v4float %339 %340 %341 %float_0 + %343 = OpLoad %v4float %317 + %344 = OpAccessChain %_ptr_Function_v4float %param_var_I %311 %int_2 + %345 = OpLoad %v4float %344 + %346 = OpFMul %v4float %62 %343 + %347 = OpFAdd %v4float %346 %345 + %348 = OpFSub %v4float %345 %343 + %349 = OpDot %float %348 %299 + %350 = OpCompositeConstruct %v4float %349 %349 %349 %349 + %351 = OpFMul %v4float %350 %299 + %352 = OpFSub %v4float %347 %351 + %353 = OpFMul %v4float %352 %136 + %354 = OpAccessChain %_ptr_Function_v4float %param_var_I %313 %int_2 + %355 = OpLoad %v4float %354 + %356 = OpAccessChain %_ptr_Function_v4float %param_var_I %314 %int_2 + %357 = OpLoad %v4float %356 + %358 = OpFMul %v4float %62 %355 + %359 = OpFAdd %v4float %358 %357 + %360 = OpFSub %v4float %357 %355 + %361 = OpDot %float %360 %334 + %362 = OpCompositeConstruct %v4float %361 %361 %361 %361 + %363 = OpFMul %v4float %362 %334 + %364 = OpFSub %v4float %359 %363 + %365 = OpFMul %v4float %364 %136 + %366 = OpFAdd %v4float %353 %365 + %367 = OpFMul %v4float %366 %137 + %368 = OpLoad %v4float %344 + %369 = OpLoad %v4float %317 + %370 = OpFMul %v4float %62 %368 + %371 = OpFAdd %v4float %370 %369 + %372 = OpFSub %v4float %369 %368 + %373 = OpDot %float %372 %326 + %374 = OpCompositeConstruct %v4float %373 %373 %373 %373 + %375 = OpFMul %v4float %374 %326 + %376 = OpFSub %v4float %371 %375 + %377 = OpFMul %v4float %376 %136 + %378 = OpLoad %v4float %356 + %379 = OpLoad %v4float %354 + %380 = OpFMul %v4float %62 %378 + %381 = OpFAdd %v4float %380 %379 + %382 = OpFSub %v4float %379 %378 + %383 = OpDot %float %382 %342 + %384 = OpCompositeConstruct %v4float %383 %383 %383 %383 + %385 = OpFMul %v4float %384 %342 + %386 = OpFSub %v4float %381 %385 + %387 = OpFMul %v4float %386 %136 + %388 = OpFAdd %v4float %377 %387 + %389 = OpFMul %v4float %388 %137 + %390 = OpCompositeConstruct %_arr_v4float_uint_3 %318 %367 %389 + %391 = OpCompositeConstruct %FPNTessellationHSToDS %316 %390 %308 %float_1 %float_1 + %392 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %316 0 + %393 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %392 0 + %394 = OpCompositeExtract %v4float %393 0 + %395 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD10_centroid %283 + OpStore %395 %394 + %396 = OpCompositeExtract %v4float %393 1 + %397 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD11_centroid %283 + OpStore %397 %396 + %398 = OpCompositeExtract %v4float %393 2 + %399 = OpAccessChain %_ptr_Output_v4float %out_var_COLOR0 %283 + OpStore %399 %398 + %400 = OpCompositeExtract %_arr_v4float_uint_1 %393 3 + %401 = OpAccessChain %_ptr_Output__arr_v4float_uint_1 %out_var_TEXCOORD0 %283 + OpStore %401 %400 + %402 = OpCompositeExtract %v4float %393 4 + %403 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD4 %283 + OpStore %403 %402 + %404 = OpCompositeExtract %uint %393 5 + %405 = OpAccessChain %_ptr_Output_uint %out_var_PRIMITIVE_ID %283 + OpStore %405 %404 + %406 = OpCompositeExtract %uint %393 6 + %407 = OpAccessChain %_ptr_Output_uint %out_var_LIGHTMAP_ID %283 + OpStore %407 %406 + %408 = OpCompositeExtract %v4float %316 2 + %409 = OpAccessChain %_ptr_Output_v4float %out_var_VS_To_DS_Position %283 + OpStore %409 %408 + %410 = OpAccessChain %_ptr_Output__arr_v4float_uint_3 %out_var_PN_POSITION %283 + OpStore %410 %390 + %411 = OpAccessChain %_ptr_Output_v3float %out_var_PN_DisplacementScales %283 + OpStore %411 %308 + %412 = OpAccessChain %_ptr_Output_float %out_var_PN_TessellationMultiplier %283 + OpStore %412 %float_1 + %413 = OpAccessChain %_ptr_Output_float %out_var_PN_WorldDisplacementMultiplier %283 + OpStore %413 %float_1 + %414 = OpAccessChain %_ptr_Workgroup_FPNTessellationHSToDS %temp_var_hullMainRetVal %283 + OpStore %414 %391 + OpControlBarrier %uint_2 %uint_4 %uint_0 + %415 = OpIEqual %bool %283 %uint_0 + OpSelectionMerge %if_merge None + OpBranchConditional %415 %416 %if_merge + %416 = OpLabel + %417 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_0 + %418 = OpLoad %mat4v4float %417 + %419 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_6 + %420 = OpLoad %mat4v4float %419 + %421 = OpAccessChain %_ptr_Uniform_v3float %View %int_27 + %422 = OpLoad %v3float %421 + %423 = OpAccessChain %_ptr_Uniform_float %View %int_77 + %424 = OpLoad %float %423 + %425 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_0 + %426 = OpLoad %v4float %425 + %427 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_1 + %428 = OpLoad %v4float %427 + %429 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_2 + %430 = OpLoad %v4float %429 + %431 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_0 + %432 = OpLoad %v4float %431 + %433 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_1 + %434 = OpLoad %v4float %433 + %435 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_2 + %436 = OpLoad %v4float %435 + %437 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_0 + %438 = OpLoad %v4float %437 + %439 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_1 + %440 = OpLoad %v4float %439 + %441 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_2 + %442 = OpLoad %v4float %441 + %443 = OpFAdd %v4float %428 %430 + %444 = OpFAdd %v4float %443 %434 + %445 = OpFAdd %v4float %444 %436 + %446 = OpFAdd %v4float %445 %440 + %447 = OpFAdd %v4float %446 %442 + %448 = OpFMul %v4float %447 %139 + %449 = OpFAdd %v4float %438 %432 + %450 = OpFAdd %v4float %449 %426 + %451 = OpFMul %v4float %450 %136 + %452 = OpFSub %v4float %448 %451 + %453 = OpFMul %v4float %452 %137 + %454 = OpFAdd %v4float %448 %453 + %455 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_1 %int_3 + %456 = OpLoad %float %455 + %457 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_2 %int_3 + %458 = OpLoad %float %457 + %459 = OpFAdd %float %456 %458 + %460 = OpFMul %float %float_0_5 %459 + %461 = OpCompositeInsert %v4float %460 %140 0 + %462 = OpLoad %float %457 + %463 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_0 %int_3 + %464 = OpLoad %float %463 + %465 = OpFAdd %float %462 %464 + %466 = OpFMul %float %float_0_5 %465 + %467 = OpCompositeInsert %v4float %466 %461 1 + %468 = OpLoad %float %463 + %469 = OpLoad %float %455 + %470 = OpFAdd %float %468 %469 + %471 = OpFMul %float %float_0_5 %470 + %472 = OpCompositeInsert %v4float %471 %467 2 + %473 = OpLoad %float %463 + %474 = OpLoad %float %455 + %475 = OpFAdd %float %473 %474 + %476 = OpLoad %float %457 + %477 = OpFAdd %float %475 %476 + %478 = OpFMul %float %float_0_333000004 %477 + %479 = OpCompositeInsert %v4float %478 %472 3 + %480 = OpVectorShuffle %v3float %426 %426 0 1 2 + %481 = OpVectorShuffle %v3float %432 %432 0 1 2 + %482 = OpVectorShuffle %v3float %438 %438 0 1 2 + OpBranch %483 + %483 = OpLabel + OpLoopMerge %484 %485 None + OpBranch %486 + %486 = OpLabel + %487 = OpMatrixTimesVector %v4float %420 %76 + %488 = OpCompositeExtract %float %426 0 + %489 = OpCompositeExtract %float %426 1 + %490 = OpCompositeExtract %float %426 2 + %491 = OpCompositeConstruct %v4float %488 %489 %490 %float_1 + %492 = OpMatrixTimesVector %v4float %418 %491 + %493 = OpVectorShuffle %v3float %492 %492 0 1 2 + %494 = OpVectorShuffle %v3float %487 %487 0 1 2 + %495 = OpFSub %v3float %493 %494 + %496 = OpCompositeExtract %float %492 3 + %497 = OpCompositeExtract %float %487 3 + %498 = OpFAdd %float %496 %497 + %499 = OpCompositeConstruct %v3float %498 %498 %498 + %500 = OpFOrdLessThan %v3bool %495 %499 + %501 = OpSelect %v3int %500 %81 %73 + %502 = OpFAdd %v3float %493 %494 + %503 = OpFNegate %float %496 + %504 = OpFSub %float %503 %497 + %505 = OpCompositeConstruct %v3float %504 %504 %504 + %506 = OpFOrdGreaterThan %v3bool %502 %505 + %507 = OpSelect %v3int %506 %81 %73 + %508 = OpIMul %v3int %82 %507 + %509 = OpIAdd %v3int %501 %508 + %510 = OpCompositeExtract %float %432 0 + %511 = OpCompositeExtract %float %432 1 + %512 = OpCompositeExtract %float %432 2 + %513 = OpCompositeConstruct %v4float %510 %511 %512 %float_1 + %514 = OpMatrixTimesVector %v4float %418 %513 + %515 = OpVectorShuffle %v3float %514 %514 0 1 2 + %516 = OpFSub %v3float %515 %494 + %517 = OpCompositeExtract %float %514 3 + %518 = OpFAdd %float %517 %497 + %519 = OpCompositeConstruct %v3float %518 %518 %518 + %520 = OpFOrdLessThan %v3bool %516 %519 + %521 = OpSelect %v3int %520 %81 %73 + %522 = OpFAdd %v3float %515 %494 + %523 = OpFNegate %float %517 + %524 = OpFSub %float %523 %497 + %525 = OpCompositeConstruct %v3float %524 %524 %524 + %526 = OpFOrdGreaterThan %v3bool %522 %525 + %527 = OpSelect %v3int %526 %81 %73 + %528 = OpIMul %v3int %82 %527 + %529 = OpIAdd %v3int %521 %528 + %530 = OpBitwiseOr %v3int %509 %529 + %531 = OpCompositeExtract %float %438 0 + %532 = OpCompositeExtract %float %438 1 + %533 = OpCompositeExtract %float %438 2 + %534 = OpCompositeConstruct %v4float %531 %532 %533 %float_1 + %535 = OpMatrixTimesVector %v4float %418 %534 + %536 = OpVectorShuffle %v3float %535 %535 0 1 2 + %537 = OpFSub %v3float %536 %494 + %538 = OpCompositeExtract %float %535 3 + %539 = OpFAdd %float %538 %497 + %540 = OpCompositeConstruct %v3float %539 %539 %539 + %541 = OpFOrdLessThan %v3bool %537 %540 + %542 = OpSelect %v3int %541 %81 %73 + %543 = OpFAdd %v3float %536 %494 + %544 = OpFNegate %float %538 + %545 = OpFSub %float %544 %497 + %546 = OpCompositeConstruct %v3float %545 %545 %545 + %547 = OpFOrdGreaterThan %v3bool %543 %546 + %548 = OpSelect %v3int %547 %81 %73 + %549 = OpIMul %v3int %82 %548 + %550 = OpIAdd %v3int %542 %549 + %551 = OpBitwiseOr %v3int %530 %550 + %552 = OpINotEqual %v3bool %551 %74 + %553 = OpAny %bool %552 + OpSelectionMerge %554 None + OpBranchConditional %553 %555 %554 + %555 = OpLabel + OpBranch %484 + %554 = OpLabel + %556 = OpFSub %v3float %480 %481 + %557 = OpFSub %v3float %481 %482 + %558 = OpFSub %v3float %482 %480 + %559 = OpFAdd %v3float %480 %481 + %560 = OpFMul %v3float %77 %559 + %561 = OpFSub %v3float %560 %422 + %562 = OpFAdd %v3float %481 %482 + %563 = OpFMul %v3float %77 %562 + %564 = OpFSub %v3float %563 %422 + %565 = OpFAdd %v3float %482 %480 + %566 = OpFMul %v3float %77 %565 + %567 = OpFSub %v3float %566 %422 + %568 = OpDot %float %557 %557 + %569 = OpDot %float %564 %564 + %570 = OpFDiv %float %568 %569 + %571 = OpExtInst %float %1 Sqrt %570 + %572 = OpDot %float %558 %558 + %573 = OpDot %float %567 %567 + %574 = OpFDiv %float %572 %573 + %575 = OpExtInst %float %1 Sqrt %574 + %576 = OpDot %float %556 %556 + %577 = OpDot %float %561 %561 + %578 = OpFDiv %float %576 %577 + %579 = OpExtInst %float %1 Sqrt %578 + %580 = OpCompositeConstruct %v4float %571 %575 %579 %float_1 + %581 = OpFAdd %float %571 %575 + %582 = OpFAdd %float %581 %579 + %583 = OpFMul %float %float_0_333000004 %582 + %584 = OpCompositeInsert %v4float %583 %580 3 + %585 = OpCompositeConstruct %v4float %424 %424 %424 %424 + %586 = OpFMul %v4float %585 %584 + OpBranch %484 + %485 = OpLabel + OpBranch %483 + %484 = OpLabel + %587 = OpPhi %v4float %76 %555 %586 %554 + %588 = OpFMul %v4float %479 %587 + %589 = OpExtInst %v4float %1 FClamp %588 %67 %69 + %590 = OpCompositeExtract %float %589 0 + %591 = OpCompositeExtract %float %589 1 + %592 = OpCompositeExtract %float %589 2 + %593 = OpCompositeExtract %float %589 3 + %594 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_0 + OpStore %594 %590 + %595 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_1 + OpStore %595 %591 + %596 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_2 + OpStore %596 %592 + %597 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %uint_0 + OpStore %597 %593 + OpStore %out_var_PN_POSITION9 %454 + OpBranch %if_merge + %if_merge = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc new file mode 100644 index 000000000..a146896b9 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc @@ -0,0 +1,1264 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 607 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationControl %MainHull "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_VS_To_DS_Position %in_var_VS_To_DS_VertexID %gl_InvocationID %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_VS_To_DS_Position %out_var_VS_To_DS_VertexID %out_var_PN_POSITION %out_var_PN_DisplacementScales %out_var_PN_TessellationMultiplier %out_var_PN_WorldDisplacementMultiplier %out_var_PN_DominantVertex %out_var_PN_DominantVertex1 %out_var_PN_DominantVertex2 %out_var_PN_DominantEdge %out_var_PN_DominantEdge1 %out_var_PN_DominantEdge2 %out_var_PN_DominantEdge3 %out_var_PN_DominantEdge4 %out_var_PN_DominantEdge5 %gl_TessLevelOuter %gl_TessLevelInner %out_var_PN_POSITION9 + OpExecutionMode %MainHull Triangles + OpExecutionMode %MainHull SpacingFractionalOdd + OpExecutionMode %MainHull VertexOrderCw + OpExecutionMode %MainHull OutputVertices 3 + OpSource HLSL 600 + OpName %FPNTessellationHSToDS "FPNTessellationHSToDS" + OpMemberName %FPNTessellationHSToDS 0 "PassSpecificData" + OpMemberName %FPNTessellationHSToDS 1 "WorldPosition" + OpMemberName %FPNTessellationHSToDS 2 "DisplacementScale" + OpMemberName %FPNTessellationHSToDS 3 "TessellationMultiplier" + OpMemberName %FPNTessellationHSToDS 4 "WorldDisplacementMultiplier" + OpMemberName %FPNTessellationHSToDS 5 "DominantVertex" + OpMemberName %FPNTessellationHSToDS 6 "DominantEdge" + OpName %FHitProxyVSToDS "FHitProxyVSToDS" + OpMemberName %FHitProxyVSToDS 0 "FactoryInterpolants" + OpMemberName %FHitProxyVSToDS 1 "Position" + OpMemberName %FHitProxyVSToDS 2 "VertexID" + OpName %FVertexFactoryInterpolantsVSToDS "FVertexFactoryInterpolantsVSToDS" + OpMemberName %FVertexFactoryInterpolantsVSToDS 0 "InterpolantsVSToPS" + OpName %FVertexFactoryInterpolantsVSToPS "FVertexFactoryInterpolantsVSToPS" + OpMemberName %FVertexFactoryInterpolantsVSToPS 0 "TangentToWorld0" + OpMemberName %FVertexFactoryInterpolantsVSToPS 1 "TangentToWorld2" + OpName %FHullShaderConstantDominantVertexData "FHullShaderConstantDominantVertexData" + OpMemberName %FHullShaderConstantDominantVertexData 0 "UV" + OpMemberName %FHullShaderConstantDominantVertexData 1 "Normal" + OpMemberName %FHullShaderConstantDominantVertexData 2 "Tangent" + OpName %FHullShaderConstantDominantEdgeData "FHullShaderConstantDominantEdgeData" + OpMemberName %FHullShaderConstantDominantEdgeData 0 "UV0" + OpMemberName %FHullShaderConstantDominantEdgeData 1 "UV1" + OpMemberName %FHullShaderConstantDominantEdgeData 2 "Normal0" + OpMemberName %FHullShaderConstantDominantEdgeData 3 "Normal1" + OpMemberName %FHullShaderConstantDominantEdgeData 4 "Tangent0" + OpMemberName %FHullShaderConstantDominantEdgeData 5 "Tangent1" + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_Primitive "type.Primitive" + OpMemberName %type_Primitive 0 "Primitive_LocalToWorld" + OpMemberName %type_Primitive 1 "Primitive_InvNonUniformScaleAndDeterminantSign" + OpMemberName %type_Primitive 2 "Primitive_ObjectWorldPositionAndRadius" + OpMemberName %type_Primitive 3 "Primitive_WorldToLocal" + OpMemberName %type_Primitive 4 "Primitive_PreviousLocalToWorld" + OpMemberName %type_Primitive 5 "Primitive_PreviousWorldToLocal" + OpMemberName %type_Primitive 6 "Primitive_ActorWorldPosition" + OpMemberName %type_Primitive 7 "Primitive_UseSingleSampleShadowFromStationaryLights" + OpMemberName %type_Primitive 8 "Primitive_ObjectBounds" + OpMemberName %type_Primitive 9 "Primitive_LpvBiasMultiplier" + OpMemberName %type_Primitive 10 "Primitive_DecalReceiverMask" + OpMemberName %type_Primitive 11 "Primitive_PerObjectGBufferData" + OpMemberName %type_Primitive 12 "Primitive_UseVolumetricLightmapShadowFromStationaryLights" + OpMemberName %type_Primitive 13 "Primitive_DrawsVelocity" + OpMemberName %type_Primitive 14 "Primitive_ObjectOrientation" + OpMemberName %type_Primitive 15 "Primitive_NonUniformScale" + OpMemberName %type_Primitive 16 "Primitive_LocalObjectBoundsMin" + OpMemberName %type_Primitive 17 "Primitive_LightingChannelMask" + OpMemberName %type_Primitive 18 "Primitive_LocalObjectBoundsMax" + OpMemberName %type_Primitive 19 "Primitive_LightmapDataIndex" + OpMemberName %type_Primitive 20 "Primitive_PreSkinnedLocalBounds" + OpMemberName %type_Primitive 21 "Primitive_SingleCaptureIndex" + OpMemberName %type_Primitive 22 "Primitive_OutputVelocity" + OpMemberName %type_Primitive 23 "PrePadding_Primitive_420" + OpMemberName %type_Primitive 24 "PrePadding_Primitive_424" + OpMemberName %type_Primitive 25 "PrePadding_Primitive_428" + OpMemberName %type_Primitive 26 "Primitive_CustomPrimitiveData" + OpName %Primitive "Primitive" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_VS_To_DS_Position "in.var.VS_To_DS_Position" + OpName %in_var_VS_To_DS_VertexID "in.var.VS_To_DS_VertexID" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_VS_To_DS_Position "out.var.VS_To_DS_Position" + OpName %out_var_VS_To_DS_VertexID "out.var.VS_To_DS_VertexID" + OpName %out_var_PN_POSITION "out.var.PN_POSITION" + OpName %out_var_PN_DisplacementScales "out.var.PN_DisplacementScales" + OpName %out_var_PN_TessellationMultiplier "out.var.PN_TessellationMultiplier" + OpName %out_var_PN_WorldDisplacementMultiplier "out.var.PN_WorldDisplacementMultiplier" + OpName %out_var_PN_DominantVertex "out.var.PN_DominantVertex" + OpName %out_var_PN_DominantVertex1 "out.var.PN_DominantVertex1" + OpName %out_var_PN_DominantVertex2 "out.var.PN_DominantVertex2" + OpName %out_var_PN_DominantEdge "out.var.PN_DominantEdge" + OpName %out_var_PN_DominantEdge1 "out.var.PN_DominantEdge1" + OpName %out_var_PN_DominantEdge2 "out.var.PN_DominantEdge2" + OpName %out_var_PN_DominantEdge3 "out.var.PN_DominantEdge3" + OpName %out_var_PN_DominantEdge4 "out.var.PN_DominantEdge4" + OpName %out_var_PN_DominantEdge5 "out.var.PN_DominantEdge5" + OpName %out_var_PN_POSITION9 "out.var.PN_POSITION9" + OpName %MainHull "MainHull" + OpName %param_var_I "param.var.I" + OpName %temp_var_hullMainRetVal "temp.var.hullMainRetVal" + OpName %if_merge "if.merge" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %in_var_VS_To_DS_VertexID UserSemantic "VS_To_DS_VertexID" + OpDecorate %gl_InvocationID BuiltIn InvocationId + OpDecorateString %gl_InvocationID UserSemantic "SV_OutputControlPointID" + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %out_var_VS_To_DS_VertexID UserSemantic "VS_To_DS_VertexID" + OpDecorateString %out_var_PN_POSITION UserSemantic "PN_POSITION" + OpDecorateString %out_var_PN_DisplacementScales UserSemantic "PN_DisplacementScales" + OpDecorateString %out_var_PN_TessellationMultiplier UserSemantic "PN_TessellationMultiplier" + OpDecorateString %out_var_PN_WorldDisplacementMultiplier UserSemantic "PN_WorldDisplacementMultiplier" + OpDecorateString %out_var_PN_DominantVertex UserSemantic "PN_DominantVertex" + OpDecorateString %out_var_PN_DominantVertex1 UserSemantic "PN_DominantVertex" + OpDecorateString %out_var_PN_DominantVertex2 UserSemantic "PN_DominantVertex" + OpDecorateString %out_var_PN_DominantEdge UserSemantic "PN_DominantEdge" + OpDecorateString %out_var_PN_DominantEdge1 UserSemantic "PN_DominantEdge" + OpDecorateString %out_var_PN_DominantEdge2 UserSemantic "PN_DominantEdge" + OpDecorateString %out_var_PN_DominantEdge3 UserSemantic "PN_DominantEdge" + OpDecorateString %out_var_PN_DominantEdge4 UserSemantic "PN_DominantEdge" + OpDecorateString %out_var_PN_DominantEdge5 UserSemantic "PN_DominantEdge" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %out_var_PN_POSITION9 UserSemantic "PN_POSITION9" + OpDecorate %out_var_PN_POSITION9 Patch + OpDecorate %in_var_TEXCOORD10_centroid Location 0 + OpDecorate %in_var_TEXCOORD11_centroid Location 1 + OpDecorate %in_var_VS_To_DS_Position Location 2 + OpDecorate %in_var_VS_To_DS_VertexID Location 3 + OpDecorate %out_var_PN_DisplacementScales Location 0 + OpDecorate %out_var_PN_DominantEdge Location 1 + OpDecorate %out_var_PN_DominantEdge1 Location 2 + OpDecorate %out_var_PN_DominantEdge2 Location 3 + OpDecorate %out_var_PN_DominantEdge3 Location 4 + OpDecorate %out_var_PN_DominantEdge4 Location 5 + OpDecorate %out_var_PN_DominantEdge5 Location 6 + OpDecorate %out_var_PN_DominantVertex Location 7 + OpDecorate %out_var_PN_DominantVertex1 Location 8 + OpDecorate %out_var_PN_DominantVertex2 Location 9 + OpDecorate %out_var_PN_POSITION Location 10 + OpDecorate %out_var_PN_POSITION9 Location 13 + OpDecorate %out_var_PN_TessellationMultiplier Location 14 + OpDecorate %out_var_PN_WorldDisplacementMultiplier Location 15 + OpDecorate %out_var_TEXCOORD10_centroid Location 16 + OpDecorate %out_var_TEXCOORD11_centroid Location 17 + OpDecorate %out_var_VS_To_DS_Position Location 18 + OpDecorate %out_var_VS_To_DS_VertexID Location 19 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %Primitive DescriptorSet 0 + OpDecorate %Primitive Binding 1 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpDecorate %type_View Block + OpMemberDecorate %type_Primitive 0 Offset 0 + OpMemberDecorate %type_Primitive 0 MatrixStride 16 + OpMemberDecorate %type_Primitive 0 ColMajor + OpMemberDecorate %type_Primitive 1 Offset 64 + OpMemberDecorate %type_Primitive 2 Offset 80 + OpMemberDecorate %type_Primitive 3 Offset 96 + OpMemberDecorate %type_Primitive 3 MatrixStride 16 + OpMemberDecorate %type_Primitive 3 ColMajor + OpMemberDecorate %type_Primitive 4 Offset 160 + OpMemberDecorate %type_Primitive 4 MatrixStride 16 + OpMemberDecorate %type_Primitive 4 ColMajor + OpMemberDecorate %type_Primitive 5 Offset 224 + OpMemberDecorate %type_Primitive 5 MatrixStride 16 + OpMemberDecorate %type_Primitive 5 ColMajor + OpMemberDecorate %type_Primitive 6 Offset 288 + OpMemberDecorate %type_Primitive 7 Offset 300 + OpMemberDecorate %type_Primitive 8 Offset 304 + OpMemberDecorate %type_Primitive 9 Offset 316 + OpMemberDecorate %type_Primitive 10 Offset 320 + OpMemberDecorate %type_Primitive 11 Offset 324 + OpMemberDecorate %type_Primitive 12 Offset 328 + OpMemberDecorate %type_Primitive 13 Offset 332 + OpMemberDecorate %type_Primitive 14 Offset 336 + OpMemberDecorate %type_Primitive 15 Offset 352 + OpMemberDecorate %type_Primitive 16 Offset 368 + OpMemberDecorate %type_Primitive 17 Offset 380 + OpMemberDecorate %type_Primitive 18 Offset 384 + OpMemberDecorate %type_Primitive 19 Offset 396 + OpMemberDecorate %type_Primitive 20 Offset 400 + OpMemberDecorate %type_Primitive 21 Offset 412 + OpMemberDecorate %type_Primitive 22 Offset 416 + OpMemberDecorate %type_Primitive 23 Offset 420 + OpMemberDecorate %type_Primitive 24 Offset 424 + OpMemberDecorate %type_Primitive 25 Offset 428 + OpMemberDecorate %type_Primitive 26 Offset 432 + OpDecorate %type_Primitive Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %uint_3 = OpConstant %uint 3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %float_2 = OpConstant %float 2 + %63 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 + %float_0_5 = OpConstant %float 0.5 + %int_3 = OpConstant %int 3 +%float_0_333000004 = OpConstant %float 0.333000004 + %float_1 = OpConstant %float 1 + %68 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_15 = OpConstant %float 15 + %70 = OpConstantComposite %v4float %float_15 %float_15 %float_15 %float_15 +%FVertexFactoryInterpolantsVSToPS = OpTypeStruct %v4float %v4float +%FVertexFactoryInterpolantsVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToPS +%FHitProxyVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToDS %v4float %uint +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%FHullShaderConstantDominantVertexData = OpTypeStruct %v2float %v4float %v3float +%FHullShaderConstantDominantEdgeData = OpTypeStruct %v2float %v2float %v4float %v4float %v3float %v3float +%FPNTessellationHSToDS = OpTypeStruct %FHitProxyVSToDS %_arr_v4float_uint_3 %v3float %float %float %FHullShaderConstantDominantVertexData %FHullShaderConstantDominantEdgeData + %uint_9 = OpConstant %uint 9 + %v3int = OpTypeVector %int 3 + %74 = OpConstantComposite %v3int %int_0 %int_0 %int_0 + %75 = OpConstantComposite %v3int %int_3 %int_3 %int_3 + %float_0 = OpConstant %float 0 + %77 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %78 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %int_78 = OpConstant %int 78 + %int_15 = OpConstant %int 15 + %int_7 = OpConstant %int 7 + %int_28 = OpConstant %int 28 + %83 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %84 = OpConstantComposite %v3int %int_2 %int_2 %int_2 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_Primitive = OpTypeStruct %mat4v4float %v4float %v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %float %float %float %float %v4float %v4float %v3float %uint %v3float %uint %v3float %int %uint %uint %uint %uint %_arr_v4float_uint_4 +%_ptr_Uniform_type_Primitive = OpTypePointer Uniform %type_Primitive + %uint_12 = OpConstant %uint 12 +%_arr_v4float_uint_12 = OpTypeArray %v4float %uint_12 +%_ptr_Input__arr_v4float_uint_12 = OpTypePointer Input %_arr_v4float_uint_12 +%_arr_uint_uint_12 = OpTypeArray %uint %uint_12 +%_ptr_Input__arr_uint_uint_12 = OpTypePointer Input %_arr_uint_uint_12 +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output__arr_v4float_uint_3 = OpTypePointer Output %_arr_v4float_uint_3 +%_arr_uint_uint_3 = OpTypeArray %uint %uint_3 +%_ptr_Output__arr_uint_uint_3 = OpTypePointer Output %_arr_uint_uint_3 +%_arr__arr_v4float_uint_3_uint_3 = OpTypeArray %_arr_v4float_uint_3 %uint_3 +%_ptr_Output__arr__arr_v4float_uint_3_uint_3 = OpTypePointer Output %_arr__arr_v4float_uint_3_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Output__arr_v3float_uint_3 = OpTypePointer Output %_arr_v3float_uint_3 +%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3 +%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3 +%_ptr_Output__arr_v2float_uint_3 = OpTypePointer Output %_arr_v2float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %109 = OpTypeFunction %void +%_arr_FHitProxyVSToDS_uint_12 = OpTypeArray %FHitProxyVSToDS %uint_12 +%_ptr_Function__arr_FHitProxyVSToDS_uint_12 = OpTypePointer Function %_arr_FHitProxyVSToDS_uint_12 +%_arr_FPNTessellationHSToDS_uint_3 = OpTypeArray %FPNTessellationHSToDS %uint_3 +%_ptr_Function__arr_FPNTessellationHSToDS_uint_3 = OpTypePointer Function %_arr_FPNTessellationHSToDS_uint_3 +%_ptr_Workgroup__arr_FPNTessellationHSToDS_uint_3 = OpTypePointer Workgroup %_arr_FPNTessellationHSToDS_uint_3 +%_ptr_Output_uint = OpTypePointer Output %uint +%_ptr_Output_v3float = OpTypePointer Output %v3float +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Output_v2float = OpTypePointer Output %v2float +%_ptr_Function_FPNTessellationHSToDS = OpTypePointer Function %FPNTessellationHSToDS +%_ptr_Workgroup_FPNTessellationHSToDS = OpTypePointer Workgroup %FPNTessellationHSToDS + %bool = OpTypeBool +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float +%_ptr_Workgroup_float = OpTypePointer Workgroup %float +%mat3v3float = OpTypeMatrix %v3float 3 +%_ptr_Function_FVertexFactoryInterpolantsVSToDS = OpTypePointer Function %FVertexFactoryInterpolantsVSToDS +%_ptr_Function_FHitProxyVSToDS = OpTypePointer Function %FHitProxyVSToDS + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float + %View = OpVariable %_ptr_Uniform_type_View Uniform + %Primitive = OpVariable %_ptr_Uniform_type_Primitive Uniform +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_VS_To_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_VS_To_DS_VertexID = OpVariable %_ptr_Input__arr_uint_uint_12 Input +%gl_InvocationID = OpVariable %_ptr_Input_uint Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_VS_To_DS_Position = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_VS_To_DS_VertexID = OpVariable %_ptr_Output__arr_uint_uint_3 Output +%out_var_PN_POSITION = OpVariable %_ptr_Output__arr__arr_v4float_uint_3_uint_3 Output +%out_var_PN_DisplacementScales = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%out_var_PN_TessellationMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%out_var_PN_WorldDisplacementMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%out_var_PN_DominantVertex = OpVariable %_ptr_Output__arr_v2float_uint_3 Output +%out_var_PN_DominantVertex1 = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_PN_DominantVertex2 = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%out_var_PN_DominantEdge = OpVariable %_ptr_Output__arr_v2float_uint_3 Output +%out_var_PN_DominantEdge1 = OpVariable %_ptr_Output__arr_v2float_uint_3 Output +%out_var_PN_DominantEdge2 = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_PN_DominantEdge3 = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_PN_DominantEdge4 = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%out_var_PN_DominantEdge5 = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output +%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output +%out_var_PN_POSITION9 = OpVariable %_ptr_Output_v4float Output + %130 = OpConstantNull %v2float +%float_0_333333343 = OpConstant %float 0.333333343 + %132 = OpConstantComposite %v4float %float_0_333333343 %float_0_333333343 %float_0_333333343 %float_0_333333343 + %133 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 +%float_0_166666672 = OpConstant %float 0.166666672 + %135 = OpConstantComposite %v4float %float_0_166666672 %float_0_166666672 %float_0_166666672 %float_0_166666672 + %136 = OpUndef %v4float + +; XXX: Original asm used Function here, which is wrong. +; This patches the SPIR-V to be correct. +%temp_var_hullMainRetVal = OpVariable %_ptr_Workgroup__arr_FPNTessellationHSToDS_uint_3 Workgroup + + %MainHull = OpFunction %void None %109 + %137 = OpLabel +%param_var_I = OpVariable %_ptr_Function__arr_FHitProxyVSToDS_uint_12 Function + %138 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD10_centroid + %139 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD11_centroid + %140 = OpCompositeExtract %v4float %138 0 + %141 = OpCompositeExtract %v4float %139 0 + %142 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %140 %141 + %143 = OpCompositeExtract %v4float %138 1 + %144 = OpCompositeExtract %v4float %139 1 + %145 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %143 %144 + %146 = OpCompositeExtract %v4float %138 2 + %147 = OpCompositeExtract %v4float %139 2 + %148 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %146 %147 + %149 = OpCompositeExtract %v4float %138 3 + %150 = OpCompositeExtract %v4float %139 3 + %151 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %149 %150 + %152 = OpCompositeExtract %v4float %138 4 + %153 = OpCompositeExtract %v4float %139 4 + %154 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %152 %153 + %155 = OpCompositeExtract %v4float %138 5 + %156 = OpCompositeExtract %v4float %139 5 + %157 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %155 %156 + %158 = OpCompositeExtract %v4float %138 6 + %159 = OpCompositeExtract %v4float %139 6 + %160 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %158 %159 + %161 = OpCompositeExtract %v4float %138 7 + %162 = OpCompositeExtract %v4float %139 7 + %163 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %161 %162 + %164 = OpCompositeExtract %v4float %138 8 + %165 = OpCompositeExtract %v4float %139 8 + %166 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %164 %165 + %167 = OpCompositeExtract %v4float %138 9 + %168 = OpCompositeExtract %v4float %139 9 + %169 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %167 %168 + %170 = OpCompositeExtract %v4float %138 10 + %171 = OpCompositeExtract %v4float %139 10 + %172 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %170 %171 + %173 = OpCompositeExtract %v4float %138 11 + %174 = OpCompositeExtract %v4float %139 11 + %175 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %173 %174 + %176 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %142 + %177 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %145 + %178 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %148 + %179 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %151 + %180 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %154 + %181 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %157 + %182 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %160 + %183 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %163 + %184 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %166 + %185 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %169 + %186 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %172 + %187 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %175 + %188 = OpLoad %_arr_v4float_uint_12 %in_var_VS_To_DS_Position + %189 = OpLoad %_arr_uint_uint_12 %in_var_VS_To_DS_VertexID + %190 = OpCompositeExtract %v4float %188 0 + %191 = OpCompositeExtract %uint %189 0 + %192 = OpCompositeConstruct %FHitProxyVSToDS %176 %190 %191 + %193 = OpCompositeExtract %v4float %188 1 + %194 = OpCompositeExtract %uint %189 1 + %195 = OpCompositeConstruct %FHitProxyVSToDS %177 %193 %194 + %196 = OpCompositeExtract %v4float %188 2 + %197 = OpCompositeExtract %uint %189 2 + %198 = OpCompositeConstruct %FHitProxyVSToDS %178 %196 %197 + %199 = OpCompositeExtract %v4float %188 3 + %200 = OpCompositeExtract %uint %189 3 + %201 = OpCompositeConstruct %FHitProxyVSToDS %179 %199 %200 + %202 = OpCompositeExtract %v4float %188 4 + %203 = OpCompositeExtract %uint %189 4 + %204 = OpCompositeConstruct %FHitProxyVSToDS %180 %202 %203 + %205 = OpCompositeExtract %v4float %188 5 + %206 = OpCompositeExtract %uint %189 5 + %207 = OpCompositeConstruct %FHitProxyVSToDS %181 %205 %206 + %208 = OpCompositeExtract %v4float %188 6 + %209 = OpCompositeExtract %uint %189 6 + %210 = OpCompositeConstruct %FHitProxyVSToDS %182 %208 %209 + %211 = OpCompositeExtract %v4float %188 7 + %212 = OpCompositeExtract %uint %189 7 + %213 = OpCompositeConstruct %FHitProxyVSToDS %183 %211 %212 + %214 = OpCompositeExtract %v4float %188 8 + %215 = OpCompositeExtract %uint %189 8 + %216 = OpCompositeConstruct %FHitProxyVSToDS %184 %214 %215 + %217 = OpCompositeExtract %v4float %188 9 + %218 = OpCompositeExtract %uint %189 9 + %219 = OpCompositeConstruct %FHitProxyVSToDS %185 %217 %218 + %220 = OpCompositeExtract %v4float %188 10 + %221 = OpCompositeExtract %uint %189 10 + %222 = OpCompositeConstruct %FHitProxyVSToDS %186 %220 %221 + %223 = OpCompositeExtract %v4float %188 11 + %224 = OpCompositeExtract %uint %189 11 + %225 = OpCompositeConstruct %FHitProxyVSToDS %187 %223 %224 + %226 = OpCompositeConstruct %_arr_FHitProxyVSToDS_uint_12 %192 %195 %198 %201 %204 %207 %210 %213 %216 %219 %222 %225 + OpStore %param_var_I %226 + %227 = OpLoad %uint %gl_InvocationID + %228 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %227 %int_0 + %229 = OpLoad %FVertexFactoryInterpolantsVSToDS %228 + %230 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %229 0 + %231 = OpCompositeExtract %v4float %230 0 + %232 = OpCompositeExtract %v4float %230 1 + %233 = OpVectorShuffle %v3float %231 %231 0 1 2 + %234 = OpVectorShuffle %v3float %232 %232 0 1 2 + %235 = OpExtInst %v3float %1 Cross %234 %233 + %236 = OpCompositeExtract %float %232 3 + %237 = OpCompositeConstruct %v3float %236 %236 %236 + %238 = OpFMul %v3float %235 %237 + %239 = OpCompositeConstruct %mat3v3float %233 %238 %234 + %240 = OpCompositeExtract %float %232 0 + %241 = OpCompositeExtract %float %232 1 + %242 = OpCompositeExtract %float %232 2 + %243 = OpCompositeConstruct %v4float %240 %241 %242 %float_0 + %244 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_15 + %245 = OpLoad %v4float %244 + %246 = OpVectorShuffle %v3float %245 %245 0 1 2 + %247 = OpVectorTimesMatrix %v3float %246 %239 + %248 = OpULessThan %bool %227 %uint_2 + %249 = OpIAdd %uint %227 %uint_1 + %250 = OpSelect %uint %248 %249 %uint_0 + %251 = OpIMul %uint %uint_2 %227 + %252 = OpIAdd %uint %uint_3 %251 + %253 = OpIAdd %uint %251 %uint_4 + %254 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %227 + %255 = OpLoad %FHitProxyVSToDS %254 + %256 = OpAccessChain %_ptr_Function_v4float %param_var_I %227 %int_1 + %257 = OpLoad %v4float %256 + %258 = OpULessThan %bool %250 %uint_2 + %259 = OpIAdd %uint %250 %uint_1 + %260 = OpSelect %uint %258 %259 %uint_0 + %261 = OpIMul %uint %uint_2 %250 + %262 = OpIAdd %uint %uint_3 %261 + %263 = OpIAdd %uint %261 %uint_4 + %264 = OpIAdd %uint %uint_9 %227 + %265 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %264 + %266 = OpLoad %FHitProxyVSToDS %265 + %267 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %266 0 + %268 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %267 0 + %269 = OpCompositeExtract %v4float %268 0 + %270 = OpCompositeExtract %v4float %268 1 + %271 = OpVectorShuffle %v3float %269 %269 0 1 2 + %272 = OpCompositeExtract %float %270 0 + %273 = OpCompositeExtract %float %270 1 + %274 = OpCompositeExtract %float %270 2 + %275 = OpCompositeConstruct %v4float %272 %273 %274 %float_0 + %276 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %250 + %277 = OpLoad %FHitProxyVSToDS %276 + %278 = OpCompositeExtract %uint %277 2 + %279 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %260 + %280 = OpLoad %FHitProxyVSToDS %279 + %281 = OpCompositeExtract %uint %280 2 + %282 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %262 + %283 = OpLoad %FHitProxyVSToDS %282 + %284 = OpCompositeExtract %uint %283 2 + %285 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %263 + %286 = OpLoad %FHitProxyVSToDS %285 + %287 = OpCompositeExtract %uint %286 2 + %288 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %277 0 + %289 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %288 0 + %290 = OpCompositeExtract %v4float %289 0 + %291 = OpCompositeExtract %v4float %289 1 + %292 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %280 0 + %293 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %292 0 + %294 = OpCompositeExtract %v4float %293 0 + %295 = OpCompositeExtract %v4float %293 1 + %296 = OpULessThan %bool %284 %278 + %297 = OpIEqual %bool %284 %278 + %298 = OpULessThan %bool %287 %281 + %299 = OpLogicalAnd %bool %297 %298 + %300 = OpLogicalOr %bool %296 %299 + OpSelectionMerge %301 None + OpBranchConditional %300 %302 %301 + %302 = OpLabel + %303 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %283 0 + %304 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %303 0 + %305 = OpCompositeExtract %v4float %304 0 + %306 = OpCompositeExtract %v4float %304 1 + %307 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %286 0 + %308 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %307 0 + %309 = OpCompositeExtract %v4float %308 0 + %310 = OpCompositeExtract %v4float %308 1 + OpBranch %301 + %301 = OpLabel + %311 = OpPhi %v4float %294 %137 %309 %302 + %312 = OpPhi %v4float %295 %137 %310 %302 + %313 = OpPhi %v4float %290 %137 %305 %302 + %314 = OpPhi %v4float %291 %137 %306 %302 + %315 = OpVectorShuffle %v3float %313 %313 0 1 2 + %316 = OpVectorShuffle %v3float %311 %311 0 1 2 + %317 = OpCompositeExtract %float %314 0 + %318 = OpCompositeExtract %float %314 1 + %319 = OpCompositeExtract %float %314 2 + %320 = OpCompositeConstruct %v4float %317 %318 %319 %float_0 + %321 = OpCompositeExtract %float %312 0 + %322 = OpCompositeExtract %float %312 1 + %323 = OpCompositeExtract %float %312 2 + %324 = OpCompositeConstruct %v4float %321 %322 %323 %float_0 + %325 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %250 %int_0 + %326 = OpLoad %FVertexFactoryInterpolantsVSToDS %325 + %327 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %326 0 + %328 = OpCompositeExtract %v4float %327 1 + %329 = OpCompositeExtract %float %328 0 + %330 = OpCompositeExtract %float %328 1 + %331 = OpCompositeExtract %float %328 2 + %332 = OpCompositeConstruct %v4float %329 %330 %331 %float_0 + %333 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %252 %int_0 + %334 = OpLoad %FVertexFactoryInterpolantsVSToDS %333 + %335 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %334 0 + %336 = OpCompositeExtract %v4float %335 1 + %337 = OpCompositeExtract %float %336 0 + %338 = OpCompositeExtract %float %336 1 + %339 = OpCompositeExtract %float %336 2 + %340 = OpCompositeConstruct %v4float %337 %338 %339 %float_0 + %341 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %253 %int_0 + %342 = OpLoad %FVertexFactoryInterpolantsVSToDS %341 + %343 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %342 0 + %344 = OpCompositeExtract %v4float %343 1 + %345 = OpCompositeExtract %float %344 0 + %346 = OpCompositeExtract %float %344 1 + %347 = OpCompositeExtract %float %344 2 + %348 = OpCompositeConstruct %v4float %345 %346 %347 %float_0 + %349 = OpLoad %v4float %256 + %350 = OpAccessChain %_ptr_Function_v4float %param_var_I %250 %int_1 + %351 = OpLoad %v4float %350 + %352 = OpFMul %v4float %63 %349 + %353 = OpFAdd %v4float %352 %351 + %354 = OpFSub %v4float %351 %349 + %355 = OpDot %float %354 %243 + %356 = OpCompositeConstruct %v4float %355 %355 %355 %355 + %357 = OpFMul %v4float %356 %243 + %358 = OpFSub %v4float %353 %357 + %359 = OpFMul %v4float %358 %132 + %360 = OpAccessChain %_ptr_Function_v4float %param_var_I %252 %int_1 + %361 = OpLoad %v4float %360 + %362 = OpAccessChain %_ptr_Function_v4float %param_var_I %253 %int_1 + %363 = OpLoad %v4float %362 + %364 = OpFMul %v4float %63 %361 + %365 = OpFAdd %v4float %364 %363 + %366 = OpFSub %v4float %363 %361 + %367 = OpDot %float %366 %340 + %368 = OpCompositeConstruct %v4float %367 %367 %367 %367 + %369 = OpFMul %v4float %368 %340 + %370 = OpFSub %v4float %365 %369 + %371 = OpFMul %v4float %370 %132 + %372 = OpFAdd %v4float %359 %371 + %373 = OpFMul %v4float %372 %133 + %374 = OpLoad %v4float %350 + %375 = OpLoad %v4float %256 + %376 = OpFMul %v4float %63 %374 + %377 = OpFAdd %v4float %376 %375 + %378 = OpFSub %v4float %375 %374 + %379 = OpDot %float %378 %332 + %380 = OpCompositeConstruct %v4float %379 %379 %379 %379 + %381 = OpFMul %v4float %380 %332 + %382 = OpFSub %v4float %377 %381 + %383 = OpFMul %v4float %382 %132 + %384 = OpLoad %v4float %362 + %385 = OpLoad %v4float %360 + %386 = OpFMul %v4float %63 %384 + %387 = OpFAdd %v4float %386 %385 + %388 = OpFSub %v4float %385 %384 + %389 = OpDot %float %388 %348 + %390 = OpCompositeConstruct %v4float %389 %389 %389 %389 + %391 = OpFMul %v4float %390 %348 + %392 = OpFSub %v4float %387 %391 + %393 = OpFMul %v4float %392 %132 + %394 = OpFAdd %v4float %383 %393 + %395 = OpFMul %v4float %394 %133 + %396 = OpCompositeConstruct %FHullShaderConstantDominantEdgeData %130 %130 %320 %324 %315 %316 + %397 = OpCompositeConstruct %FHullShaderConstantDominantVertexData %130 %275 %271 + %398 = OpCompositeConstruct %_arr_v4float_uint_3 %257 %373 %395 + %399 = OpCompositeConstruct %FPNTessellationHSToDS %255 %398 %247 %float_1 %float_1 %397 %396 + %400 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %255 0 + %401 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %400 0 + %402 = OpCompositeExtract %v4float %401 0 + %403 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD10_centroid %227 + OpStore %403 %402 + %404 = OpCompositeExtract %v4float %401 1 + %405 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD11_centroid %227 + OpStore %405 %404 + %406 = OpCompositeExtract %v4float %255 1 + %407 = OpAccessChain %_ptr_Output_v4float %out_var_VS_To_DS_Position %227 + OpStore %407 %406 + %408 = OpCompositeExtract %uint %255 2 + %409 = OpAccessChain %_ptr_Output_uint %out_var_VS_To_DS_VertexID %227 + OpStore %409 %408 + %410 = OpAccessChain %_ptr_Output__arr_v4float_uint_3 %out_var_PN_POSITION %227 + OpStore %410 %398 + %411 = OpAccessChain %_ptr_Output_v3float %out_var_PN_DisplacementScales %227 + OpStore %411 %247 + %412 = OpAccessChain %_ptr_Output_float %out_var_PN_TessellationMultiplier %227 + OpStore %412 %float_1 + %413 = OpAccessChain %_ptr_Output_float %out_var_PN_WorldDisplacementMultiplier %227 + OpStore %413 %float_1 + %414 = OpAccessChain %_ptr_Output_v2float %out_var_PN_DominantVertex %227 + OpStore %414 %130 + %415 = OpAccessChain %_ptr_Output_v4float %out_var_PN_DominantVertex1 %227 + OpStore %415 %275 + %416 = OpAccessChain %_ptr_Output_v3float %out_var_PN_DominantVertex2 %227 + OpStore %416 %271 + %417 = OpAccessChain %_ptr_Output_v2float %out_var_PN_DominantEdge %227 + OpStore %417 %130 + %418 = OpAccessChain %_ptr_Output_v2float %out_var_PN_DominantEdge1 %227 + OpStore %418 %130 + %419 = OpAccessChain %_ptr_Output_v4float %out_var_PN_DominantEdge2 %227 + OpStore %419 %320 + %420 = OpAccessChain %_ptr_Output_v4float %out_var_PN_DominantEdge3 %227 + OpStore %420 %324 + %421 = OpAccessChain %_ptr_Output_v3float %out_var_PN_DominantEdge4 %227 + OpStore %421 %315 + %422 = OpAccessChain %_ptr_Output_v3float %out_var_PN_DominantEdge5 %227 + OpStore %422 %316 + %423 = OpAccessChain %_ptr_Workgroup_FPNTessellationHSToDS %temp_var_hullMainRetVal %227 + OpStore %423 %399 + OpControlBarrier %uint_2 %uint_4 %uint_0 + %424 = OpIEqual %bool %227 %uint_0 + OpSelectionMerge %if_merge None + OpBranchConditional %424 %425 %if_merge + %425 = OpLabel + %426 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_0 + %427 = OpLoad %mat4v4float %426 + %428 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_7 + %429 = OpLoad %mat4v4float %428 + %430 = OpAccessChain %_ptr_Uniform_v3float %View %int_28 + %431 = OpLoad %v3float %430 + %432 = OpAccessChain %_ptr_Uniform_float %View %int_78 + %433 = OpLoad %float %432 + %434 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_0 + %435 = OpLoad %v4float %434 + %436 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_1 + %437 = OpLoad %v4float %436 + %438 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_2 + %439 = OpLoad %v4float %438 + %440 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_0 + %441 = OpLoad %v4float %440 + %442 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_1 + %443 = OpLoad %v4float %442 + %444 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_2 + %445 = OpLoad %v4float %444 + %446 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_0 + %447 = OpLoad %v4float %446 + %448 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_1 + %449 = OpLoad %v4float %448 + %450 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_2 + %451 = OpLoad %v4float %450 + %452 = OpFAdd %v4float %437 %439 + %453 = OpFAdd %v4float %452 %443 + %454 = OpFAdd %v4float %453 %445 + %455 = OpFAdd %v4float %454 %449 + %456 = OpFAdd %v4float %455 %451 + %457 = OpFMul %v4float %456 %135 + %458 = OpFAdd %v4float %447 %441 + %459 = OpFAdd %v4float %458 %435 + %460 = OpFMul %v4float %459 %132 + %461 = OpFSub %v4float %457 %460 + %462 = OpFMul %v4float %461 %133 + %463 = OpFAdd %v4float %457 %462 + %464 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_1 %int_3 + %465 = OpLoad %float %464 + %466 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_2 %int_3 + %467 = OpLoad %float %466 + %468 = OpFAdd %float %465 %467 + %469 = OpFMul %float %float_0_5 %468 + %470 = OpCompositeInsert %v4float %469 %136 0 + %471 = OpLoad %float %466 + %472 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_0 %int_3 + %473 = OpLoad %float %472 + %474 = OpFAdd %float %471 %473 + %475 = OpFMul %float %float_0_5 %474 + %476 = OpCompositeInsert %v4float %475 %470 1 + %477 = OpLoad %float %472 + %478 = OpLoad %float %464 + %479 = OpFAdd %float %477 %478 + %480 = OpFMul %float %float_0_5 %479 + %481 = OpCompositeInsert %v4float %480 %476 2 + %482 = OpLoad %float %472 + %483 = OpLoad %float %464 + %484 = OpFAdd %float %482 %483 + %485 = OpLoad %float %466 + %486 = OpFAdd %float %484 %485 + %487 = OpFMul %float %float_0_333000004 %486 + %488 = OpCompositeInsert %v4float %487 %481 3 + %489 = OpVectorShuffle %v3float %435 %435 0 1 2 + %490 = OpVectorShuffle %v3float %441 %441 0 1 2 + %491 = OpVectorShuffle %v3float %447 %447 0 1 2 + OpBranch %492 + %492 = OpLabel + OpLoopMerge %493 %494 None + OpBranch %495 + %495 = OpLabel + %496 = OpMatrixTimesVector %v4float %429 %77 + %497 = OpCompositeExtract %float %435 0 + %498 = OpCompositeExtract %float %435 1 + %499 = OpCompositeExtract %float %435 2 + %500 = OpCompositeConstruct %v4float %497 %498 %499 %float_1 + %501 = OpMatrixTimesVector %v4float %427 %500 + %502 = OpVectorShuffle %v3float %501 %501 0 1 2 + %503 = OpVectorShuffle %v3float %496 %496 0 1 2 + %504 = OpFSub %v3float %502 %503 + %505 = OpCompositeExtract %float %501 3 + %506 = OpCompositeExtract %float %496 3 + %507 = OpFAdd %float %505 %506 + %508 = OpCompositeConstruct %v3float %507 %507 %507 + %509 = OpFOrdLessThan %v3bool %504 %508 + %510 = OpSelect %v3int %509 %83 %74 + %511 = OpFAdd %v3float %502 %503 + %512 = OpFNegate %float %505 + %513 = OpFSub %float %512 %506 + %514 = OpCompositeConstruct %v3float %513 %513 %513 + %515 = OpFOrdGreaterThan %v3bool %511 %514 + %516 = OpSelect %v3int %515 %83 %74 + %517 = OpIMul %v3int %84 %516 + %518 = OpIAdd %v3int %510 %517 + %519 = OpCompositeExtract %float %441 0 + %520 = OpCompositeExtract %float %441 1 + %521 = OpCompositeExtract %float %441 2 + %522 = OpCompositeConstruct %v4float %519 %520 %521 %float_1 + %523 = OpMatrixTimesVector %v4float %427 %522 + %524 = OpVectorShuffle %v3float %523 %523 0 1 2 + %525 = OpFSub %v3float %524 %503 + %526 = OpCompositeExtract %float %523 3 + %527 = OpFAdd %float %526 %506 + %528 = OpCompositeConstruct %v3float %527 %527 %527 + %529 = OpFOrdLessThan %v3bool %525 %528 + %530 = OpSelect %v3int %529 %83 %74 + %531 = OpFAdd %v3float %524 %503 + %532 = OpFNegate %float %526 + %533 = OpFSub %float %532 %506 + %534 = OpCompositeConstruct %v3float %533 %533 %533 + %535 = OpFOrdGreaterThan %v3bool %531 %534 + %536 = OpSelect %v3int %535 %83 %74 + %537 = OpIMul %v3int %84 %536 + %538 = OpIAdd %v3int %530 %537 + %539 = OpBitwiseOr %v3int %518 %538 + %540 = OpCompositeExtract %float %447 0 + %541 = OpCompositeExtract %float %447 1 + %542 = OpCompositeExtract %float %447 2 + %543 = OpCompositeConstruct %v4float %540 %541 %542 %float_1 + %544 = OpMatrixTimesVector %v4float %427 %543 + %545 = OpVectorShuffle %v3float %544 %544 0 1 2 + %546 = OpFSub %v3float %545 %503 + %547 = OpCompositeExtract %float %544 3 + %548 = OpFAdd %float %547 %506 + %549 = OpCompositeConstruct %v3float %548 %548 %548 + %550 = OpFOrdLessThan %v3bool %546 %549 + %551 = OpSelect %v3int %550 %83 %74 + %552 = OpFAdd %v3float %545 %503 + %553 = OpFNegate %float %547 + %554 = OpFSub %float %553 %506 + %555 = OpCompositeConstruct %v3float %554 %554 %554 + %556 = OpFOrdGreaterThan %v3bool %552 %555 + %557 = OpSelect %v3int %556 %83 %74 + %558 = OpIMul %v3int %84 %557 + %559 = OpIAdd %v3int %551 %558 + %560 = OpBitwiseOr %v3int %539 %559 + %561 = OpINotEqual %v3bool %560 %75 + %562 = OpAny %bool %561 + OpSelectionMerge %563 None + OpBranchConditional %562 %564 %563 + %564 = OpLabel + OpBranch %493 + %563 = OpLabel + %565 = OpFSub %v3float %489 %490 + %566 = OpFSub %v3float %490 %491 + %567 = OpFSub %v3float %491 %489 + %568 = OpFAdd %v3float %489 %490 + %569 = OpFMul %v3float %78 %568 + %570 = OpFSub %v3float %569 %431 + %571 = OpFAdd %v3float %490 %491 + %572 = OpFMul %v3float %78 %571 + %573 = OpFSub %v3float %572 %431 + %574 = OpFAdd %v3float %491 %489 + %575 = OpFMul %v3float %78 %574 + %576 = OpFSub %v3float %575 %431 + %577 = OpDot %float %566 %566 + %578 = OpDot %float %573 %573 + %579 = OpFDiv %float %577 %578 + %580 = OpExtInst %float %1 Sqrt %579 + %581 = OpDot %float %567 %567 + %582 = OpDot %float %576 %576 + %583 = OpFDiv %float %581 %582 + %584 = OpExtInst %float %1 Sqrt %583 + %585 = OpDot %float %565 %565 + %586 = OpDot %float %570 %570 + %587 = OpFDiv %float %585 %586 + %588 = OpExtInst %float %1 Sqrt %587 + %589 = OpCompositeConstruct %v4float %580 %584 %588 %float_1 + %590 = OpFAdd %float %580 %584 + %591 = OpFAdd %float %590 %588 + %592 = OpFMul %float %float_0_333000004 %591 + %593 = OpCompositeInsert %v4float %592 %589 3 + %594 = OpCompositeConstruct %v4float %433 %433 %433 %433 + %595 = OpFMul %v4float %594 %593 + OpBranch %493 + %494 = OpLabel + OpBranch %492 + %493 = OpLabel + %596 = OpPhi %v4float %77 %564 %595 %563 + %597 = OpFMul %v4float %488 %596 + %598 = OpExtInst %v4float %1 FClamp %597 %68 %70 + %599 = OpCompositeExtract %float %598 0 + %600 = OpCompositeExtract %float %598 1 + %601 = OpCompositeExtract %float %598 2 + %602 = OpCompositeExtract %float %598 3 + %603 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_0 + OpStore %603 %599 + %604 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_1 + OpStore %604 %600 + %605 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_2 + OpStore %605 %601 + %606 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %uint_0 + OpStore %606 %602 + OpStore %out_var_PN_POSITION9 %463 + OpBranch %if_merge + %if_merge = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc new file mode 100644 index 000000000..1a9b95e08 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc @@ -0,0 +1,1144 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 531 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationControl %MainHull "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_COLOR0 %in_var_TEXCOORD0 %in_var_VS_To_DS_Position %gl_InvocationID %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_COLOR0 %out_var_TEXCOORD0 %out_var_VS_To_DS_Position %out_var_PN_POSITION %out_var_PN_DisplacementScales %out_var_PN_TessellationMultiplier %out_var_PN_WorldDisplacementMultiplier %gl_TessLevelOuter %gl_TessLevelInner %out_var_PN_POSITION9 + OpExecutionMode %MainHull Triangles + OpExecutionMode %MainHull SpacingFractionalOdd + OpExecutionMode %MainHull VertexOrderCw + OpExecutionMode %MainHull OutputVertices 3 + OpSource HLSL 600 + OpName %FPNTessellationHSToDS "FPNTessellationHSToDS" + OpMemberName %FPNTessellationHSToDS 0 "PassSpecificData" + OpMemberName %FPNTessellationHSToDS 1 "WorldPosition" + OpMemberName %FPNTessellationHSToDS 2 "DisplacementScale" + OpMemberName %FPNTessellationHSToDS 3 "TessellationMultiplier" + OpMemberName %FPNTessellationHSToDS 4 "WorldDisplacementMultiplier" + OpName %FHitProxyVSToDS "FHitProxyVSToDS" + OpMemberName %FHitProxyVSToDS 0 "FactoryInterpolants" + OpMemberName %FHitProxyVSToDS 1 "Position" + OpName %FVertexFactoryInterpolantsVSToDS "FVertexFactoryInterpolantsVSToDS" + OpMemberName %FVertexFactoryInterpolantsVSToDS 0 "InterpolantsVSToPS" + OpName %FVertexFactoryInterpolantsVSToPS "FVertexFactoryInterpolantsVSToPS" + OpMemberName %FVertexFactoryInterpolantsVSToPS 0 "TangentToWorld0" + OpMemberName %FVertexFactoryInterpolantsVSToPS 1 "TangentToWorld2" + OpMemberName %FVertexFactoryInterpolantsVSToPS 2 "Color" + OpMemberName %FVertexFactoryInterpolantsVSToPS 3 "TexCoords" + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_Primitive "type.Primitive" + OpMemberName %type_Primitive 0 "Primitive_LocalToWorld" + OpMemberName %type_Primitive 1 "Primitive_InvNonUniformScaleAndDeterminantSign" + OpMemberName %type_Primitive 2 "Primitive_ObjectWorldPositionAndRadius" + OpMemberName %type_Primitive 3 "Primitive_WorldToLocal" + OpMemberName %type_Primitive 4 "Primitive_PreviousLocalToWorld" + OpMemberName %type_Primitive 5 "Primitive_PreviousWorldToLocal" + OpMemberName %type_Primitive 6 "Primitive_ActorWorldPosition" + OpMemberName %type_Primitive 7 "Primitive_UseSingleSampleShadowFromStationaryLights" + OpMemberName %type_Primitive 8 "Primitive_ObjectBounds" + OpMemberName %type_Primitive 9 "Primitive_LpvBiasMultiplier" + OpMemberName %type_Primitive 10 "Primitive_DecalReceiverMask" + OpMemberName %type_Primitive 11 "Primitive_PerObjectGBufferData" + OpMemberName %type_Primitive 12 "Primitive_UseVolumetricLightmapShadowFromStationaryLights" + OpMemberName %type_Primitive 13 "Primitive_DrawsVelocity" + OpMemberName %type_Primitive 14 "Primitive_ObjectOrientation" + OpMemberName %type_Primitive 15 "Primitive_NonUniformScale" + OpMemberName %type_Primitive 16 "Primitive_LocalObjectBoundsMin" + OpMemberName %type_Primitive 17 "Primitive_LightingChannelMask" + OpMemberName %type_Primitive 18 "Primitive_LocalObjectBoundsMax" + OpMemberName %type_Primitive 19 "Primitive_LightmapDataIndex" + OpMemberName %type_Primitive 20 "Primitive_PreSkinnedLocalBounds" + OpMemberName %type_Primitive 21 "Primitive_SingleCaptureIndex" + OpMemberName %type_Primitive 22 "Primitive_OutputVelocity" + OpMemberName %type_Primitive 23 "PrePadding_Primitive_420" + OpMemberName %type_Primitive 24 "PrePadding_Primitive_424" + OpMemberName %type_Primitive 25 "PrePadding_Primitive_428" + OpMemberName %type_Primitive 26 "Primitive_CustomPrimitiveData" + OpName %Primitive "Primitive" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_COLOR0 "in.var.COLOR0" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_VS_To_DS_Position "in.var.VS_To_DS_Position" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_COLOR0 "out.var.COLOR0" + OpName %out_var_TEXCOORD0 "out.var.TEXCOORD0" + OpName %out_var_VS_To_DS_Position "out.var.VS_To_DS_Position" + OpName %out_var_PN_POSITION "out.var.PN_POSITION" + OpName %out_var_PN_DisplacementScales "out.var.PN_DisplacementScales" + OpName %out_var_PN_TessellationMultiplier "out.var.PN_TessellationMultiplier" + OpName %out_var_PN_WorldDisplacementMultiplier "out.var.PN_WorldDisplacementMultiplier" + OpName %out_var_PN_POSITION9 "out.var.PN_POSITION9" + OpName %MainHull "MainHull" + OpName %param_var_I "param.var.I" + OpName %temp_var_hullMainRetVal "temp.var.hullMainRetVal" + OpName %if_merge "if.merge" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_COLOR0 UserSemantic "COLOR0" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorate %gl_InvocationID BuiltIn InvocationId + OpDecorateString %gl_InvocationID UserSemantic "SV_OutputControlPointID" + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_COLOR0 UserSemantic "COLOR0" + OpDecorateString %out_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %out_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %out_var_PN_POSITION UserSemantic "PN_POSITION" + OpDecorateString %out_var_PN_DisplacementScales UserSemantic "PN_DisplacementScales" + OpDecorateString %out_var_PN_TessellationMultiplier UserSemantic "PN_TessellationMultiplier" + OpDecorateString %out_var_PN_WorldDisplacementMultiplier UserSemantic "PN_WorldDisplacementMultiplier" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %out_var_PN_POSITION9 UserSemantic "PN_POSITION9" + OpDecorate %out_var_PN_POSITION9 Patch + OpDecorate %in_var_TEXCOORD10_centroid Location 0 + OpDecorate %in_var_TEXCOORD11_centroid Location 1 + OpDecorate %in_var_COLOR0 Location 2 + OpDecorate %in_var_TEXCOORD0 Location 3 + OpDecorate %in_var_VS_To_DS_Position Location 5 + OpDecorate %out_var_COLOR0 Location 0 + OpDecorate %out_var_PN_DisplacementScales Location 1 + OpDecorate %out_var_PN_POSITION Location 2 + OpDecorate %out_var_PN_POSITION9 Location 5 + OpDecorate %out_var_PN_TessellationMultiplier Location 6 + OpDecorate %out_var_PN_WorldDisplacementMultiplier Location 7 + OpDecorate %out_var_TEXCOORD0 Location 8 + OpDecorate %out_var_TEXCOORD10_centroid Location 10 + OpDecorate %out_var_TEXCOORD11_centroid Location 11 + OpDecorate %out_var_VS_To_DS_Position Location 12 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %Primitive DescriptorSet 0 + OpDecorate %Primitive Binding 1 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpDecorate %type_View Block + OpMemberDecorate %type_Primitive 0 Offset 0 + OpMemberDecorate %type_Primitive 0 MatrixStride 16 + OpMemberDecorate %type_Primitive 0 ColMajor + OpMemberDecorate %type_Primitive 1 Offset 64 + OpMemberDecorate %type_Primitive 2 Offset 80 + OpMemberDecorate %type_Primitive 3 Offset 96 + OpMemberDecorate %type_Primitive 3 MatrixStride 16 + OpMemberDecorate %type_Primitive 3 ColMajor + OpMemberDecorate %type_Primitive 4 Offset 160 + OpMemberDecorate %type_Primitive 4 MatrixStride 16 + OpMemberDecorate %type_Primitive 4 ColMajor + OpMemberDecorate %type_Primitive 5 Offset 224 + OpMemberDecorate %type_Primitive 5 MatrixStride 16 + OpMemberDecorate %type_Primitive 5 ColMajor + OpMemberDecorate %type_Primitive 6 Offset 288 + OpMemberDecorate %type_Primitive 7 Offset 300 + OpMemberDecorate %type_Primitive 8 Offset 304 + OpMemberDecorate %type_Primitive 9 Offset 316 + OpMemberDecorate %type_Primitive 10 Offset 320 + OpMemberDecorate %type_Primitive 11 Offset 324 + OpMemberDecorate %type_Primitive 12 Offset 328 + OpMemberDecorate %type_Primitive 13 Offset 332 + OpMemberDecorate %type_Primitive 14 Offset 336 + OpMemberDecorate %type_Primitive 15 Offset 352 + OpMemberDecorate %type_Primitive 16 Offset 368 + OpMemberDecorate %type_Primitive 17 Offset 380 + OpMemberDecorate %type_Primitive 18 Offset 384 + OpMemberDecorate %type_Primitive 19 Offset 396 + OpMemberDecorate %type_Primitive 20 Offset 400 + OpMemberDecorate %type_Primitive 21 Offset 412 + OpMemberDecorate %type_Primitive 22 Offset 416 + OpMemberDecorate %type_Primitive 23 Offset 420 + OpMemberDecorate %type_Primitive 24 Offset 424 + OpMemberDecorate %type_Primitive 25 Offset 428 + OpMemberDecorate %type_Primitive 26 Offset 432 + OpDecorate %type_Primitive Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %uint_3 = OpConstant %uint 3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %float_2 = OpConstant %float 2 + %54 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 + %float_0_5 = OpConstant %float 0.5 + %int_3 = OpConstant %int 3 +%float_0_333000004 = OpConstant %float 0.333000004 + %float_1 = OpConstant %float 1 + %59 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_15 = OpConstant %float 15 + %61 = OpConstantComposite %v4float %float_15 %float_15 %float_15 %float_15 +%_arr_v2float_uint_2 = OpTypeArray %v2float %uint_2 +%FVertexFactoryInterpolantsVSToPS = OpTypeStruct %v4float %v4float %v4float %_arr_v2float_uint_2 +%FVertexFactoryInterpolantsVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToPS +%FHitProxyVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToDS %v4float +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%FPNTessellationHSToDS = OpTypeStruct %FHitProxyVSToDS %_arr_v4float_uint_3 %v3float %float %float + %v3int = OpTypeVector %int 3 + %65 = OpConstantComposite %v3int %int_0 %int_0 %int_0 + %66 = OpConstantComposite %v3int %int_3 %int_3 %int_3 + %float_0 = OpConstant %float 0 + %68 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %69 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %int_78 = OpConstant %int 78 + %int_15 = OpConstant %int 15 + %int_7 = OpConstant %int 7 + %int_28 = OpConstant %int 28 + %74 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %75 = OpConstantComposite %v3int %int_2 %int_2 %int_2 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_Primitive = OpTypeStruct %mat4v4float %v4float %v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %float %float %float %float %v4float %v4float %v3float %uint %v3float %uint %v3float %int %uint %uint %uint %uint %_arr_v4float_uint_4 +%_ptr_Uniform_type_Primitive = OpTypePointer Uniform %type_Primitive + %uint_12 = OpConstant %uint 12 +%_arr_v4float_uint_12 = OpTypeArray %v4float %uint_12 +%_ptr_Input__arr_v4float_uint_12 = OpTypePointer Input %_arr_v4float_uint_12 +%_arr__arr_v2float_uint_2_uint_12 = OpTypeArray %_arr_v2float_uint_2 %uint_12 +%_ptr_Input__arr__arr_v2float_uint_2_uint_12 = OpTypePointer Input %_arr__arr_v2float_uint_2_uint_12 +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output__arr_v4float_uint_3 = OpTypePointer Output %_arr_v4float_uint_3 +%_arr__arr_v2float_uint_2_uint_3 = OpTypeArray %_arr_v2float_uint_2 %uint_3 +%_ptr_Output__arr__arr_v2float_uint_2_uint_3 = OpTypePointer Output %_arr__arr_v2float_uint_2_uint_3 +%_arr__arr_v4float_uint_3_uint_3 = OpTypeArray %_arr_v4float_uint_3 %uint_3 +%_ptr_Output__arr__arr_v4float_uint_3_uint_3 = OpTypePointer Output %_arr__arr_v4float_uint_3_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Output__arr_v3float_uint_3 = OpTypePointer Output %_arr_v3float_uint_3 +%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %98 = OpTypeFunction %void +%_arr_FHitProxyVSToDS_uint_12 = OpTypeArray %FHitProxyVSToDS %uint_12 +%_ptr_Function__arr_FHitProxyVSToDS_uint_12 = OpTypePointer Function %_arr_FHitProxyVSToDS_uint_12 +%_arr_FPNTessellationHSToDS_uint_3 = OpTypeArray %FPNTessellationHSToDS %uint_3 +%_ptr_Function__arr_FPNTessellationHSToDS_uint_3 = OpTypePointer Function %_arr_FPNTessellationHSToDS_uint_3 +%_ptr_Workgroup__arr_FPNTessellationHSToDS_uint_3 = OpTypePointer Workgroup %_arr_FPNTessellationHSToDS_uint_3 +%_ptr_Output__arr_v2float_uint_2 = OpTypePointer Output %_arr_v2float_uint_2 +%_ptr_Output_v3float = OpTypePointer Output %v3float +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Function_FPNTessellationHSToDS = OpTypePointer Function %FPNTessellationHSToDS +%_ptr_Workgroup_FPNTessellationHSToDS = OpTypePointer Workgroup %FPNTessellationHSToDS + %bool = OpTypeBool +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float +%_ptr_Workgroup_float = OpTypePointer Workgroup %float +%mat3v3float = OpTypeMatrix %v3float 3 +%_ptr_Function_FVertexFactoryInterpolantsVSToDS = OpTypePointer Function %FVertexFactoryInterpolantsVSToDS +%_ptr_Function_FHitProxyVSToDS = OpTypePointer Function %FHitProxyVSToDS + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float + %View = OpVariable %_ptr_Uniform_type_View Uniform + %Primitive = OpVariable %_ptr_Uniform_type_Primitive Uniform +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_COLOR0 = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input__arr__arr_v2float_uint_2_uint_12 Input +%in_var_VS_To_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_12 Input +%gl_InvocationID = OpVariable %_ptr_Input_uint Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_COLOR0 = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_TEXCOORD0 = OpVariable %_ptr_Output__arr__arr_v2float_uint_2_uint_3 Output +%out_var_VS_To_DS_Position = OpVariable %_ptr_Output__arr_v4float_uint_3 Output +%out_var_PN_POSITION = OpVariable %_ptr_Output__arr__arr_v4float_uint_3_uint_3 Output +%out_var_PN_DisplacementScales = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%out_var_PN_TessellationMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%out_var_PN_WorldDisplacementMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output +%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output +%out_var_PN_POSITION9 = OpVariable %_ptr_Output_v4float Output +%float_0_333333343 = OpConstant %float 0.333333343 + %119 = OpConstantComposite %v4float %float_0_333333343 %float_0_333333343 %float_0_333333343 %float_0_333333343 + %120 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 +%float_0_166666672 = OpConstant %float 0.166666672 + %122 = OpConstantComposite %v4float %float_0_166666672 %float_0_166666672 %float_0_166666672 %float_0_166666672 + %123 = OpUndef %v4float + +; XXX: Original asm used Function here, which is wrong. +; This patches the SPIR-V to be correct. +%temp_var_hullMainRetVal = OpVariable %_ptr_Workgroup__arr_FPNTessellationHSToDS_uint_3 Workgroup + + %MainHull = OpFunction %void None %98 + %124 = OpLabel +%param_var_I = OpVariable %_ptr_Function__arr_FHitProxyVSToDS_uint_12 Function + %125 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD10_centroid + %126 = OpLoad %_arr_v4float_uint_12 %in_var_TEXCOORD11_centroid + %127 = OpLoad %_arr_v4float_uint_12 %in_var_COLOR0 + %128 = OpLoad %_arr__arr_v2float_uint_2_uint_12 %in_var_TEXCOORD0 + %129 = OpCompositeExtract %v4float %125 0 + %130 = OpCompositeExtract %v4float %126 0 + %131 = OpCompositeExtract %v4float %127 0 + %132 = OpCompositeExtract %_arr_v2float_uint_2 %128 0 + %133 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %129 %130 %131 %132 + %134 = OpCompositeExtract %v4float %125 1 + %135 = OpCompositeExtract %v4float %126 1 + %136 = OpCompositeExtract %v4float %127 1 + %137 = OpCompositeExtract %_arr_v2float_uint_2 %128 1 + %138 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %134 %135 %136 %137 + %139 = OpCompositeExtract %v4float %125 2 + %140 = OpCompositeExtract %v4float %126 2 + %141 = OpCompositeExtract %v4float %127 2 + %142 = OpCompositeExtract %_arr_v2float_uint_2 %128 2 + %143 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %139 %140 %141 %142 + %144 = OpCompositeExtract %v4float %125 3 + %145 = OpCompositeExtract %v4float %126 3 + %146 = OpCompositeExtract %v4float %127 3 + %147 = OpCompositeExtract %_arr_v2float_uint_2 %128 3 + %148 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %144 %145 %146 %147 + %149 = OpCompositeExtract %v4float %125 4 + %150 = OpCompositeExtract %v4float %126 4 + %151 = OpCompositeExtract %v4float %127 4 + %152 = OpCompositeExtract %_arr_v2float_uint_2 %128 4 + %153 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %149 %150 %151 %152 + %154 = OpCompositeExtract %v4float %125 5 + %155 = OpCompositeExtract %v4float %126 5 + %156 = OpCompositeExtract %v4float %127 5 + %157 = OpCompositeExtract %_arr_v2float_uint_2 %128 5 + %158 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %154 %155 %156 %157 + %159 = OpCompositeExtract %v4float %125 6 + %160 = OpCompositeExtract %v4float %126 6 + %161 = OpCompositeExtract %v4float %127 6 + %162 = OpCompositeExtract %_arr_v2float_uint_2 %128 6 + %163 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %159 %160 %161 %162 + %164 = OpCompositeExtract %v4float %125 7 + %165 = OpCompositeExtract %v4float %126 7 + %166 = OpCompositeExtract %v4float %127 7 + %167 = OpCompositeExtract %_arr_v2float_uint_2 %128 7 + %168 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %164 %165 %166 %167 + %169 = OpCompositeExtract %v4float %125 8 + %170 = OpCompositeExtract %v4float %126 8 + %171 = OpCompositeExtract %v4float %127 8 + %172 = OpCompositeExtract %_arr_v2float_uint_2 %128 8 + %173 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %169 %170 %171 %172 + %174 = OpCompositeExtract %v4float %125 9 + %175 = OpCompositeExtract %v4float %126 9 + %176 = OpCompositeExtract %v4float %127 9 + %177 = OpCompositeExtract %_arr_v2float_uint_2 %128 9 + %178 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %174 %175 %176 %177 + %179 = OpCompositeExtract %v4float %125 10 + %180 = OpCompositeExtract %v4float %126 10 + %181 = OpCompositeExtract %v4float %127 10 + %182 = OpCompositeExtract %_arr_v2float_uint_2 %128 10 + %183 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %179 %180 %181 %182 + %184 = OpCompositeExtract %v4float %125 11 + %185 = OpCompositeExtract %v4float %126 11 + %186 = OpCompositeExtract %v4float %127 11 + %187 = OpCompositeExtract %_arr_v2float_uint_2 %128 11 + %188 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %184 %185 %186 %187 + %189 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %133 + %190 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %138 + %191 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %143 + %192 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %148 + %193 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %153 + %194 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %158 + %195 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %163 + %196 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %168 + %197 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %173 + %198 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %178 + %199 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %183 + %200 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %188 + %201 = OpLoad %_arr_v4float_uint_12 %in_var_VS_To_DS_Position + %202 = OpCompositeExtract %v4float %201 0 + %203 = OpCompositeConstruct %FHitProxyVSToDS %189 %202 + %204 = OpCompositeExtract %v4float %201 1 + %205 = OpCompositeConstruct %FHitProxyVSToDS %190 %204 + %206 = OpCompositeExtract %v4float %201 2 + %207 = OpCompositeConstruct %FHitProxyVSToDS %191 %206 + %208 = OpCompositeExtract %v4float %201 3 + %209 = OpCompositeConstruct %FHitProxyVSToDS %192 %208 + %210 = OpCompositeExtract %v4float %201 4 + %211 = OpCompositeConstruct %FHitProxyVSToDS %193 %210 + %212 = OpCompositeExtract %v4float %201 5 + %213 = OpCompositeConstruct %FHitProxyVSToDS %194 %212 + %214 = OpCompositeExtract %v4float %201 6 + %215 = OpCompositeConstruct %FHitProxyVSToDS %195 %214 + %216 = OpCompositeExtract %v4float %201 7 + %217 = OpCompositeConstruct %FHitProxyVSToDS %196 %216 + %218 = OpCompositeExtract %v4float %201 8 + %219 = OpCompositeConstruct %FHitProxyVSToDS %197 %218 + %220 = OpCompositeExtract %v4float %201 9 + %221 = OpCompositeConstruct %FHitProxyVSToDS %198 %220 + %222 = OpCompositeExtract %v4float %201 10 + %223 = OpCompositeConstruct %FHitProxyVSToDS %199 %222 + %224 = OpCompositeExtract %v4float %201 11 + %225 = OpCompositeConstruct %FHitProxyVSToDS %200 %224 + %226 = OpCompositeConstruct %_arr_FHitProxyVSToDS_uint_12 %203 %205 %207 %209 %211 %213 %215 %217 %219 %221 %223 %225 + OpStore %param_var_I %226 + %227 = OpLoad %uint %gl_InvocationID + %228 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %227 %int_0 + %229 = OpLoad %FVertexFactoryInterpolantsVSToDS %228 + %230 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %229 0 + %231 = OpCompositeExtract %v4float %230 0 + %232 = OpCompositeExtract %v4float %230 1 + %233 = OpVectorShuffle %v3float %231 %231 0 1 2 + %234 = OpVectorShuffle %v3float %232 %232 0 1 2 + %235 = OpExtInst %v3float %1 Cross %234 %233 + %236 = OpCompositeExtract %float %232 3 + %237 = OpCompositeConstruct %v3float %236 %236 %236 + %238 = OpFMul %v3float %235 %237 + %239 = OpCompositeConstruct %mat3v3float %233 %238 %234 + %240 = OpCompositeExtract %float %232 0 + %241 = OpCompositeExtract %float %232 1 + %242 = OpCompositeExtract %float %232 2 + %243 = OpCompositeConstruct %v4float %240 %241 %242 %float_0 + %244 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_15 + %245 = OpLoad %v4float %244 + %246 = OpVectorShuffle %v3float %245 %245 0 1 2 + %247 = OpVectorTimesMatrix %v3float %246 %239 + %248 = OpULessThan %bool %227 %uint_2 + %249 = OpIAdd %uint %227 %uint_1 + %250 = OpSelect %uint %248 %249 %uint_0 + %251 = OpIMul %uint %uint_2 %227 + %252 = OpIAdd %uint %uint_3 %251 + %253 = OpIAdd %uint %251 %uint_4 + %254 = OpAccessChain %_ptr_Function_FHitProxyVSToDS %param_var_I %227 + %255 = OpLoad %FHitProxyVSToDS %254 + %256 = OpAccessChain %_ptr_Function_v4float %param_var_I %227 %int_1 + %257 = OpLoad %v4float %256 + %258 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %250 %int_0 + %259 = OpLoad %FVertexFactoryInterpolantsVSToDS %258 + %260 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %259 0 + %261 = OpCompositeExtract %v4float %260 1 + %262 = OpCompositeExtract %float %261 0 + %263 = OpCompositeExtract %float %261 1 + %264 = OpCompositeExtract %float %261 2 + %265 = OpCompositeConstruct %v4float %262 %263 %264 %float_0 + %266 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %252 %int_0 + %267 = OpLoad %FVertexFactoryInterpolantsVSToDS %266 + %268 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %267 0 + %269 = OpCompositeExtract %v4float %268 1 + %270 = OpCompositeExtract %float %269 0 + %271 = OpCompositeExtract %float %269 1 + %272 = OpCompositeExtract %float %269 2 + %273 = OpCompositeConstruct %v4float %270 %271 %272 %float_0 + %274 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %253 %int_0 + %275 = OpLoad %FVertexFactoryInterpolantsVSToDS %274 + %276 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %275 0 + %277 = OpCompositeExtract %v4float %276 1 + %278 = OpCompositeExtract %float %277 0 + %279 = OpCompositeExtract %float %277 1 + %280 = OpCompositeExtract %float %277 2 + %281 = OpCompositeConstruct %v4float %278 %279 %280 %float_0 + %282 = OpLoad %v4float %256 + %283 = OpAccessChain %_ptr_Function_v4float %param_var_I %250 %int_1 + %284 = OpLoad %v4float %283 + %285 = OpFMul %v4float %54 %282 + %286 = OpFAdd %v4float %285 %284 + %287 = OpFSub %v4float %284 %282 + %288 = OpDot %float %287 %243 + %289 = OpCompositeConstruct %v4float %288 %288 %288 %288 + %290 = OpFMul %v4float %289 %243 + %291 = OpFSub %v4float %286 %290 + %292 = OpFMul %v4float %291 %119 + %293 = OpAccessChain %_ptr_Function_v4float %param_var_I %252 %int_1 + %294 = OpLoad %v4float %293 + %295 = OpAccessChain %_ptr_Function_v4float %param_var_I %253 %int_1 + %296 = OpLoad %v4float %295 + %297 = OpFMul %v4float %54 %294 + %298 = OpFAdd %v4float %297 %296 + %299 = OpFSub %v4float %296 %294 + %300 = OpDot %float %299 %273 + %301 = OpCompositeConstruct %v4float %300 %300 %300 %300 + %302 = OpFMul %v4float %301 %273 + %303 = OpFSub %v4float %298 %302 + %304 = OpFMul %v4float %303 %119 + %305 = OpFAdd %v4float %292 %304 + %306 = OpFMul %v4float %305 %120 + %307 = OpLoad %v4float %283 + %308 = OpLoad %v4float %256 + %309 = OpFMul %v4float %54 %307 + %310 = OpFAdd %v4float %309 %308 + %311 = OpFSub %v4float %308 %307 + %312 = OpDot %float %311 %265 + %313 = OpCompositeConstruct %v4float %312 %312 %312 %312 + %314 = OpFMul %v4float %313 %265 + %315 = OpFSub %v4float %310 %314 + %316 = OpFMul %v4float %315 %119 + %317 = OpLoad %v4float %295 + %318 = OpLoad %v4float %293 + %319 = OpFMul %v4float %54 %317 + %320 = OpFAdd %v4float %319 %318 + %321 = OpFSub %v4float %318 %317 + %322 = OpDot %float %321 %281 + %323 = OpCompositeConstruct %v4float %322 %322 %322 %322 + %324 = OpFMul %v4float %323 %281 + %325 = OpFSub %v4float %320 %324 + %326 = OpFMul %v4float %325 %119 + %327 = OpFAdd %v4float %316 %326 + %328 = OpFMul %v4float %327 %120 + %329 = OpCompositeConstruct %_arr_v4float_uint_3 %257 %306 %328 + %330 = OpCompositeConstruct %FPNTessellationHSToDS %255 %329 %247 %float_1 %float_1 + %331 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %255 0 + %332 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %331 0 + %333 = OpCompositeExtract %v4float %332 0 + %334 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD10_centroid %227 + OpStore %334 %333 + %335 = OpCompositeExtract %v4float %332 1 + %336 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD11_centroid %227 + OpStore %336 %335 + %337 = OpCompositeExtract %v4float %332 2 + %338 = OpAccessChain %_ptr_Output_v4float %out_var_COLOR0 %227 + OpStore %338 %337 + %339 = OpCompositeExtract %_arr_v2float_uint_2 %332 3 + %340 = OpAccessChain %_ptr_Output__arr_v2float_uint_2 %out_var_TEXCOORD0 %227 + OpStore %340 %339 + %341 = OpCompositeExtract %v4float %255 1 + %342 = OpAccessChain %_ptr_Output_v4float %out_var_VS_To_DS_Position %227 + OpStore %342 %341 + %343 = OpAccessChain %_ptr_Output__arr_v4float_uint_3 %out_var_PN_POSITION %227 + OpStore %343 %329 + %344 = OpAccessChain %_ptr_Output_v3float %out_var_PN_DisplacementScales %227 + OpStore %344 %247 + %345 = OpAccessChain %_ptr_Output_float %out_var_PN_TessellationMultiplier %227 + OpStore %345 %float_1 + %346 = OpAccessChain %_ptr_Output_float %out_var_PN_WorldDisplacementMultiplier %227 + OpStore %346 %float_1 + %347 = OpAccessChain %_ptr_Workgroup_FPNTessellationHSToDS %temp_var_hullMainRetVal %227 + OpStore %347 %330 + OpControlBarrier %uint_2 %uint_4 %uint_0 + %348 = OpIEqual %bool %227 %uint_0 + OpSelectionMerge %if_merge None + OpBranchConditional %348 %349 %if_merge + %349 = OpLabel + %350 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_0 + %351 = OpLoad %mat4v4float %350 + %352 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_7 + %353 = OpLoad %mat4v4float %352 + %354 = OpAccessChain %_ptr_Uniform_v3float %View %int_28 + %355 = OpLoad %v3float %354 + %356 = OpAccessChain %_ptr_Uniform_float %View %int_78 + %357 = OpLoad %float %356 + %358 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_0 + %359 = OpLoad %v4float %358 + %360 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_1 + %361 = OpLoad %v4float %360 + %362 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_0 %int_1 %int_2 + %363 = OpLoad %v4float %362 + %364 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_0 + %365 = OpLoad %v4float %364 + %366 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_1 + %367 = OpLoad %v4float %366 + %368 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_1 %int_1 %int_2 + %369 = OpLoad %v4float %368 + %370 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_0 + %371 = OpLoad %v4float %370 + %372 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_1 + %373 = OpLoad %v4float %372 + %374 = OpAccessChain %_ptr_Workgroup_v4float %temp_var_hullMainRetVal %uint_2 %int_1 %int_2 + %375 = OpLoad %v4float %374 + %376 = OpFAdd %v4float %361 %363 + %377 = OpFAdd %v4float %376 %367 + %378 = OpFAdd %v4float %377 %369 + %379 = OpFAdd %v4float %378 %373 + %380 = OpFAdd %v4float %379 %375 + %381 = OpFMul %v4float %380 %122 + %382 = OpFAdd %v4float %371 %365 + %383 = OpFAdd %v4float %382 %359 + %384 = OpFMul %v4float %383 %119 + %385 = OpFSub %v4float %381 %384 + %386 = OpFMul %v4float %385 %120 + %387 = OpFAdd %v4float %381 %386 + %388 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_1 %int_3 + %389 = OpLoad %float %388 + %390 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_2 %int_3 + %391 = OpLoad %float %390 + %392 = OpFAdd %float %389 %391 + %393 = OpFMul %float %float_0_5 %392 + %394 = OpCompositeInsert %v4float %393 %123 0 + %395 = OpLoad %float %390 + %396 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_0 %int_3 + %397 = OpLoad %float %396 + %398 = OpFAdd %float %395 %397 + %399 = OpFMul %float %float_0_5 %398 + %400 = OpCompositeInsert %v4float %399 %394 1 + %401 = OpLoad %float %396 + %402 = OpLoad %float %388 + %403 = OpFAdd %float %401 %402 + %404 = OpFMul %float %float_0_5 %403 + %405 = OpCompositeInsert %v4float %404 %400 2 + %406 = OpLoad %float %396 + %407 = OpLoad %float %388 + %408 = OpFAdd %float %406 %407 + %409 = OpLoad %float %390 + %410 = OpFAdd %float %408 %409 + %411 = OpFMul %float %float_0_333000004 %410 + %412 = OpCompositeInsert %v4float %411 %405 3 + %413 = OpVectorShuffle %v3float %359 %359 0 1 2 + %414 = OpVectorShuffle %v3float %365 %365 0 1 2 + %415 = OpVectorShuffle %v3float %371 %371 0 1 2 + OpBranch %416 + %416 = OpLabel + OpLoopMerge %417 %418 None + OpBranch %419 + %419 = OpLabel + %420 = OpMatrixTimesVector %v4float %353 %68 + %421 = OpCompositeExtract %float %359 0 + %422 = OpCompositeExtract %float %359 1 + %423 = OpCompositeExtract %float %359 2 + %424 = OpCompositeConstruct %v4float %421 %422 %423 %float_1 + %425 = OpMatrixTimesVector %v4float %351 %424 + %426 = OpVectorShuffle %v3float %425 %425 0 1 2 + %427 = OpVectorShuffle %v3float %420 %420 0 1 2 + %428 = OpFSub %v3float %426 %427 + %429 = OpCompositeExtract %float %425 3 + %430 = OpCompositeExtract %float %420 3 + %431 = OpFAdd %float %429 %430 + %432 = OpCompositeConstruct %v3float %431 %431 %431 + %433 = OpFOrdLessThan %v3bool %428 %432 + %434 = OpSelect %v3int %433 %74 %65 + %435 = OpFAdd %v3float %426 %427 + %436 = OpFNegate %float %429 + %437 = OpFSub %float %436 %430 + %438 = OpCompositeConstruct %v3float %437 %437 %437 + %439 = OpFOrdGreaterThan %v3bool %435 %438 + %440 = OpSelect %v3int %439 %74 %65 + %441 = OpIMul %v3int %75 %440 + %442 = OpIAdd %v3int %434 %441 + %443 = OpCompositeExtract %float %365 0 + %444 = OpCompositeExtract %float %365 1 + %445 = OpCompositeExtract %float %365 2 + %446 = OpCompositeConstruct %v4float %443 %444 %445 %float_1 + %447 = OpMatrixTimesVector %v4float %351 %446 + %448 = OpVectorShuffle %v3float %447 %447 0 1 2 + %449 = OpFSub %v3float %448 %427 + %450 = OpCompositeExtract %float %447 3 + %451 = OpFAdd %float %450 %430 + %452 = OpCompositeConstruct %v3float %451 %451 %451 + %453 = OpFOrdLessThan %v3bool %449 %452 + %454 = OpSelect %v3int %453 %74 %65 + %455 = OpFAdd %v3float %448 %427 + %456 = OpFNegate %float %450 + %457 = OpFSub %float %456 %430 + %458 = OpCompositeConstruct %v3float %457 %457 %457 + %459 = OpFOrdGreaterThan %v3bool %455 %458 + %460 = OpSelect %v3int %459 %74 %65 + %461 = OpIMul %v3int %75 %460 + %462 = OpIAdd %v3int %454 %461 + %463 = OpBitwiseOr %v3int %442 %462 + %464 = OpCompositeExtract %float %371 0 + %465 = OpCompositeExtract %float %371 1 + %466 = OpCompositeExtract %float %371 2 + %467 = OpCompositeConstruct %v4float %464 %465 %466 %float_1 + %468 = OpMatrixTimesVector %v4float %351 %467 + %469 = OpVectorShuffle %v3float %468 %468 0 1 2 + %470 = OpFSub %v3float %469 %427 + %471 = OpCompositeExtract %float %468 3 + %472 = OpFAdd %float %471 %430 + %473 = OpCompositeConstruct %v3float %472 %472 %472 + %474 = OpFOrdLessThan %v3bool %470 %473 + %475 = OpSelect %v3int %474 %74 %65 + %476 = OpFAdd %v3float %469 %427 + %477 = OpFNegate %float %471 + %478 = OpFSub %float %477 %430 + %479 = OpCompositeConstruct %v3float %478 %478 %478 + %480 = OpFOrdGreaterThan %v3bool %476 %479 + %481 = OpSelect %v3int %480 %74 %65 + %482 = OpIMul %v3int %75 %481 + %483 = OpIAdd %v3int %475 %482 + %484 = OpBitwiseOr %v3int %463 %483 + %485 = OpINotEqual %v3bool %484 %66 + %486 = OpAny %bool %485 + OpSelectionMerge %487 None + OpBranchConditional %486 %488 %487 + %488 = OpLabel + OpBranch %417 + %487 = OpLabel + %489 = OpFSub %v3float %413 %414 + %490 = OpFSub %v3float %414 %415 + %491 = OpFSub %v3float %415 %413 + %492 = OpFAdd %v3float %413 %414 + %493 = OpFMul %v3float %69 %492 + %494 = OpFSub %v3float %493 %355 + %495 = OpFAdd %v3float %414 %415 + %496 = OpFMul %v3float %69 %495 + %497 = OpFSub %v3float %496 %355 + %498 = OpFAdd %v3float %415 %413 + %499 = OpFMul %v3float %69 %498 + %500 = OpFSub %v3float %499 %355 + %501 = OpDot %float %490 %490 + %502 = OpDot %float %497 %497 + %503 = OpFDiv %float %501 %502 + %504 = OpExtInst %float %1 Sqrt %503 + %505 = OpDot %float %491 %491 + %506 = OpDot %float %500 %500 + %507 = OpFDiv %float %505 %506 + %508 = OpExtInst %float %1 Sqrt %507 + %509 = OpDot %float %489 %489 + %510 = OpDot %float %494 %494 + %511 = OpFDiv %float %509 %510 + %512 = OpExtInst %float %1 Sqrt %511 + %513 = OpCompositeConstruct %v4float %504 %508 %512 %float_1 + %514 = OpFAdd %float %504 %508 + %515 = OpFAdd %float %514 %512 + %516 = OpFMul %float %float_0_333000004 %515 + %517 = OpCompositeInsert %v4float %516 %513 3 + %518 = OpCompositeConstruct %v4float %357 %357 %357 %357 + %519 = OpFMul %v4float %518 %517 + OpBranch %417 + %418 = OpLabel + OpBranch %416 + %417 = OpLabel + %520 = OpPhi %v4float %68 %488 %519 %487 + %521 = OpFMul %v4float %412 %520 + %522 = OpExtInst %v4float %1 FClamp %521 %59 %61 + %523 = OpCompositeExtract %float %522 0 + %524 = OpCompositeExtract %float %522 1 + %525 = OpCompositeExtract %float %522 2 + %526 = OpCompositeExtract %float %522 3 + %527 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_0 + OpStore %527 %523 + %528 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_1 + OpStore %528 %524 + %529 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_2 + OpStore %529 %525 + %530 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %uint_0 + OpStore %530 %526 + OpStore %out_var_PN_POSITION9 %387 + OpBranch %if_merge + %if_merge = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc new file mode 100644 index 000000000..98216e792 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.asm.tesc @@ -0,0 +1,352 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 179 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationControl %MainHull "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_VS_To_DS_Position %gl_InvocationID %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_VS_To_DS_Position %out_var_Flat_DisplacementScales %out_var_Flat_TessellationMultiplier %out_var_Flat_WorldDisplacementMultiplier %gl_TessLevelOuter %gl_TessLevelInner + OpExecutionMode %MainHull Triangles + OpExecutionMode %MainHull SpacingFractionalOdd + OpExecutionMode %MainHull VertexOrderCw + OpExecutionMode %MainHull OutputVertices 3 + OpSource HLSL 600 + OpName %FFlatTessellationHSToDS "FFlatTessellationHSToDS" + OpMemberName %FFlatTessellationHSToDS 0 "PassSpecificData" + OpMemberName %FFlatTessellationHSToDS 1 "DisplacementScale" + OpMemberName %FFlatTessellationHSToDS 2 "TessellationMultiplier" + OpMemberName %FFlatTessellationHSToDS 3 "WorldDisplacementMultiplier" + OpName %FBasePassVSToDS "FBasePassVSToDS" + OpMemberName %FBasePassVSToDS 0 "FactoryInterpolants" + OpMemberName %FBasePassVSToDS 1 "BasePassInterpolants" + OpMemberName %FBasePassVSToDS 2 "Position" + OpName %FVertexFactoryInterpolantsVSToDS "FVertexFactoryInterpolantsVSToDS" + OpMemberName %FVertexFactoryInterpolantsVSToDS 0 "InterpolantsVSToPS" + OpName %FVertexFactoryInterpolantsVSToPS "FVertexFactoryInterpolantsVSToPS" + OpMemberName %FVertexFactoryInterpolantsVSToPS 0 "TangentToWorld0" + OpMemberName %FVertexFactoryInterpolantsVSToPS 1 "TangentToWorld2" + OpName %FBasePassInterpolantsVSToDS "FBasePassInterpolantsVSToDS" + OpName %FSharedBasePassInterpolants "FSharedBasePassInterpolants" + OpName %type_Primitive "type.Primitive" + OpMemberName %type_Primitive 0 "Primitive_LocalToWorld" + OpMemberName %type_Primitive 1 "Primitive_InvNonUniformScaleAndDeterminantSign" + OpMemberName %type_Primitive 2 "Primitive_ObjectWorldPositionAndRadius" + OpMemberName %type_Primitive 3 "Primitive_WorldToLocal" + OpMemberName %type_Primitive 4 "Primitive_PreviousLocalToWorld" + OpMemberName %type_Primitive 5 "Primitive_PreviousWorldToLocal" + OpMemberName %type_Primitive 6 "Primitive_ActorWorldPosition" + OpMemberName %type_Primitive 7 "Primitive_UseSingleSampleShadowFromStationaryLights" + OpMemberName %type_Primitive 8 "Primitive_ObjectBounds" + OpMemberName %type_Primitive 9 "Primitive_LpvBiasMultiplier" + OpMemberName %type_Primitive 10 "Primitive_DecalReceiverMask" + OpMemberName %type_Primitive 11 "Primitive_PerObjectGBufferData" + OpMemberName %type_Primitive 12 "Primitive_UseVolumetricLightmapShadowFromStationaryLights" + OpMemberName %type_Primitive 13 "Primitive_DrawsVelocity" + OpMemberName %type_Primitive 14 "Primitive_ObjectOrientation" + OpMemberName %type_Primitive 15 "Primitive_NonUniformScale" + OpMemberName %type_Primitive 16 "Primitive_LocalObjectBoundsMin" + OpMemberName %type_Primitive 17 "Primitive_LightingChannelMask" + OpMemberName %type_Primitive 18 "Primitive_LocalObjectBoundsMax" + OpMemberName %type_Primitive 19 "Primitive_LightmapDataIndex" + OpMemberName %type_Primitive 20 "Primitive_PreSkinnedLocalBounds" + OpMemberName %type_Primitive 21 "Primitive_SingleCaptureIndex" + OpMemberName %type_Primitive 22 "Primitive_OutputVelocity" + OpMemberName %type_Primitive 23 "PrePadding_Primitive_420" + OpMemberName %type_Primitive 24 "PrePadding_Primitive_424" + OpMemberName %type_Primitive 25 "PrePadding_Primitive_428" + OpMemberName %type_Primitive 26 "Primitive_CustomPrimitiveData" + OpName %Primitive "Primitive" + OpName %type_Material "type.Material" + OpMemberName %type_Material 0 "Material_VectorExpressions" + OpMemberName %type_Material 1 "Material_ScalarExpressions" + OpName %Material "Material" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_VS_To_DS_Position "in.var.VS_To_DS_Position" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_VS_To_DS_Position "out.var.VS_To_DS_Position" + OpName %out_var_Flat_DisplacementScales "out.var.Flat_DisplacementScales" + OpName %out_var_Flat_TessellationMultiplier "out.var.Flat_TessellationMultiplier" + OpName %out_var_Flat_WorldDisplacementMultiplier "out.var.Flat_WorldDisplacementMultiplier" + OpName %MainHull "MainHull" + OpName %param_var_I "param.var.I" + OpName %temp_var_hullMainRetVal "temp.var.hullMainRetVal" + OpName %if_merge "if.merge" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorate %gl_InvocationID BuiltIn InvocationId + OpDecorateString %gl_InvocationID UserSemantic "SV_OutputControlPointID" + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %out_var_Flat_DisplacementScales UserSemantic "Flat_DisplacementScales" + OpDecorateString %out_var_Flat_TessellationMultiplier UserSemantic "Flat_TessellationMultiplier" + OpDecorateString %out_var_Flat_WorldDisplacementMultiplier UserSemantic "Flat_WorldDisplacementMultiplier" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorate %in_var_TEXCOORD10_centroid Location 0 + OpDecorate %in_var_TEXCOORD11_centroid Location 1 + OpDecorate %in_var_VS_To_DS_Position Location 2 + OpDecorate %out_var_Flat_DisplacementScales Location 0 + OpDecorate %out_var_Flat_TessellationMultiplier Location 1 + OpDecorate %out_var_Flat_WorldDisplacementMultiplier Location 2 + OpDecorate %out_var_TEXCOORD10_centroid Location 3 + OpDecorate %out_var_TEXCOORD11_centroid Location 4 + OpDecorate %out_var_VS_To_DS_Position Location 5 + OpDecorate %Primitive DescriptorSet 0 + OpDecorate %Primitive Binding 0 + OpDecorate %Material DescriptorSet 0 + OpDecorate %Material Binding 1 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_Primitive 0 Offset 0 + OpMemberDecorate %type_Primitive 0 MatrixStride 16 + OpMemberDecorate %type_Primitive 0 ColMajor + OpMemberDecorate %type_Primitive 1 Offset 64 + OpMemberDecorate %type_Primitive 2 Offset 80 + OpMemberDecorate %type_Primitive 3 Offset 96 + OpMemberDecorate %type_Primitive 3 MatrixStride 16 + OpMemberDecorate %type_Primitive 3 ColMajor + OpMemberDecorate %type_Primitive 4 Offset 160 + OpMemberDecorate %type_Primitive 4 MatrixStride 16 + OpMemberDecorate %type_Primitive 4 ColMajor + OpMemberDecorate %type_Primitive 5 Offset 224 + OpMemberDecorate %type_Primitive 5 MatrixStride 16 + OpMemberDecorate %type_Primitive 5 ColMajor + OpMemberDecorate %type_Primitive 6 Offset 288 + OpMemberDecorate %type_Primitive 7 Offset 300 + OpMemberDecorate %type_Primitive 8 Offset 304 + OpMemberDecorate %type_Primitive 9 Offset 316 + OpMemberDecorate %type_Primitive 10 Offset 320 + OpMemberDecorate %type_Primitive 11 Offset 324 + OpMemberDecorate %type_Primitive 12 Offset 328 + OpMemberDecorate %type_Primitive 13 Offset 332 + OpMemberDecorate %type_Primitive 14 Offset 336 + OpMemberDecorate %type_Primitive 15 Offset 352 + OpMemberDecorate %type_Primitive 16 Offset 368 + OpMemberDecorate %type_Primitive 17 Offset 380 + OpMemberDecorate %type_Primitive 18 Offset 384 + OpMemberDecorate %type_Primitive 19 Offset 396 + OpMemberDecorate %type_Primitive 20 Offset 400 + OpMemberDecorate %type_Primitive 21 Offset 412 + OpMemberDecorate %type_Primitive 22 Offset 416 + OpMemberDecorate %type_Primitive 23 Offset 420 + OpMemberDecorate %type_Primitive 24 Offset 424 + OpMemberDecorate %type_Primitive 25 Offset 428 + OpMemberDecorate %type_Primitive 26 Offset 432 + OpDecorate %type_Primitive Block + OpDecorate %_arr_v4float_uint_3 ArrayStride 16 + OpDecorate %_arr_v4float_uint_1 ArrayStride 16 + OpMemberDecorate %type_Material 0 Offset 0 + OpMemberDecorate %type_Material 1 Offset 48 + OpDecorate %type_Material Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_4 = OpConstant %uint 4 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %uint_3 = OpConstant %uint 3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %float_0_5 = OpConstant %float 0.5 + %int_1 = OpConstant %int 1 +%float_0_333000004 = OpConstant %float 0.333000004 + %float_1 = OpConstant %float 1 + %49 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_15 = OpConstant %float 15 + %51 = OpConstantComposite %v4float %float_15 %float_15 %float_15 %float_15 +%FVertexFactoryInterpolantsVSToPS = OpTypeStruct %v4float %v4float +%FVertexFactoryInterpolantsVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToPS +%FSharedBasePassInterpolants = OpTypeStruct +%FBasePassInterpolantsVSToDS = OpTypeStruct %FSharedBasePassInterpolants +%FBasePassVSToDS = OpTypeStruct %FVertexFactoryInterpolantsVSToDS %FBasePassInterpolantsVSToDS %v4float +%FFlatTessellationHSToDS = OpTypeStruct %FBasePassVSToDS %v3float %float %float + %int_15 = OpConstant %int 15 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 +%type_Primitive = OpTypeStruct %mat4v4float %v4float %v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %float %float %float %float %v4float %v4float %v3float %uint %v3float %uint %v3float %int %uint %uint %uint %uint %_arr_v4float_uint_4 +%_ptr_Uniform_type_Primitive = OpTypePointer Uniform %type_Primitive +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%type_Material = OpTypeStruct %_arr_v4float_uint_3 %_arr_v4float_uint_1 +%_ptr_Uniform_type_Material = OpTypePointer Uniform %type_Material +%_arr_v4float_uint_3_0 = OpTypeArray %v4float %uint_3 +%_ptr_Input__arr_v4float_uint_3_0 = OpTypePointer Input %_arr_v4float_uint_3_0 +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output__arr_v4float_uint_3_0 = OpTypePointer Output %_arr_v4float_uint_3_0 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Output__arr_v3float_uint_3 = OpTypePointer Output %_arr_v3float_uint_3 +%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2 + %void = OpTypeVoid + %67 = OpTypeFunction %void +%_arr_FBasePassVSToDS_uint_3 = OpTypeArray %FBasePassVSToDS %uint_3 +%_ptr_Function__arr_FBasePassVSToDS_uint_3 = OpTypePointer Function %_arr_FBasePassVSToDS_uint_3 +%_arr_FFlatTessellationHSToDS_uint_3 = OpTypeArray %FFlatTessellationHSToDS %uint_3 +%_ptr_Function__arr_FFlatTessellationHSToDS_uint_3 = OpTypePointer Function %_arr_FFlatTessellationHSToDS_uint_3 +%_ptr_Workgroup__arr_FFlatTessellationHSToDS_uint_3 = OpTypePointer Workgroup %_arr_FFlatTessellationHSToDS_uint_3 +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_ptr_Output_v3float = OpTypePointer Output %v3float +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Function_FFlatTessellationHSToDS = OpTypePointer Function %FFlatTessellationHSToDS +%_ptr_Workgroup_FFlatTessellationHSToDS = OpTypePointer Workgroup %FFlatTessellationHSToDS + %bool = OpTypeBool +%_ptr_Function_float = OpTypePointer Function %float +%_ptr_Workgroup_float = OpTypePointer Workgroup %float +%mat3v3float = OpTypeMatrix %v3float 3 +%_ptr_Function_FVertexFactoryInterpolantsVSToDS = OpTypePointer Function %FVertexFactoryInterpolantsVSToDS +%_ptr_Function_FBasePassVSToDS = OpTypePointer Function %FBasePassVSToDS +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float + %Primitive = OpVariable %_ptr_Uniform_type_Primitive Uniform + %Material = OpVariable %_ptr_Uniform_type_Material Uniform +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3_0 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3_0 Input +%in_var_VS_To_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_3_0 Input +%gl_InvocationID = OpVariable %_ptr_Input_uint Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3_0 Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output__arr_v4float_uint_3_0 Output +%out_var_VS_To_DS_Position = OpVariable %_ptr_Output__arr_v4float_uint_3_0 Output +%out_var_Flat_DisplacementScales = OpVariable %_ptr_Output__arr_v3float_uint_3 Output +%out_var_Flat_TessellationMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%out_var_Flat_WorldDisplacementMultiplier = OpVariable %_ptr_Output__arr_float_uint_3 Output +%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output +%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output + %83 = OpConstantNull %FSharedBasePassInterpolants + %84 = OpConstantComposite %FBasePassInterpolantsVSToDS %83 + %85 = OpUndef %v4float + +; XXX: Original asm used Function here, which is wrong. +; This patches the SPIR-V to be correct. +%temp_var_hullMainRetVal = OpVariable %_ptr_Workgroup__arr_FFlatTessellationHSToDS_uint_3 Workgroup + + %MainHull = OpFunction %void None %67 + %86 = OpLabel +%param_var_I = OpVariable %_ptr_Function__arr_FBasePassVSToDS_uint_3 Function + %87 = OpLoad %_arr_v4float_uint_3_0 %in_var_TEXCOORD10_centroid + %88 = OpLoad %_arr_v4float_uint_3_0 %in_var_TEXCOORD11_centroid + %89 = OpCompositeExtract %v4float %87 0 + %90 = OpCompositeExtract %v4float %88 0 + %91 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %89 %90 + %92 = OpCompositeExtract %v4float %87 1 + %93 = OpCompositeExtract %v4float %88 1 + %94 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %92 %93 + %95 = OpCompositeExtract %v4float %87 2 + %96 = OpCompositeExtract %v4float %88 2 + %97 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToPS %95 %96 + %98 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %91 + %99 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %94 + %100 = OpCompositeConstruct %FVertexFactoryInterpolantsVSToDS %97 + %101 = OpLoad %_arr_v4float_uint_3_0 %in_var_VS_To_DS_Position + %102 = OpCompositeExtract %v4float %101 0 + %103 = OpCompositeConstruct %FBasePassVSToDS %98 %84 %102 + %104 = OpCompositeExtract %v4float %101 1 + %105 = OpCompositeConstruct %FBasePassVSToDS %99 %84 %104 + %106 = OpCompositeExtract %v4float %101 2 + %107 = OpCompositeConstruct %FBasePassVSToDS %100 %84 %106 + %108 = OpCompositeConstruct %_arr_FBasePassVSToDS_uint_3 %103 %105 %107 + OpStore %param_var_I %108 + %109 = OpLoad %uint %gl_InvocationID + %110 = OpAccessChain %_ptr_Function_FVertexFactoryInterpolantsVSToDS %param_var_I %109 %int_0 + %111 = OpLoad %FVertexFactoryInterpolantsVSToDS %110 + %112 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %111 0 + %113 = OpCompositeExtract %v4float %112 0 + %114 = OpCompositeExtract %v4float %112 1 + %115 = OpVectorShuffle %v3float %113 %113 0 1 2 + %116 = OpVectorShuffle %v3float %114 %114 0 1 2 + %117 = OpExtInst %v3float %1 Cross %116 %115 + %118 = OpCompositeExtract %float %114 3 + %119 = OpCompositeConstruct %v3float %118 %118 %118 + %120 = OpFMul %v3float %117 %119 + %121 = OpCompositeConstruct %mat3v3float %115 %120 %116 + %122 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_15 + %123 = OpLoad %v4float %122 + %124 = OpVectorShuffle %v3float %123 %123 0 1 2 + %125 = OpVectorTimesMatrix %v3float %124 %121 + %126 = OpAccessChain %_ptr_Function_FBasePassVSToDS %param_var_I %109 + %127 = OpLoad %FBasePassVSToDS %126 + %128 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_0 + %129 = OpLoad %float %128 + %130 = OpCompositeConstruct %FFlatTessellationHSToDS %127 %125 %129 %float_1 + %131 = OpCompositeExtract %FVertexFactoryInterpolantsVSToDS %127 0 + %132 = OpCompositeExtract %FVertexFactoryInterpolantsVSToPS %131 0 + %133 = OpCompositeExtract %v4float %132 0 + %134 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD10_centroid %109 + OpStore %134 %133 + %135 = OpCompositeExtract %v4float %132 1 + %136 = OpAccessChain %_ptr_Output_v4float %out_var_TEXCOORD11_centroid %109 + OpStore %136 %135 + %137 = OpCompositeExtract %v4float %127 2 + %138 = OpAccessChain %_ptr_Output_v4float %out_var_VS_To_DS_Position %109 + OpStore %138 %137 + %139 = OpAccessChain %_ptr_Output_v3float %out_var_Flat_DisplacementScales %109 + OpStore %139 %125 + %140 = OpAccessChain %_ptr_Output_float %out_var_Flat_TessellationMultiplier %109 + OpStore %140 %129 + %141 = OpAccessChain %_ptr_Output_float %out_var_Flat_WorldDisplacementMultiplier %109 + OpStore %141 %float_1 + %142 = OpAccessChain %_ptr_Workgroup_FFlatTessellationHSToDS %temp_var_hullMainRetVal %109 + OpStore %142 %130 + OpControlBarrier %uint_2 %uint_4 %uint_0 + %143 = OpIEqual %bool %109 %uint_0 + OpSelectionMerge %if_merge None + OpBranchConditional %143 %144 %if_merge + %144 = OpLabel + %145 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_1 %int_2 + %146 = OpLoad %float %145 + %147 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_2 %int_2 + %148 = OpLoad %float %147 + %149 = OpFAdd %float %146 %148 + %150 = OpFMul %float %float_0_5 %149 + %151 = OpCompositeInsert %v4float %150 %85 0 + %152 = OpLoad %float %147 + %153 = OpAccessChain %_ptr_Workgroup_float %temp_var_hullMainRetVal %uint_0 %int_2 + %154 = OpLoad %float %153 + %155 = OpFAdd %float %152 %154 + %156 = OpFMul %float %float_0_5 %155 + %157 = OpCompositeInsert %v4float %156 %151 1 + %158 = OpLoad %float %153 + %159 = OpLoad %float %145 + %160 = OpFAdd %float %158 %159 + %161 = OpFMul %float %float_0_5 %160 + %162 = OpCompositeInsert %v4float %161 %157 2 + %163 = OpLoad %float %153 + %164 = OpLoad %float %145 + %165 = OpFAdd %float %163 %164 + %166 = OpLoad %float %147 + %167 = OpFAdd %float %165 %166 + %168 = OpFMul %float %float_0_333000004 %167 + %169 = OpCompositeInsert %v4float %168 %162 3 + %170 = OpExtInst %v4float %1 FClamp %169 %49 %51 + %171 = OpCompositeExtract %float %170 0 + %172 = OpCompositeExtract %float %170 1 + %173 = OpCompositeExtract %float %170 2 + %174 = OpCompositeExtract %float %170 3 + %175 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_0 + OpStore %175 %171 + %176 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_1 + OpStore %176 %172 + %177 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %uint_2 + OpStore %177 %173 + %178 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %uint_0 + OpStore %178 %174 + OpBranch %if_merge + %if_merge = OpLabel + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese new file mode 100644 index 000000000..dc543d1f8 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-double-gl-in-deref.asm.tese @@ -0,0 +1,1046 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 310 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpCapability StorageImageExtendedFormats + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationEvaluation %MainDomain "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_COLOR0 %in_var_TEXCOORD0 %in_var_PRIMITIVE_ID %in_var_VS_to_DS_Position %in_var_PN_POSITION %in_var_PN_DisplacementScales %in_var_PN_TessellationMultiplier %in_var_PN_WorldDisplacementMultiplier %gl_TessLevelOuter %gl_TessLevelInner %in_var_PN_POSITION9 %gl_TessCoord %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_COLOR0 %out_var_TEXCOORD0 %out_var_PRIMITIVE_ID %out_var_TEXCOORD6 %out_var_TEXCOORD8 %out_var_TEXCOORD7 %gl_Position + OpExecutionMode %MainDomain Triangles + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_sampler "type.sampler" + OpName %type_2d_image "type.2d.image" + OpName %type_ShadowDepthPass "type.ShadowDepthPass" + OpMemberName %type_ShadowDepthPass 0 "PrePadding_ShadowDepthPass_LPV_0" + OpMemberName %type_ShadowDepthPass 1 "PrePadding_ShadowDepthPass_LPV_4" + OpMemberName %type_ShadowDepthPass 2 "PrePadding_ShadowDepthPass_LPV_8" + OpMemberName %type_ShadowDepthPass 3 "PrePadding_ShadowDepthPass_LPV_12" + OpMemberName %type_ShadowDepthPass 4 "PrePadding_ShadowDepthPass_LPV_16" + OpMemberName %type_ShadowDepthPass 5 "PrePadding_ShadowDepthPass_LPV_20" + OpMemberName %type_ShadowDepthPass 6 "PrePadding_ShadowDepthPass_LPV_24" + OpMemberName %type_ShadowDepthPass 7 "PrePadding_ShadowDepthPass_LPV_28" + OpMemberName %type_ShadowDepthPass 8 "PrePadding_ShadowDepthPass_LPV_32" + OpMemberName %type_ShadowDepthPass 9 "PrePadding_ShadowDepthPass_LPV_36" + OpMemberName %type_ShadowDepthPass 10 "PrePadding_ShadowDepthPass_LPV_40" + OpMemberName %type_ShadowDepthPass 11 "PrePadding_ShadowDepthPass_LPV_44" + OpMemberName %type_ShadowDepthPass 12 "PrePadding_ShadowDepthPass_LPV_48" + OpMemberName %type_ShadowDepthPass 13 "PrePadding_ShadowDepthPass_LPV_52" + OpMemberName %type_ShadowDepthPass 14 "PrePadding_ShadowDepthPass_LPV_56" + OpMemberName %type_ShadowDepthPass 15 "PrePadding_ShadowDepthPass_LPV_60" + OpMemberName %type_ShadowDepthPass 16 "PrePadding_ShadowDepthPass_LPV_64" + OpMemberName %type_ShadowDepthPass 17 "PrePadding_ShadowDepthPass_LPV_68" + OpMemberName %type_ShadowDepthPass 18 "PrePadding_ShadowDepthPass_LPV_72" + OpMemberName %type_ShadowDepthPass 19 "PrePadding_ShadowDepthPass_LPV_76" + OpMemberName %type_ShadowDepthPass 20 "PrePadding_ShadowDepthPass_LPV_80" + OpMemberName %type_ShadowDepthPass 21 "PrePadding_ShadowDepthPass_LPV_84" + OpMemberName %type_ShadowDepthPass 22 "PrePadding_ShadowDepthPass_LPV_88" + OpMemberName %type_ShadowDepthPass 23 "PrePadding_ShadowDepthPass_LPV_92" + OpMemberName %type_ShadowDepthPass 24 "PrePadding_ShadowDepthPass_LPV_96" + OpMemberName %type_ShadowDepthPass 25 "PrePadding_ShadowDepthPass_LPV_100" + OpMemberName %type_ShadowDepthPass 26 "PrePadding_ShadowDepthPass_LPV_104" + OpMemberName %type_ShadowDepthPass 27 "PrePadding_ShadowDepthPass_LPV_108" + OpMemberName %type_ShadowDepthPass 28 "PrePadding_ShadowDepthPass_LPV_112" + OpMemberName %type_ShadowDepthPass 29 "PrePadding_ShadowDepthPass_LPV_116" + OpMemberName %type_ShadowDepthPass 30 "PrePadding_ShadowDepthPass_LPV_120" + OpMemberName %type_ShadowDepthPass 31 "PrePadding_ShadowDepthPass_LPV_124" + OpMemberName %type_ShadowDepthPass 32 "PrePadding_ShadowDepthPass_LPV_128" + OpMemberName %type_ShadowDepthPass 33 "PrePadding_ShadowDepthPass_LPV_132" + OpMemberName %type_ShadowDepthPass 34 "PrePadding_ShadowDepthPass_LPV_136" + OpMemberName %type_ShadowDepthPass 35 "PrePadding_ShadowDepthPass_LPV_140" + OpMemberName %type_ShadowDepthPass 36 "PrePadding_ShadowDepthPass_LPV_144" + OpMemberName %type_ShadowDepthPass 37 "PrePadding_ShadowDepthPass_LPV_148" + OpMemberName %type_ShadowDepthPass 38 "PrePadding_ShadowDepthPass_LPV_152" + OpMemberName %type_ShadowDepthPass 39 "PrePadding_ShadowDepthPass_LPV_156" + OpMemberName %type_ShadowDepthPass 40 "PrePadding_ShadowDepthPass_LPV_160" + OpMemberName %type_ShadowDepthPass 41 "PrePadding_ShadowDepthPass_LPV_164" + OpMemberName %type_ShadowDepthPass 42 "PrePadding_ShadowDepthPass_LPV_168" + OpMemberName %type_ShadowDepthPass 43 "PrePadding_ShadowDepthPass_LPV_172" + OpMemberName %type_ShadowDepthPass 44 "PrePadding_ShadowDepthPass_LPV_176" + OpMemberName %type_ShadowDepthPass 45 "PrePadding_ShadowDepthPass_LPV_180" + OpMemberName %type_ShadowDepthPass 46 "PrePadding_ShadowDepthPass_LPV_184" + OpMemberName %type_ShadowDepthPass 47 "PrePadding_ShadowDepthPass_LPV_188" + OpMemberName %type_ShadowDepthPass 48 "PrePadding_ShadowDepthPass_LPV_192" + OpMemberName %type_ShadowDepthPass 49 "PrePadding_ShadowDepthPass_LPV_196" + OpMemberName %type_ShadowDepthPass 50 "PrePadding_ShadowDepthPass_LPV_200" + OpMemberName %type_ShadowDepthPass 51 "PrePadding_ShadowDepthPass_LPV_204" + OpMemberName %type_ShadowDepthPass 52 "PrePadding_ShadowDepthPass_LPV_208" + OpMemberName %type_ShadowDepthPass 53 "PrePadding_ShadowDepthPass_LPV_212" + OpMemberName %type_ShadowDepthPass 54 "PrePadding_ShadowDepthPass_LPV_216" + OpMemberName %type_ShadowDepthPass 55 "PrePadding_ShadowDepthPass_LPV_220" + OpMemberName %type_ShadowDepthPass 56 "PrePadding_ShadowDepthPass_LPV_224" + OpMemberName %type_ShadowDepthPass 57 "PrePadding_ShadowDepthPass_LPV_228" + OpMemberName %type_ShadowDepthPass 58 "PrePadding_ShadowDepthPass_LPV_232" + OpMemberName %type_ShadowDepthPass 59 "PrePadding_ShadowDepthPass_LPV_236" + OpMemberName %type_ShadowDepthPass 60 "PrePadding_ShadowDepthPass_LPV_240" + OpMemberName %type_ShadowDepthPass 61 "PrePadding_ShadowDepthPass_LPV_244" + OpMemberName %type_ShadowDepthPass 62 "PrePadding_ShadowDepthPass_LPV_248" + OpMemberName %type_ShadowDepthPass 63 "PrePadding_ShadowDepthPass_LPV_252" + OpMemberName %type_ShadowDepthPass 64 "PrePadding_ShadowDepthPass_LPV_256" + OpMemberName %type_ShadowDepthPass 65 "PrePadding_ShadowDepthPass_LPV_260" + OpMemberName %type_ShadowDepthPass 66 "PrePadding_ShadowDepthPass_LPV_264" + OpMemberName %type_ShadowDepthPass 67 "PrePadding_ShadowDepthPass_LPV_268" + OpMemberName %type_ShadowDepthPass 68 "ShadowDepthPass_LPV_mRsmToWorld" + OpMemberName %type_ShadowDepthPass 69 "ShadowDepthPass_LPV_mLightColour" + OpMemberName %type_ShadowDepthPass 70 "ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection" + OpMemberName %type_ShadowDepthPass 71 "ShadowDepthPass_LPV_mEyePos" + OpMemberName %type_ShadowDepthPass 72 "ShadowDepthPass_LPV_mOldGridOffset" + OpMemberName %type_ShadowDepthPass 73 "PrePadding_ShadowDepthPass_LPV_396" + OpMemberName %type_ShadowDepthPass 74 "ShadowDepthPass_LPV_mLpvGridOffset" + OpMemberName %type_ShadowDepthPass 75 "ShadowDepthPass_LPV_ClearMultiplier" + OpMemberName %type_ShadowDepthPass 76 "ShadowDepthPass_LPV_LpvScale" + OpMemberName %type_ShadowDepthPass 77 "ShadowDepthPass_LPV_OneOverLpvScale" + OpMemberName %type_ShadowDepthPass 78 "ShadowDepthPass_LPV_DirectionalOcclusionIntensity" + OpMemberName %type_ShadowDepthPass 79 "ShadowDepthPass_LPV_DirectionalOcclusionRadius" + OpMemberName %type_ShadowDepthPass 80 "ShadowDepthPass_LPV_RsmAreaIntensityMultiplier" + OpMemberName %type_ShadowDepthPass 81 "ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier" + OpMemberName %type_ShadowDepthPass 82 "ShadowDepthPass_LPV_SecondaryOcclusionStrength" + OpMemberName %type_ShadowDepthPass 83 "ShadowDepthPass_LPV_SecondaryBounceStrength" + OpMemberName %type_ShadowDepthPass 84 "ShadowDepthPass_LPV_VplInjectionBias" + OpMemberName %type_ShadowDepthPass 85 "ShadowDepthPass_LPV_GeometryVolumeInjectionBias" + OpMemberName %type_ShadowDepthPass 86 "ShadowDepthPass_LPV_EmissiveInjectionMultiplier" + OpMemberName %type_ShadowDepthPass 87 "ShadowDepthPass_LPV_PropagationIndex" + OpMemberName %type_ShadowDepthPass 88 "ShadowDepthPass_ProjectionMatrix" + OpMemberName %type_ShadowDepthPass 89 "ShadowDepthPass_ViewMatrix" + OpMemberName %type_ShadowDepthPass 90 "ShadowDepthPass_ShadowParams" + OpMemberName %type_ShadowDepthPass 91 "ShadowDepthPass_bClampToNearPlane" + OpMemberName %type_ShadowDepthPass 92 "PrePadding_ShadowDepthPass_612" + OpMemberName %type_ShadowDepthPass 93 "PrePadding_ShadowDepthPass_616" + OpMemberName %type_ShadowDepthPass 94 "PrePadding_ShadowDepthPass_620" + OpMemberName %type_ShadowDepthPass 95 "ShadowDepthPass_ShadowViewProjectionMatrices" + OpMemberName %type_ShadowDepthPass 96 "ShadowDepthPass_ShadowViewMatrices" + OpName %ShadowDepthPass "ShadowDepthPass" + OpName %Material_Texture2D_3 "Material_Texture2D_3" + OpName %Material_Texture2D_3Sampler "Material_Texture2D_3Sampler" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_COLOR0 "in.var.COLOR0" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_PRIMITIVE_ID "in.var.PRIMITIVE_ID" + OpName %in_var_VS_to_DS_Position "in.var.VS_to_DS_Position" + OpName %in_var_PN_POSITION "in.var.PN_POSITION" + OpName %in_var_PN_DisplacementScales "in.var.PN_DisplacementScales" + OpName %in_var_PN_TessellationMultiplier "in.var.PN_TessellationMultiplier" + OpName %in_var_PN_WorldDisplacementMultiplier "in.var.PN_WorldDisplacementMultiplier" + OpName %in_var_PN_POSITION9 "in.var.PN_POSITION9" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_COLOR0 "out.var.COLOR0" + OpName %out_var_TEXCOORD0 "out.var.TEXCOORD0" + OpName %out_var_PRIMITIVE_ID "out.var.PRIMITIVE_ID" + OpName %out_var_TEXCOORD6 "out.var.TEXCOORD6" + OpName %out_var_TEXCOORD8 "out.var.TEXCOORD8" + OpName %out_var_TEXCOORD7 "out.var.TEXCOORD7" + OpName %MainDomain "MainDomain" + OpName %type_sampled_image "type.sampled.image" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_COLOR0 UserSemantic "COLOR0" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorateString %in_var_VS_to_DS_Position UserSemantic "VS_to_DS_Position" + OpDecorateString %in_var_PN_POSITION UserSemantic "PN_POSITION" + OpDecorateString %in_var_PN_DisplacementScales UserSemantic "PN_DisplacementScales" + OpDecorateString %in_var_PN_TessellationMultiplier UserSemantic "PN_TessellationMultiplier" + OpDecorateString %in_var_PN_WorldDisplacementMultiplier UserSemantic "PN_WorldDisplacementMultiplier" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %in_var_PN_POSITION9 UserSemantic "PN_POSITION9" + OpDecorate %in_var_PN_POSITION9 Patch + OpDecorate %gl_TessCoord BuiltIn TessCoord + OpDecorateString %gl_TessCoord UserSemantic "SV_DomainLocation" + OpDecorate %gl_TessCoord Patch + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_COLOR0 UserSemantic "COLOR0" + OpDecorateString %out_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %out_var_PRIMITIVE_ID UserSemantic "PRIMITIVE_ID" + OpDecorateString %out_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %out_var_TEXCOORD8 UserSemantic "TEXCOORD8" + OpDecorateString %out_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorate %in_var_COLOR0 Location 0 + OpDecorate %in_var_PN_DisplacementScales Location 1 + OpDecorate %in_var_PN_POSITION Location 2 + OpDecorate %in_var_PN_POSITION9 Location 5 + OpDecorate %in_var_PN_TessellationMultiplier Location 6 + OpDecorate %in_var_PN_WorldDisplacementMultiplier Location 7 + OpDecorate %in_var_PRIMITIVE_ID Location 8 + OpDecorate %in_var_TEXCOORD0 Location 9 + OpDecorate %in_var_TEXCOORD10_centroid Location 10 + OpDecorate %in_var_TEXCOORD11_centroid Location 11 + OpDecorate %in_var_VS_to_DS_Position Location 12 + OpDecorate %out_var_TEXCOORD10_centroid Location 0 + OpDecorate %out_var_TEXCOORD11_centroid Location 1 + OpDecorate %out_var_COLOR0 Location 2 + OpDecorate %out_var_TEXCOORD0 Location 3 + OpDecorate %out_var_PRIMITIVE_ID Location 4 + OpDecorate %out_var_TEXCOORD6 Location 5 + OpDecorate %out_var_TEXCOORD8 Location 6 + OpDecorate %out_var_TEXCOORD7 Location 7 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %ShadowDepthPass DescriptorSet 0 + OpDecorate %ShadowDepthPass Binding 1 + OpDecorate %Material_Texture2D_3 DescriptorSet 0 + OpDecorate %Material_Texture2D_3 Binding 0 + OpDecorate %Material_Texture2D_3Sampler DescriptorSet 0 + OpDecorate %Material_Texture2D_3Sampler Binding 0 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpDecorate %type_View Block + OpDecorate %_arr_mat4v4float_uint_6 ArrayStride 64 + OpMemberDecorate %type_ShadowDepthPass 0 Offset 0 + OpMemberDecorate %type_ShadowDepthPass 1 Offset 4 + OpMemberDecorate %type_ShadowDepthPass 2 Offset 8 + OpMemberDecorate %type_ShadowDepthPass 3 Offset 12 + OpMemberDecorate %type_ShadowDepthPass 4 Offset 16 + OpMemberDecorate %type_ShadowDepthPass 5 Offset 20 + OpMemberDecorate %type_ShadowDepthPass 6 Offset 24 + OpMemberDecorate %type_ShadowDepthPass 7 Offset 28 + OpMemberDecorate %type_ShadowDepthPass 8 Offset 32 + OpMemberDecorate %type_ShadowDepthPass 9 Offset 36 + OpMemberDecorate %type_ShadowDepthPass 10 Offset 40 + OpMemberDecorate %type_ShadowDepthPass 11 Offset 44 + OpMemberDecorate %type_ShadowDepthPass 12 Offset 48 + OpMemberDecorate %type_ShadowDepthPass 13 Offset 52 + OpMemberDecorate %type_ShadowDepthPass 14 Offset 56 + OpMemberDecorate %type_ShadowDepthPass 15 Offset 60 + OpMemberDecorate %type_ShadowDepthPass 16 Offset 64 + OpMemberDecorate %type_ShadowDepthPass 17 Offset 68 + OpMemberDecorate %type_ShadowDepthPass 18 Offset 72 + OpMemberDecorate %type_ShadowDepthPass 19 Offset 76 + OpMemberDecorate %type_ShadowDepthPass 20 Offset 80 + OpMemberDecorate %type_ShadowDepthPass 21 Offset 84 + OpMemberDecorate %type_ShadowDepthPass 22 Offset 88 + OpMemberDecorate %type_ShadowDepthPass 23 Offset 92 + OpMemberDecorate %type_ShadowDepthPass 24 Offset 96 + OpMemberDecorate %type_ShadowDepthPass 25 Offset 100 + OpMemberDecorate %type_ShadowDepthPass 26 Offset 104 + OpMemberDecorate %type_ShadowDepthPass 27 Offset 108 + OpMemberDecorate %type_ShadowDepthPass 28 Offset 112 + OpMemberDecorate %type_ShadowDepthPass 29 Offset 116 + OpMemberDecorate %type_ShadowDepthPass 30 Offset 120 + OpMemberDecorate %type_ShadowDepthPass 31 Offset 124 + OpMemberDecorate %type_ShadowDepthPass 32 Offset 128 + OpMemberDecorate %type_ShadowDepthPass 33 Offset 132 + OpMemberDecorate %type_ShadowDepthPass 34 Offset 136 + OpMemberDecorate %type_ShadowDepthPass 35 Offset 140 + OpMemberDecorate %type_ShadowDepthPass 36 Offset 144 + OpMemberDecorate %type_ShadowDepthPass 37 Offset 148 + OpMemberDecorate %type_ShadowDepthPass 38 Offset 152 + OpMemberDecorate %type_ShadowDepthPass 39 Offset 156 + OpMemberDecorate %type_ShadowDepthPass 40 Offset 160 + OpMemberDecorate %type_ShadowDepthPass 41 Offset 164 + OpMemberDecorate %type_ShadowDepthPass 42 Offset 168 + OpMemberDecorate %type_ShadowDepthPass 43 Offset 172 + OpMemberDecorate %type_ShadowDepthPass 44 Offset 176 + OpMemberDecorate %type_ShadowDepthPass 45 Offset 180 + OpMemberDecorate %type_ShadowDepthPass 46 Offset 184 + OpMemberDecorate %type_ShadowDepthPass 47 Offset 188 + OpMemberDecorate %type_ShadowDepthPass 48 Offset 192 + OpMemberDecorate %type_ShadowDepthPass 49 Offset 196 + OpMemberDecorate %type_ShadowDepthPass 50 Offset 200 + OpMemberDecorate %type_ShadowDepthPass 51 Offset 204 + OpMemberDecorate %type_ShadowDepthPass 52 Offset 208 + OpMemberDecorate %type_ShadowDepthPass 53 Offset 212 + OpMemberDecorate %type_ShadowDepthPass 54 Offset 216 + OpMemberDecorate %type_ShadowDepthPass 55 Offset 220 + OpMemberDecorate %type_ShadowDepthPass 56 Offset 224 + OpMemberDecorate %type_ShadowDepthPass 57 Offset 228 + OpMemberDecorate %type_ShadowDepthPass 58 Offset 232 + OpMemberDecorate %type_ShadowDepthPass 59 Offset 236 + OpMemberDecorate %type_ShadowDepthPass 60 Offset 240 + OpMemberDecorate %type_ShadowDepthPass 61 Offset 244 + OpMemberDecorate %type_ShadowDepthPass 62 Offset 248 + OpMemberDecorate %type_ShadowDepthPass 63 Offset 252 + OpMemberDecorate %type_ShadowDepthPass 64 Offset 256 + OpMemberDecorate %type_ShadowDepthPass 65 Offset 260 + OpMemberDecorate %type_ShadowDepthPass 66 Offset 264 + OpMemberDecorate %type_ShadowDepthPass 67 Offset 268 + OpMemberDecorate %type_ShadowDepthPass 68 Offset 272 + OpMemberDecorate %type_ShadowDepthPass 68 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 68 ColMajor + OpMemberDecorate %type_ShadowDepthPass 69 Offset 336 + OpMemberDecorate %type_ShadowDepthPass 70 Offset 352 + OpMemberDecorate %type_ShadowDepthPass 71 Offset 368 + OpMemberDecorate %type_ShadowDepthPass 72 Offset 384 + OpMemberDecorate %type_ShadowDepthPass 73 Offset 396 + OpMemberDecorate %type_ShadowDepthPass 74 Offset 400 + OpMemberDecorate %type_ShadowDepthPass 75 Offset 412 + OpMemberDecorate %type_ShadowDepthPass 76 Offset 416 + OpMemberDecorate %type_ShadowDepthPass 77 Offset 420 + OpMemberDecorate %type_ShadowDepthPass 78 Offset 424 + OpMemberDecorate %type_ShadowDepthPass 79 Offset 428 + OpMemberDecorate %type_ShadowDepthPass 80 Offset 432 + OpMemberDecorate %type_ShadowDepthPass 81 Offset 436 + OpMemberDecorate %type_ShadowDepthPass 82 Offset 440 + OpMemberDecorate %type_ShadowDepthPass 83 Offset 444 + OpMemberDecorate %type_ShadowDepthPass 84 Offset 448 + OpMemberDecorate %type_ShadowDepthPass 85 Offset 452 + OpMemberDecorate %type_ShadowDepthPass 86 Offset 456 + OpMemberDecorate %type_ShadowDepthPass 87 Offset 460 + OpMemberDecorate %type_ShadowDepthPass 88 Offset 464 + OpMemberDecorate %type_ShadowDepthPass 88 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 88 ColMajor + OpMemberDecorate %type_ShadowDepthPass 89 Offset 528 + OpMemberDecorate %type_ShadowDepthPass 89 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 89 ColMajor + OpMemberDecorate %type_ShadowDepthPass 90 Offset 592 + OpMemberDecorate %type_ShadowDepthPass 91 Offset 608 + OpMemberDecorate %type_ShadowDepthPass 92 Offset 612 + OpMemberDecorate %type_ShadowDepthPass 93 Offset 616 + OpMemberDecorate %type_ShadowDepthPass 94 Offset 620 + OpMemberDecorate %type_ShadowDepthPass 95 Offset 624 + OpMemberDecorate %type_ShadowDepthPass 95 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 95 ColMajor + OpMemberDecorate %type_ShadowDepthPass 96 Offset 1008 + OpMemberDecorate %type_ShadowDepthPass 96 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 96 ColMajor + OpDecorate %type_ShadowDepthPass Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %float_3 = OpConstant %float 3 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %float_6 = OpConstant %float 6 + %57 = OpConstantComposite %v4float %float_6 %float_6 %float_6 %float_6 + %float_1 = OpConstant %float 1 + %int_79 = OpConstant %int 79 +%float_0_200000003 = OpConstant %float 0.200000003 +%float_n0_699999988 = OpConstant %float -0.699999988 + %float_2 = OpConstant %float 2 + %63 = OpConstantComposite %v2float %float_1 %float_2 + %float_n1 = OpConstant %float -1 + %float_10 = OpConstant %float 10 + %float_0_5 = OpConstant %float 0.5 + %67 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %int_88 = OpConstant %int 88 + %int_89 = OpConstant %int 89 + %int_90 = OpConstant %int 90 + %int_91 = OpConstant %int 91 + %float_0 = OpConstant %float 0 +%float_9_99999997en07 = OpConstant %float 9.99999997e-07 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image + %uint_6 = OpConstant %uint 6 +%_arr_mat4v4float_uint_6 = OpTypeArray %mat4v4float %uint_6 + %v3int = OpTypeVector %int 3 +%type_ShadowDepthPass = OpTypeStruct %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %mat4v4float %v4float %v4float %v4float %v3int %int %v3int %float %float %float %float %float %float %float %float %float %float %float %float %int %mat4v4float %mat4v4float %v4float %float %float %float %float %_arr_mat4v4float_uint_6 %_arr_mat4v4float_uint_6 +%_ptr_Uniform_type_ShadowDepthPass = OpTypePointer Uniform %type_ShadowDepthPass + %uint_3 = OpConstant %uint 3 +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%_ptr_Input__arr_v4float_uint_3 = OpTypePointer Input %_arr_v4float_uint_3 +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%_arr__arr_v4float_uint_1_uint_3 = OpTypeArray %_arr_v4float_uint_1 %uint_3 +%_ptr_Input__arr__arr_v4float_uint_1_uint_3 = OpTypePointer Input %_arr__arr_v4float_uint_1_uint_3 +%_arr_uint_uint_3 = OpTypeArray %uint %uint_3 +%_ptr_Input__arr_uint_uint_3 = OpTypePointer Input %_arr_uint_uint_3 +%_arr__arr_v4float_uint_3_uint_3 = OpTypeArray %_arr_v4float_uint_3 %uint_3 +%_ptr_Input__arr__arr_v4float_uint_3_uint_3 = OpTypePointer Input %_arr__arr_v4float_uint_3_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Input__arr_v3float_uint_3 = OpTypePointer Input %_arr_v3float_uint_3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 +%_ptr_Input__arr_float_uint_3 = OpTypePointer Input %_arr_float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Input__arr_float_uint_4 = OpTypePointer Input %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Input__arr_float_uint_2 = OpTypePointer Input %_arr_float_uint_2 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_v3float = OpTypePointer Input %v3float +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_ptr_Output__arr_v4float_uint_1 = OpTypePointer Output %_arr_v4float_uint_1 +%_ptr_Output_uint = OpTypePointer Output %uint +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Output_v3float = OpTypePointer Output %v3float + %void = OpTypeVoid + %106 = OpTypeFunction %void +%_ptr_Function_float = OpTypePointer Function %float + %bool = OpTypeBool +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%type_sampled_image = OpTypeSampledImage %type_2d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform +%ShadowDepthPass = OpVariable %_ptr_Uniform_type_ShadowDepthPass Uniform +%Material_Texture2D_3 = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%Material_Texture2D_3Sampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_COLOR0 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input__arr__arr_v4float_uint_1_uint_3 Input +%in_var_PRIMITIVE_ID = OpVariable %_ptr_Input__arr_uint_uint_3 Input +%in_var_VS_to_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_POSITION = OpVariable %_ptr_Input__arr__arr_v4float_uint_3_uint_3 Input +%in_var_PN_DisplacementScales = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_TessellationMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%in_var_PN_WorldDisplacementMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%gl_TessLevelOuter = OpVariable %_ptr_Input__arr_float_uint_4 Input +%gl_TessLevelInner = OpVariable %_ptr_Input__arr_float_uint_2 Input +%in_var_PN_POSITION9 = OpVariable %_ptr_Input_v4float Input +%gl_TessCoord = OpVariable %_ptr_Input_v3float Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_COLOR0 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD0 = OpVariable %_ptr_Output__arr_v4float_uint_1 Output +%out_var_PRIMITIVE_ID = OpVariable %_ptr_Output_uint Output +%out_var_TEXCOORD6 = OpVariable %_ptr_Output_float Output +%out_var_TEXCOORD8 = OpVariable %_ptr_Output_float Output +%out_var_TEXCOORD7 = OpVariable %_ptr_Output_v3float Output +%gl_Position = OpVariable %_ptr_Output_v4float Output + %112 = OpConstantNull %v4float + %113 = OpUndef %v4float +%_ptr_Input_uint = OpTypePointer Input %uint + %MainDomain = OpFunction %void None %106 + %115 = OpLabel + %116 = OpVariable %_ptr_Function_mat4v4float Function + %117 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD10_centroid + %118 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD11_centroid + %119 = OpLoad %_arr_v4float_uint_3 %in_var_COLOR0 + %120 = OpLoad %_arr__arr_v4float_uint_1_uint_3 %in_var_TEXCOORD0 + %121 = OpAccessChain %_ptr_Input_uint %in_var_PRIMITIVE_ID %uint_0 + %122 = OpLoad %uint %121 + %123 = OpCompositeExtract %v4float %117 0 + %124 = OpCompositeExtract %v4float %118 0 + %125 = OpCompositeExtract %v4float %119 0 + %126 = OpCompositeExtract %_arr_v4float_uint_1 %120 0 + %127 = OpCompositeExtract %v4float %117 1 + %128 = OpCompositeExtract %v4float %118 1 + %129 = OpCompositeExtract %v4float %119 1 + %130 = OpCompositeExtract %_arr_v4float_uint_1 %120 1 + %131 = OpCompositeExtract %v4float %117 2 + %132 = OpCompositeExtract %v4float %118 2 + %133 = OpCompositeExtract %v4float %119 2 + %134 = OpCompositeExtract %_arr_v4float_uint_1 %120 2 + %135 = OpLoad %_arr__arr_v4float_uint_3_uint_3 %in_var_PN_POSITION + %136 = OpLoad %_arr_float_uint_3 %in_var_PN_WorldDisplacementMultiplier + %137 = OpCompositeExtract %_arr_v4float_uint_3 %135 0 + %138 = OpCompositeExtract %float %136 0 + %139 = OpCompositeExtract %_arr_v4float_uint_3 %135 1 + %140 = OpCompositeExtract %float %136 1 + %141 = OpCompositeExtract %_arr_v4float_uint_3 %135 2 + %142 = OpCompositeExtract %float %136 2 + %143 = OpCompositeExtract %v4float %137 0 + %144 = OpCompositeExtract %v4float %137 1 + %145 = OpCompositeExtract %v4float %137 2 + %146 = OpCompositeExtract %v4float %139 0 + %147 = OpCompositeExtract %v4float %139 1 + %148 = OpCompositeExtract %v4float %139 2 + %149 = OpCompositeExtract %v4float %141 0 + %150 = OpCompositeExtract %v4float %141 1 + %151 = OpCompositeExtract %v4float %141 2 + %152 = OpLoad %v4float %in_var_PN_POSITION9 + %153 = OpLoad %v3float %gl_TessCoord + %154 = OpCompositeExtract %float %153 0 + %155 = OpCompositeExtract %float %153 1 + %156 = OpCompositeExtract %float %153 2 + %157 = OpFMul %float %154 %154 + %158 = OpFMul %float %155 %155 + %159 = OpFMul %float %156 %156 + %160 = OpFMul %float %157 %float_3 + %161 = OpFMul %float %158 %float_3 + %162 = OpFMul %float %159 %float_3 + %163 = OpCompositeConstruct %v4float %157 %157 %157 %157 + %164 = OpFMul %v4float %143 %163 + %165 = OpCompositeConstruct %v4float %154 %154 %154 %154 + %166 = OpFMul %v4float %164 %165 + %167 = OpCompositeConstruct %v4float %158 %158 %158 %158 + %168 = OpFMul %v4float %146 %167 + %169 = OpCompositeConstruct %v4float %155 %155 %155 %155 + %170 = OpFMul %v4float %168 %169 + %171 = OpFAdd %v4float %166 %170 + %172 = OpCompositeConstruct %v4float %159 %159 %159 %159 + %173 = OpFMul %v4float %149 %172 + %174 = OpCompositeConstruct %v4float %156 %156 %156 %156 + %175 = OpFMul %v4float %173 %174 + %176 = OpFAdd %v4float %171 %175 + %177 = OpCompositeConstruct %v4float %160 %160 %160 %160 + %178 = OpFMul %v4float %144 %177 + %179 = OpFMul %v4float %178 %169 + %180 = OpFAdd %v4float %176 %179 + %181 = OpCompositeConstruct %v4float %161 %161 %161 %161 + %182 = OpFMul %v4float %145 %181 + %183 = OpFMul %v4float %182 %165 + %184 = OpFAdd %v4float %180 %183 + %185 = OpFMul %v4float %147 %181 + %186 = OpFMul %v4float %185 %174 + %187 = OpFAdd %v4float %184 %186 + %188 = OpCompositeConstruct %v4float %162 %162 %162 %162 + %189 = OpFMul %v4float %148 %188 + %190 = OpFMul %v4float %189 %169 + %191 = OpFAdd %v4float %187 %190 + %192 = OpFMul %v4float %150 %188 + %193 = OpFMul %v4float %192 %165 + %194 = OpFAdd %v4float %191 %193 + %195 = OpFMul %v4float %151 %177 + %196 = OpFMul %v4float %195 %174 + %197 = OpFAdd %v4float %194 %196 + %198 = OpFMul %v4float %152 %57 + %199 = OpFMul %v4float %198 %174 + %200 = OpFMul %v4float %199 %165 + %201 = OpFMul %v4float %200 %169 + %202 = OpFAdd %v4float %197 %201 + %203 = OpCompositeExtract %v4float %126 0 + %204 = OpCompositeExtract %v4float %130 0 + %205 = OpVectorShuffle %v3float %123 %123 0 1 2 + %206 = OpCompositeConstruct %v3float %154 %154 %154 + %207 = OpFMul %v3float %205 %206 + %208 = OpVectorShuffle %v3float %127 %127 0 1 2 + %209 = OpCompositeConstruct %v3float %155 %155 %155 + %210 = OpFMul %v3float %208 %209 + %211 = OpFAdd %v3float %207 %210 + %212 = OpFMul %v4float %124 %165 + %213 = OpFMul %v4float %128 %169 + %214 = OpFAdd %v4float %212 %213 + %215 = OpFMul %v4float %125 %165 + %216 = OpFMul %v4float %129 %169 + %217 = OpFAdd %v4float %215 %216 + %218 = OpFMul %v4float %203 %165 + %219 = OpFMul %v4float %204 %169 + %220 = OpFAdd %v4float %218 %219 + %221 = OpCompositeExtract %v4float %134 0 + %222 = OpVectorShuffle %v3float %211 %112 0 1 2 + %223 = OpVectorShuffle %v3float %131 %131 0 1 2 + %224 = OpCompositeConstruct %v3float %156 %156 %156 + %225 = OpFMul %v3float %223 %224 + %226 = OpFAdd %v3float %222 %225 + %227 = OpVectorShuffle %v4float %113 %226 4 5 6 3 + %228 = OpFMul %v4float %132 %174 + %229 = OpFAdd %v4float %214 %228 + %230 = OpFMul %v4float %133 %174 + %231 = OpFAdd %v4float %217 %230 + %232 = OpFMul %v4float %221 %174 + %233 = OpFAdd %v4float %220 %232 + %234 = OpCompositeConstruct %_arr_v4float_uint_1 %233 + %235 = OpVectorShuffle %v2float %233 %233 2 3 + %236 = OpVectorShuffle %v3float %229 %229 0 1 2 + %237 = OpAccessChain %_ptr_Uniform_float %View %int_79 + %238 = OpLoad %float %237 + %239 = OpFMul %float %238 %float_0_200000003 + %240 = OpFMul %float %238 %float_n0_699999988 + %241 = OpFMul %v2float %235 %63 + %242 = OpCompositeConstruct %v2float %239 %240 + %243 = OpFAdd %v2float %242 %241 + %244 = OpLoad %type_2d_image %Material_Texture2D_3 + %245 = OpLoad %type_sampler %Material_Texture2D_3Sampler + %246 = OpSampledImage %type_sampled_image %244 %245 + %247 = OpImageSampleExplicitLod %v4float %246 %243 Lod %float_n1 + %248 = OpCompositeExtract %float %247 0 + %249 = OpFMul %float %248 %float_10 + %250 = OpCompositeExtract %float %231 0 + %251 = OpFSub %float %float_1 %250 + %252 = OpFMul %float %249 %251 + %253 = OpCompositeConstruct %v3float %252 %252 %252 + %254 = OpFMul %v3float %253 %236 + %255 = OpFMul %v3float %254 %67 + %256 = OpFMul %float %138 %154 + %257 = OpFMul %float %140 %155 + %258 = OpFAdd %float %256 %257 + %259 = OpFMul %float %142 %156 + %260 = OpFAdd %float %258 %259 + %261 = OpCompositeConstruct %v3float %260 %260 %260 + %262 = OpFMul %v3float %255 %261 + %263 = OpVectorShuffle %v3float %202 %202 0 1 2 + %264 = OpFAdd %v3float %263 %262 + %265 = OpVectorShuffle %v4float %202 %264 4 5 6 3 + %266 = OpAccessChain %_ptr_Uniform_mat4v4float %ShadowDepthPass %int_88 + %267 = OpLoad %mat4v4float %266 + %268 = OpAccessChain %_ptr_Uniform_mat4v4float %ShadowDepthPass %int_89 + %269 = OpLoad %mat4v4float %268 + OpStore %116 %269 + %270 = OpMatrixTimesVector %v4float %267 %265 + %271 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_91 + %272 = OpLoad %float %271 + %273 = OpFOrdGreaterThan %bool %272 %float_0 + %274 = OpCompositeExtract %float %270 2 + %275 = OpFOrdLessThan %bool %274 %float_0 + %276 = OpLogicalAnd %bool %273 %275 + OpSelectionMerge %277 None + OpBranchConditional %276 %278 %277 + %278 = OpLabel + %279 = OpCompositeInsert %v4float %float_9_99999997en07 %270 2 + %280 = OpCompositeInsert %v4float %float_1 %279 3 + OpBranch %277 + %277 = OpLabel + %281 = OpPhi %v4float %270 %115 %280 %278 + %282 = OpAccessChain %_ptr_Function_float %116 %uint_0 %int_2 + %283 = OpLoad %float %282 + %284 = OpAccessChain %_ptr_Function_float %116 %uint_1 %int_2 + %285 = OpLoad %float %284 + %286 = OpAccessChain %_ptr_Function_float %116 %uint_2 %int_2 + %287 = OpLoad %float %286 + %288 = OpCompositeConstruct %v3float %283 %285 %287 + %289 = OpDot %float %288 %236 + %290 = OpExtInst %float %1 FAbs %289 + %291 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_2 + %292 = OpLoad %float %291 + %293 = OpExtInst %float %1 FAbs %290 + %294 = OpFOrdGreaterThan %bool %293 %float_0 + %295 = OpFMul %float %290 %290 + %296 = OpFSub %float %float_1 %295 + %297 = OpExtInst %float %1 FClamp %296 %float_0 %float_1 + %298 = OpExtInst %float %1 Sqrt %297 + %299 = OpFDiv %float %298 %290 + %300 = OpSelect %float %294 %299 %292 + %301 = OpExtInst %float %1 FClamp %300 %float_0 %292 + %302 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_1 + %303 = OpLoad %float %302 + %304 = OpFMul %float %303 %301 + %305 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_0 + %306 = OpLoad %float %305 + %307 = OpFAdd %float %304 %306 + %308 = OpCompositeExtract %float %281 2 + %309 = OpVectorShuffle %v3float %264 %112 0 1 2 + OpStore %out_var_TEXCOORD10_centroid %227 + OpStore %out_var_TEXCOORD11_centroid %229 + OpStore %out_var_COLOR0 %231 + OpStore %out_var_TEXCOORD0 %234 + OpStore %out_var_PRIMITIVE_ID %122 + OpStore %out_var_TEXCOORD6 %308 + OpStore %out_var_TEXCOORD8 %307 + OpStore %out_var_TEXCOORD7 %309 + OpStore %gl_Position %281 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese new file mode 100644 index 000000000..cb55bb425 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-patch-input-fixes.asm.tese @@ -0,0 +1,1175 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 581 +; Schema: 0 + OpCapability Tessellation + OpCapability ClipDistance + OpCapability SampledBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationEvaluation %MainDomain "main" %gl_ClipDistance %in_var_TEXCOORD6 %in_var_TEXCOORD8 %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_VS_To_DS_Position %in_var_VS_To_DS_VertexID %in_var_PN_POSITION %in_var_PN_DisplacementScales %in_var_PN_TessellationMultiplier %in_var_PN_WorldDisplacementMultiplier %in_var_PN_DominantVertex %in_var_PN_DominantVertex1 %in_var_PN_DominantVertex2 %in_var_PN_DominantEdge %in_var_PN_DominantEdge1 %in_var_PN_DominantEdge2 %in_var_PN_DominantEdge3 %in_var_PN_DominantEdge4 %in_var_PN_DominantEdge5 %gl_TessLevelOuter %gl_TessLevelInner %in_var_PN_POSITION9 %gl_TessCoord %gl_Position %out_var_TEXCOORD6 %out_var_TEXCOORD7 %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid + OpExecutionMode %MainDomain Triangles + OpExecutionMode %MainDomain SpacingFractionalOdd + OpExecutionMode %MainDomain VertexOrderCw + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpMemberName %type_View 179 "PrePadding_View_3048" + OpMemberName %type_View 180 "PrePadding_View_3052" + OpMemberName %type_View 181 "View_WorldToVirtualTexture" + OpMemberName %type_View 182 "View_VirtualTextureParams" + OpMemberName %type_View 183 "View_XRPassthroughCameraUVs" + OpName %View "View" + OpName %type_sampler "type.sampler" + OpName %type_3d_image "type.3d.image" + OpName %View_GlobalDistanceFieldTexture0 "View_GlobalDistanceFieldTexture0" + OpName %View_GlobalDistanceFieldSampler0 "View_GlobalDistanceFieldSampler0" + OpName %View_GlobalDistanceFieldTexture1 "View_GlobalDistanceFieldTexture1" + OpName %View_GlobalDistanceFieldTexture2 "View_GlobalDistanceFieldTexture2" + OpName %View_GlobalDistanceFieldTexture3 "View_GlobalDistanceFieldTexture3" + OpName %type_Material "type.Material" + OpMemberName %type_Material 0 "Material_VectorExpressions" + OpMemberName %type_Material 1 "Material_ScalarExpressions" + OpName %Material "Material" + OpName %in_var_TEXCOORD6 "in.var.TEXCOORD6" + OpName %in_var_TEXCOORD8 "in.var.TEXCOORD8" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_VS_To_DS_Position "in.var.VS_To_DS_Position" + OpName %in_var_VS_To_DS_VertexID "in.var.VS_To_DS_VertexID" + OpName %in_var_PN_POSITION "in.var.PN_POSITION" + OpName %in_var_PN_DisplacementScales "in.var.PN_DisplacementScales" + OpName %in_var_PN_TessellationMultiplier "in.var.PN_TessellationMultiplier" + OpName %in_var_PN_WorldDisplacementMultiplier "in.var.PN_WorldDisplacementMultiplier" + OpName %in_var_PN_DominantVertex "in.var.PN_DominantVertex" + OpName %in_var_PN_DominantVertex1 "in.var.PN_DominantVertex1" + OpName %in_var_PN_DominantVertex2 "in.var.PN_DominantVertex2" + OpName %in_var_PN_DominantEdge "in.var.PN_DominantEdge" + OpName %in_var_PN_DominantEdge1 "in.var.PN_DominantEdge1" + OpName %in_var_PN_DominantEdge2 "in.var.PN_DominantEdge2" + OpName %in_var_PN_DominantEdge3 "in.var.PN_DominantEdge3" + OpName %in_var_PN_DominantEdge4 "in.var.PN_DominantEdge4" + OpName %in_var_PN_DominantEdge5 "in.var.PN_DominantEdge5" + OpName %in_var_PN_POSITION9 "in.var.PN_POSITION9" + OpName %out_var_TEXCOORD6 "out.var.TEXCOORD6" + OpName %out_var_TEXCOORD7 "out.var.TEXCOORD7" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %MainDomain "MainDomain" + OpName %type_sampled_image "type.sampled.image" + OpDecorate %gl_ClipDistance BuiltIn ClipDistance + OpDecorateString %gl_ClipDistance UserSemantic "SV_ClipDistance" + OpDecorateString %in_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %in_var_TEXCOORD8 UserSemantic "TEXCOORD8" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %in_var_VS_To_DS_VertexID UserSemantic "VS_To_DS_VertexID" + OpDecorateString %in_var_PN_POSITION UserSemantic "PN_POSITION" + OpDecorateString %in_var_PN_DisplacementScales UserSemantic "PN_DisplacementScales" + OpDecorateString %in_var_PN_TessellationMultiplier UserSemantic "PN_TessellationMultiplier" + OpDecorateString %in_var_PN_WorldDisplacementMultiplier UserSemantic "PN_WorldDisplacementMultiplier" + OpDecorateString %in_var_PN_DominantVertex UserSemantic "PN_DominantVertex" + OpDecorateString %in_var_PN_DominantVertex1 UserSemantic "PN_DominantVertex" + OpDecorateString %in_var_PN_DominantVertex2 UserSemantic "PN_DominantVertex" + OpDecorateString %in_var_PN_DominantEdge UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge1 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge2 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge3 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge4 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge5 UserSemantic "PN_DominantEdge" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %in_var_PN_POSITION9 UserSemantic "PN_POSITION9" + OpDecorate %in_var_PN_POSITION9 Patch + OpDecorate %gl_TessCoord BuiltIn TessCoord + OpDecorateString %gl_TessCoord UserSemantic "SV_DomainLocation" + OpDecorate %gl_TessCoord Patch + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorateString %out_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %out_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorate %in_var_PN_DisplacementScales Location 0 + OpDecorate %in_var_PN_DominantEdge Location 1 + OpDecorate %in_var_PN_DominantEdge1 Location 2 + OpDecorate %in_var_PN_DominantEdge2 Location 3 + OpDecorate %in_var_PN_DominantEdge3 Location 4 + OpDecorate %in_var_PN_DominantEdge4 Location 5 + OpDecorate %in_var_PN_DominantEdge5 Location 6 + OpDecorate %in_var_PN_DominantVertex Location 7 + OpDecorate %in_var_PN_DominantVertex1 Location 8 + OpDecorate %in_var_PN_DominantVertex2 Location 9 + OpDecorate %in_var_PN_POSITION Location 10 + OpDecorate %in_var_PN_POSITION9 Location 13 + OpDecorate %in_var_PN_TessellationMultiplier Location 14 + OpDecorate %in_var_PN_WorldDisplacementMultiplier Location 15 + OpDecorate %in_var_TEXCOORD10_centroid Location 16 + OpDecorate %in_var_TEXCOORD11_centroid Location 17 + OpDecorate %in_var_TEXCOORD6 Location 18 + OpDecorate %in_var_TEXCOORD8 Location 19 + OpDecorate %in_var_VS_To_DS_Position Location 20 + OpDecorate %in_var_VS_To_DS_VertexID Location 21 + OpDecorate %out_var_TEXCOORD6 Location 0 + OpDecorate %out_var_TEXCOORD7 Location 1 + OpDecorate %out_var_TEXCOORD10_centroid Location 2 + OpDecorate %out_var_TEXCOORD11_centroid Location 3 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %View_GlobalDistanceFieldTexture0 DescriptorSet 0 + OpDecorate %View_GlobalDistanceFieldTexture0 Binding 0 + OpDecorate %View_GlobalDistanceFieldSampler0 DescriptorSet 0 + OpDecorate %View_GlobalDistanceFieldSampler0 Binding 0 + OpDecorate %View_GlobalDistanceFieldTexture1 DescriptorSet 0 + OpDecorate %View_GlobalDistanceFieldTexture1 Binding 1 + OpDecorate %View_GlobalDistanceFieldTexture2 DescriptorSet 0 + OpDecorate %View_GlobalDistanceFieldTexture2 Binding 2 + OpDecorate %View_GlobalDistanceFieldTexture3 DescriptorSet 0 + OpDecorate %View_GlobalDistanceFieldTexture3 Binding 3 + OpDecorate %Material DescriptorSet 0 + OpDecorate %Material Binding 1 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpMemberDecorate %type_View 179 Offset 3048 + OpMemberDecorate %type_View 180 Offset 3052 + OpMemberDecorate %type_View 181 Offset 3056 + OpMemberDecorate %type_View 181 MatrixStride 16 + OpMemberDecorate %type_View 181 ColMajor + OpMemberDecorate %type_View 182 Offset 3120 + OpMemberDecorate %type_View 183 Offset 3136 + OpDecorate %type_View Block + OpDecorate %_arr_v4float_uint_5 ArrayStride 16 + OpMemberDecorate %type_Material 0 Offset 0 + OpMemberDecorate %type_Material 1 Offset 80 + OpDecorate %type_Material Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 +%float_0_00100000005 = OpConstant %float 0.00100000005 + %uint_0 = OpConstant %uint 0 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %float_3 = OpConstant %float 3 + %uint_1 = OpConstant %uint 1 + %float_6 = OpConstant %float 6 + %67 = OpConstantComposite %v4float %float_6 %float_6 %float_6 %float_6 + %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 + %int_3 = OpConstant %int 3 + %float_2 = OpConstant %float 2 + %int_26 = OpConstant %int 26 + %int_32 = OpConstant %int 32 + %int_54 = OpConstant %int 54 + %int_153 = OpConstant %int 153 + %int_154 = OpConstant %int 154 + %int_156 = OpConstant %int 156 + %int_157 = OpConstant %int 157 + %float_10 = OpConstant %float 10 + %uint_3 = OpConstant %uint 3 + %81 = OpConstantComposite %v3float %float_0 %float_0 %float_0 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float %float %float %mat4v4float %v4float %_arr_v4float_uint_2 +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%type_3d_image = OpTypeImage %float 3D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_3d_image = OpTypePointer UniformConstant %type_3d_image + %uint_5 = OpConstant %uint 5 +%_arr_v4float_uint_5 = OpTypeArray %v4float %uint_5 +%type_Material = OpTypeStruct %_arr_v4float_uint_5 %_arr_v4float_uint_2 +%_ptr_Uniform_type_Material = OpTypePointer Uniform %type_Material +%_arr_float_uint_1 = OpTypeArray %float %uint_1 +%_ptr_Output__arr_float_uint_1 = OpTypePointer Output %_arr_float_uint_1 +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%_ptr_Input__arr_v4float_uint_3 = OpTypePointer Input %_arr_v4float_uint_3 +%_arr_uint_uint_3 = OpTypeArray %uint %uint_3 +%_ptr_Input__arr_uint_uint_3 = OpTypePointer Input %_arr_uint_uint_3 +%_arr__arr_v4float_uint_3_uint_3 = OpTypeArray %_arr_v4float_uint_3 %uint_3 +%_ptr_Input__arr__arr_v4float_uint_3_uint_3 = OpTypePointer Input %_arr__arr_v4float_uint_3_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Input__arr_v3float_uint_3 = OpTypePointer Input %_arr_v3float_uint_3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 +%_ptr_Input__arr_float_uint_3 = OpTypePointer Input %_arr_float_uint_3 +%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3 +%_ptr_Input__arr_v2float_uint_3 = OpTypePointer Input %_arr_v2float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Input__arr_float_uint_4 = OpTypePointer Input %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Input__arr_float_uint_2 = OpTypePointer Input %_arr_float_uint_2 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_v3float = OpTypePointer Input %v3float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %109 = OpTypeFunction %void +%_ptr_Output_float = OpTypePointer Output %float +%mat3v3float = OpTypeMatrix %v3float 3 + %bool = OpTypeBool +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%type_sampled_image = OpTypeSampledImage %type_3d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform +%View_GlobalDistanceFieldTexture0 = OpVariable %_ptr_UniformConstant_type_3d_image UniformConstant +%View_GlobalDistanceFieldSampler0 = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%View_GlobalDistanceFieldTexture1 = OpVariable %_ptr_UniformConstant_type_3d_image UniformConstant +%View_GlobalDistanceFieldTexture2 = OpVariable %_ptr_UniformConstant_type_3d_image UniformConstant +%View_GlobalDistanceFieldTexture3 = OpVariable %_ptr_UniformConstant_type_3d_image UniformConstant + %Material = OpVariable %_ptr_Uniform_type_Material Uniform +%gl_ClipDistance = OpVariable %_ptr_Output__arr_float_uint_1 Output +%in_var_TEXCOORD6 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD8 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_VS_To_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_VS_To_DS_VertexID = OpVariable %_ptr_Input__arr_uint_uint_3 Input +%in_var_PN_POSITION = OpVariable %_ptr_Input__arr__arr_v4float_uint_3_uint_3 Input +%in_var_PN_DisplacementScales = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_TessellationMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%in_var_PN_WorldDisplacementMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%in_var_PN_DominantVertex = OpVariable %_ptr_Input__arr_v2float_uint_3 Input +%in_var_PN_DominantVertex1 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_DominantVertex2 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_DominantEdge = OpVariable %_ptr_Input__arr_v2float_uint_3 Input +%in_var_PN_DominantEdge1 = OpVariable %_ptr_Input__arr_v2float_uint_3 Input +%in_var_PN_DominantEdge2 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_DominantEdge3 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_DominantEdge4 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_DominantEdge5 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%gl_TessLevelOuter = OpVariable %_ptr_Input__arr_float_uint_4 Input +%gl_TessLevelInner = OpVariable %_ptr_Input__arr_float_uint_2 Input +%in_var_PN_POSITION9 = OpVariable %_ptr_Input_v4float Input +%gl_TessCoord = OpVariable %_ptr_Input_v3float Input +%gl_Position = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD6 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD7 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output_v4float Output + %117 = OpConstantNull %v4float + %118 = OpUndef %v4float + %MainDomain = OpFunction %void None %109 + %119 = OpLabel + %120 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD6 + %121 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD8 + %122 = OpCompositeExtract %v4float %120 0 + %123 = OpCompositeExtract %v4float %121 0 + %124 = OpCompositeExtract %v4float %120 1 + %125 = OpCompositeExtract %v4float %121 1 + %126 = OpCompositeExtract %v4float %120 2 + %127 = OpCompositeExtract %v4float %121 2 + %128 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD10_centroid + %129 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD11_centroid + %130 = OpCompositeExtract %v4float %128 0 + %131 = OpCompositeExtract %v4float %129 0 + %132 = OpCompositeExtract %v4float %128 1 + %133 = OpCompositeExtract %v4float %129 1 + %134 = OpCompositeExtract %v4float %128 2 + %135 = OpCompositeExtract %v4float %129 2 + %136 = OpLoad %_arr__arr_v4float_uint_3_uint_3 %in_var_PN_POSITION + %137 = OpLoad %_arr_float_uint_3 %in_var_PN_WorldDisplacementMultiplier + %138 = OpLoad %_arr_v4float_uint_3 %in_var_PN_DominantVertex1 + %139 = OpLoad %_arr_v3float_uint_3 %in_var_PN_DominantVertex2 + %140 = OpCompositeExtract %v4float %138 0 + %141 = OpCompositeExtract %v3float %139 0 + %142 = OpCompositeExtract %v4float %138 1 + %143 = OpCompositeExtract %v3float %139 1 + %144 = OpCompositeExtract %v4float %138 2 + %145 = OpCompositeExtract %v3float %139 2 + %146 = OpLoad %_arr_v4float_uint_3 %in_var_PN_DominantEdge2 + %147 = OpLoad %_arr_v4float_uint_3 %in_var_PN_DominantEdge3 + %148 = OpLoad %_arr_v3float_uint_3 %in_var_PN_DominantEdge4 + %149 = OpLoad %_arr_v3float_uint_3 %in_var_PN_DominantEdge5 + %150 = OpCompositeExtract %v4float %146 0 + %151 = OpCompositeExtract %v4float %147 0 + %152 = OpCompositeExtract %v3float %148 0 + %153 = OpCompositeExtract %v3float %149 0 + %154 = OpCompositeExtract %v4float %146 1 + %155 = OpCompositeExtract %v4float %147 1 + %156 = OpCompositeExtract %v3float %148 1 + %157 = OpCompositeExtract %v3float %149 1 + %158 = OpCompositeExtract %v4float %146 2 + %159 = OpCompositeExtract %v4float %147 2 + %160 = OpCompositeExtract %v3float %148 2 + %161 = OpCompositeExtract %v3float %149 2 + %162 = OpCompositeExtract %_arr_v4float_uint_3 %136 0 + %163 = OpCompositeExtract %float %137 0 + %164 = OpCompositeExtract %_arr_v4float_uint_3 %136 1 + %165 = OpCompositeExtract %float %137 1 + %166 = OpCompositeExtract %_arr_v4float_uint_3 %136 2 + %167 = OpCompositeExtract %float %137 2 + %168 = OpCompositeExtract %v4float %162 0 + %169 = OpCompositeExtract %v4float %162 1 + %170 = OpCompositeExtract %v4float %162 2 + %171 = OpCompositeExtract %v4float %164 0 + %172 = OpCompositeExtract %v4float %164 1 + %173 = OpCompositeExtract %v4float %164 2 + %174 = OpCompositeExtract %v4float %166 0 + %175 = OpCompositeExtract %v4float %166 1 + %176 = OpCompositeExtract %v4float %166 2 + %177 = OpLoad %v4float %in_var_PN_POSITION9 + %178 = OpLoad %v3float %gl_TessCoord + %179 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_0 + %180 = OpLoad %mat4v4float %179 + %181 = OpAccessChain %_ptr_Uniform_v3float %View %int_26 + %182 = OpLoad %v3float %181 + %183 = OpAccessChain %_ptr_Uniform_v3float %View %int_32 + %184 = OpLoad %v3float %183 + %185 = OpAccessChain %_ptr_Uniform_v4float %View %int_54 + %186 = OpLoad %v4float %185 + %187 = OpCompositeExtract %float %178 0 + %188 = OpCompositeExtract %float %178 1 + %189 = OpCompositeExtract %float %178 2 + %190 = OpFMul %float %187 %187 + %191 = OpFMul %float %188 %188 + %192 = OpFMul %float %189 %189 + %193 = OpFMul %float %190 %float_3 + %194 = OpFMul %float %191 %float_3 + %195 = OpFMul %float %192 %float_3 + %196 = OpCompositeConstruct %v4float %190 %190 %190 %190 + %197 = OpFMul %v4float %168 %196 + %198 = OpCompositeConstruct %v4float %187 %187 %187 %187 + %199 = OpFMul %v4float %197 %198 + %200 = OpCompositeConstruct %v4float %191 %191 %191 %191 + %201 = OpFMul %v4float %171 %200 + %202 = OpCompositeConstruct %v4float %188 %188 %188 %188 + %203 = OpFMul %v4float %201 %202 + %204 = OpFAdd %v4float %199 %203 + %205 = OpCompositeConstruct %v4float %192 %192 %192 %192 + %206 = OpFMul %v4float %174 %205 + %207 = OpCompositeConstruct %v4float %189 %189 %189 %189 + %208 = OpFMul %v4float %206 %207 + %209 = OpFAdd %v4float %204 %208 + %210 = OpCompositeConstruct %v4float %193 %193 %193 %193 + %211 = OpFMul %v4float %169 %210 + %212 = OpFMul %v4float %211 %202 + %213 = OpFAdd %v4float %209 %212 + %214 = OpCompositeConstruct %v4float %194 %194 %194 %194 + %215 = OpFMul %v4float %170 %214 + %216 = OpFMul %v4float %215 %198 + %217 = OpFAdd %v4float %213 %216 + %218 = OpFMul %v4float %172 %214 + %219 = OpFMul %v4float %218 %207 + %220 = OpFAdd %v4float %217 %219 + %221 = OpCompositeConstruct %v4float %195 %195 %195 %195 + %222 = OpFMul %v4float %173 %221 + %223 = OpFMul %v4float %222 %202 + %224 = OpFAdd %v4float %220 %223 + %225 = OpFMul %v4float %175 %221 + %226 = OpFMul %v4float %225 %198 + %227 = OpFAdd %v4float %224 %226 + %228 = OpFMul %v4float %176 %210 + %229 = OpFMul %v4float %228 %207 + %230 = OpFAdd %v4float %227 %229 + %231 = OpFMul %v4float %177 %67 + %232 = OpFMul %v4float %231 %207 + %233 = OpFMul %v4float %232 %198 + %234 = OpFMul %v4float %233 %202 + %235 = OpFAdd %v4float %230 %234 + %236 = OpVectorShuffle %v3float %130 %130 0 1 2 + %237 = OpCompositeConstruct %v3float %187 %187 %187 + %238 = OpFMul %v3float %236 %237 + %239 = OpVectorShuffle %v3float %132 %132 0 1 2 + %240 = OpCompositeConstruct %v3float %188 %188 %188 + %241 = OpFMul %v3float %239 %240 + %242 = OpFAdd %v3float %238 %241 + %243 = OpFMul %v4float %131 %198 + %244 = OpFMul %v4float %133 %202 + %245 = OpFAdd %v4float %243 %244 + %246 = OpFMul %v4float %122 %198 + %247 = OpFMul %v4float %124 %202 + %248 = OpFAdd %v4float %246 %247 + %249 = OpFMul %v4float %123 %198 + %250 = OpFMul %v4float %125 %202 + %251 = OpFAdd %v4float %249 %250 + %252 = OpVectorShuffle %v3float %242 %117 0 1 2 + %253 = OpVectorShuffle %v3float %134 %134 0 1 2 + %254 = OpCompositeConstruct %v3float %189 %189 %189 + %255 = OpFMul %v3float %253 %254 + %256 = OpFAdd %v3float %252 %255 + %257 = OpVectorShuffle %v4float %118 %256 4 5 6 3 + %258 = OpFMul %v4float %135 %207 + %259 = OpFAdd %v4float %245 %258 + %260 = OpFMul %v4float %126 %207 + %261 = OpFAdd %v4float %248 %260 + %262 = OpFMul %v4float %127 %207 + %263 = OpFAdd %v4float %251 %262 + %264 = OpVectorShuffle %v3float %235 %235 0 1 2 + %265 = OpVectorShuffle %v3float %256 %117 0 1 2 + %266 = OpVectorShuffle %v3float %259 %259 0 1 2 + %267 = OpExtInst %v3float %1 Cross %266 %265 + %268 = OpCompositeExtract %float %259 3 + %269 = OpCompositeConstruct %v3float %268 %268 %268 + %270 = OpFMul %v3float %267 %269 + %271 = OpCompositeConstruct %mat3v3float %265 %270 %266 + %272 = OpFAdd %v3float %264 %182 + %273 = OpCompositeExtract %float %259 0 + %274 = OpCompositeExtract %float %259 1 + %275 = OpCompositeExtract %float %259 2 + %276 = OpCompositeConstruct %v4float %273 %274 %275 %float_0 + %277 = OpFOrdEqual %bool %187 %float_0 + %278 = OpSelect %int %277 %int_1 %int_0 + %279 = OpConvertSToF %float %278 + %280 = OpFOrdEqual %bool %188 %float_0 + %281 = OpSelect %int %280 %int_1 %int_0 + %282 = OpConvertSToF %float %281 + %283 = OpFOrdEqual %bool %189 %float_0 + %284 = OpSelect %int %283 %int_1 %int_0 + %285 = OpConvertSToF %float %284 + %286 = OpFAdd %float %279 %282 + %287 = OpFAdd %float %286 %285 + %288 = OpFOrdEqual %bool %287 %float_2 + %289 = OpSelect %int %288 %int_1 %int_0 + %290 = OpConvertSToF %float %289 + %291 = OpFOrdEqual %bool %287 %float_1 + %292 = OpSelect %int %291 %int_1 %int_0 + %293 = OpConvertSToF %float %292 + %294 = OpFOrdEqual %bool %287 %float_0 + %295 = OpSelect %int %294 %int_1 %int_0 + %296 = OpConvertSToF %float %295 + %297 = OpFOrdEqual %bool %290 %float_1 + OpSelectionMerge %298 None + OpBranchConditional %297 %299 %300 + %300 = OpLabel + %301 = OpFOrdNotEqual %bool %293 %float_0 + OpSelectionMerge %302 None + OpBranchConditional %301 %303 %302 + %303 = OpLabel + %304 = OpCompositeConstruct %v4float %279 %279 %279 %279 + %305 = OpFMul %v4float %304 %150 + %306 = OpCompositeConstruct %v4float %282 %282 %282 %282 + %307 = OpFMul %v4float %306 %154 + %308 = OpFAdd %v4float %305 %307 + %309 = OpCompositeConstruct %v4float %285 %285 %285 %285 + %310 = OpFMul %v4float %309 %158 + %311 = OpFAdd %v4float %308 %310 + %312 = OpFMul %v4float %304 %151 + %313 = OpFMul %v4float %306 %155 + %314 = OpFAdd %v4float %312 %313 + %315 = OpFMul %v4float %309 %159 + %316 = OpFAdd %v4float %314 %315 + %317 = OpFMul %v4float %202 %311 + %318 = OpFMul %v4float %207 %316 + %319 = OpFAdd %v4float %317 %318 + %320 = OpFMul %v4float %304 %319 + %321 = OpFMul %v4float %207 %311 + %322 = OpFMul %v4float %198 %316 + %323 = OpFAdd %v4float %321 %322 + %324 = OpFMul %v4float %306 %323 + %325 = OpFAdd %v4float %320 %324 + %326 = OpFMul %v4float %198 %311 + %327 = OpFMul %v4float %202 %316 + %328 = OpFAdd %v4float %326 %327 + %329 = OpFMul %v4float %309 %328 + %330 = OpFAdd %v4float %325 %329 + %331 = OpCompositeConstruct %v3float %279 %279 %279 + %332 = OpFMul %v3float %331 %152 + %333 = OpCompositeConstruct %v3float %282 %282 %282 + %334 = OpFMul %v3float %333 %156 + %335 = OpFAdd %v3float %332 %334 + %336 = OpCompositeConstruct %v3float %285 %285 %285 + %337 = OpFMul %v3float %336 %160 + %338 = OpFAdd %v3float %335 %337 + %339 = OpFMul %v3float %331 %153 + %340 = OpFMul %v3float %333 %157 + %341 = OpFAdd %v3float %339 %340 + %342 = OpFMul %v3float %336 %161 + %343 = OpFAdd %v3float %341 %342 + %344 = OpFMul %v3float %240 %338 + %345 = OpFMul %v3float %254 %343 + %346 = OpFAdd %v3float %344 %345 + %347 = OpFMul %v3float %331 %346 + %348 = OpFMul %v3float %254 %338 + %349 = OpFMul %v3float %237 %343 + %350 = OpFAdd %v3float %348 %349 + %351 = OpFMul %v3float %333 %350 + %352 = OpFAdd %v3float %347 %351 + %353 = OpFMul %v3float %237 %338 + %354 = OpFMul %v3float %240 %343 + %355 = OpFAdd %v3float %353 %354 + %356 = OpFMul %v3float %336 %355 + %357 = OpFAdd %v3float %352 %356 + OpBranch %302 + %302 = OpLabel + %358 = OpPhi %v4float %276 %300 %330 %303 + %359 = OpPhi %v3float %265 %300 %357 %303 + OpBranch %298 + %299 = OpLabel + %360 = OpFAdd %float %282 %285 + %361 = OpFOrdEqual %bool %360 %float_2 + %362 = OpSelect %int %361 %int_1 %int_0 + %363 = OpConvertSToF %float %362 + %364 = OpFAdd %float %285 %279 + %365 = OpFOrdEqual %bool %364 %float_2 + %366 = OpSelect %int %365 %int_1 %int_0 + %367 = OpConvertSToF %float %366 + %368 = OpFOrdEqual %bool %286 %float_2 + %369 = OpSelect %int %368 %int_1 %int_0 + %370 = OpConvertSToF %float %369 + %371 = OpCompositeConstruct %v4float %363 %363 %363 %363 + %372 = OpFMul %v4float %371 %140 + %373 = OpCompositeConstruct %v4float %367 %367 %367 %367 + %374 = OpFMul %v4float %373 %142 + %375 = OpFAdd %v4float %372 %374 + %376 = OpCompositeConstruct %v4float %370 %370 %370 %370 + %377 = OpFMul %v4float %376 %144 + %378 = OpFAdd %v4float %375 %377 + %379 = OpCompositeConstruct %v3float %363 %363 %363 + %380 = OpFMul %v3float %379 %141 + %381 = OpCompositeConstruct %v3float %367 %367 %367 + %382 = OpFMul %v3float %381 %143 + %383 = OpFAdd %v3float %380 %382 + %384 = OpCompositeConstruct %v3float %370 %370 %370 + %385 = OpFMul %v3float %384 %145 + %386 = OpFAdd %v3float %383 %385 + OpBranch %298 + %298 = OpLabel + %387 = OpPhi %v4float %378 %299 %358 %302 + %388 = OpPhi %v3float %386 %299 %359 %302 + %389 = OpFOrdEqual %bool %296 %float_0 + OpSelectionMerge %390 None + OpBranchConditional %389 %391 %390 + %391 = OpLabel + %392 = OpVectorShuffle %v3float %387 %387 0 1 2 + %393 = OpExtInst %v3float %1 Cross %392 %388 + %394 = OpCompositeExtract %float %387 3 + %395 = OpCompositeConstruct %v3float %394 %394 %394 + %396 = OpFMul %v3float %393 %395 + %397 = OpCompositeConstruct %mat3v3float %388 %396 %392 + OpBranch %390 + %390 = OpLabel + %398 = OpPhi %mat3v3float %271 %298 %397 %391 + %399 = OpAccessChain %_ptr_Uniform_float %View %int_157 + %400 = OpLoad %float %399 + %401 = OpAccessChain %_ptr_Uniform_v4float %View %int_153 %int_0 + %402 = OpLoad %v4float %401 + %403 = OpVectorShuffle %v3float %402 %402 0 1 2 + %404 = OpVectorShuffle %v3float %402 %402 3 3 3 + %405 = OpFSub %v3float %272 %403 + %406 = OpFAdd %v3float %405 %404 + %407 = OpExtInst %v3float %1 FMax %406 %81 + %408 = OpFAdd %v3float %403 %404 + %409 = OpFSub %v3float %408 %272 + %410 = OpExtInst %v3float %1 FMax %409 %81 + %411 = OpExtInst %v3float %1 FMin %407 %410 + %412 = OpCompositeExtract %float %411 0 + %413 = OpCompositeExtract %float %411 1 + %414 = OpCompositeExtract %float %411 2 + %415 = OpExtInst %float %1 FMin %413 %414 + %416 = OpExtInst %float %1 FMin %412 %415 + %417 = OpAccessChain %_ptr_Uniform_float %View %int_153 %int_0 %int_3 + %418 = OpLoad %float %417 + %419 = OpAccessChain %_ptr_Uniform_float %View %int_156 + %420 = OpLoad %float %419 + %421 = OpFMul %float %418 %420 + %422 = OpFOrdGreaterThan %bool %416 %421 + OpSelectionMerge %423 DontFlatten + OpBranchConditional %422 %424 %425 + %425 = OpLabel + %426 = OpAccessChain %_ptr_Uniform_v4float %View %int_153 %int_1 + %427 = OpLoad %v4float %426 + %428 = OpVectorShuffle %v3float %427 %427 0 1 2 + %429 = OpVectorShuffle %v3float %427 %427 3 3 3 + %430 = OpFSub %v3float %272 %428 + %431 = OpFAdd %v3float %430 %429 + %432 = OpExtInst %v3float %1 FMax %431 %81 + %433 = OpFAdd %v3float %428 %429 + %434 = OpFSub %v3float %433 %272 + %435 = OpExtInst %v3float %1 FMax %434 %81 + %436 = OpExtInst %v3float %1 FMin %432 %435 + %437 = OpCompositeExtract %float %436 0 + %438 = OpCompositeExtract %float %436 1 + %439 = OpCompositeExtract %float %436 2 + %440 = OpExtInst %float %1 FMin %438 %439 + %441 = OpExtInst %float %1 FMin %437 %440 + %442 = OpAccessChain %_ptr_Uniform_float %View %int_153 %int_1 %int_3 + %443 = OpLoad %float %442 + %444 = OpFMul %float %443 %420 + %445 = OpFOrdGreaterThan %bool %441 %444 + OpSelectionMerge %446 DontFlatten + OpBranchConditional %445 %447 %448 + %448 = OpLabel + %449 = OpAccessChain %_ptr_Uniform_v4float %View %int_153 %int_2 + %450 = OpLoad %v4float %449 + %451 = OpVectorShuffle %v3float %450 %450 0 1 2 + %452 = OpVectorShuffle %v3float %450 %450 3 3 3 + %453 = OpFSub %v3float %272 %451 + %454 = OpFAdd %v3float %453 %452 + %455 = OpExtInst %v3float %1 FMax %454 %81 + %456 = OpFAdd %v3float %451 %452 + %457 = OpFSub %v3float %456 %272 + %458 = OpExtInst %v3float %1 FMax %457 %81 + %459 = OpExtInst %v3float %1 FMin %455 %458 + %460 = OpCompositeExtract %float %459 0 + %461 = OpCompositeExtract %float %459 1 + %462 = OpCompositeExtract %float %459 2 + %463 = OpExtInst %float %1 FMin %461 %462 + %464 = OpExtInst %float %1 FMin %460 %463 + %465 = OpAccessChain %_ptr_Uniform_v4float %View %int_153 %int_3 + %466 = OpLoad %v4float %465 + %467 = OpVectorShuffle %v3float %466 %466 0 1 2 + %468 = OpVectorShuffle %v3float %466 %466 3 3 3 + %469 = OpFSub %v3float %272 %467 + %470 = OpFAdd %v3float %469 %468 + %471 = OpExtInst %v3float %1 FMax %470 %81 + %472 = OpFAdd %v3float %467 %468 + %473 = OpFSub %v3float %472 %272 + %474 = OpExtInst %v3float %1 FMax %473 %81 + %475 = OpExtInst %v3float %1 FMin %471 %474 + %476 = OpCompositeExtract %float %475 0 + %477 = OpCompositeExtract %float %475 1 + %478 = OpCompositeExtract %float %475 2 + %479 = OpExtInst %float %1 FMin %477 %478 + %480 = OpExtInst %float %1 FMin %476 %479 + %481 = OpAccessChain %_ptr_Uniform_float %View %int_153 %int_2 %int_3 + %482 = OpLoad %float %481 + %483 = OpFMul %float %482 %420 + %484 = OpFOrdGreaterThan %bool %464 %483 + OpSelectionMerge %485 DontFlatten + OpBranchConditional %484 %486 %487 + %487 = OpLabel + %488 = OpAccessChain %_ptr_Uniform_float %View %int_153 %int_3 %int_3 + %489 = OpLoad %float %488 + %490 = OpFMul %float %489 %420 + %491 = OpFOrdGreaterThan %bool %480 %490 + OpSelectionMerge %492 None + OpBranchConditional %491 %493 %492 + %493 = OpLabel + %494 = OpFMul %float %480 %float_10 + %495 = OpAccessChain %_ptr_Uniform_float %View %int_154 %int_3 %int_3 + %496 = OpLoad %float %495 + %497 = OpFMul %float %494 %496 + %498 = OpExtInst %float %1 FClamp %497 %float_0 %float_1 + %499 = OpAccessChain %_ptr_Uniform_v4float %View %int_154 %uint_3 + %500 = OpLoad %v4float %499 + %501 = OpVectorShuffle %v3float %500 %500 3 3 3 + %502 = OpFMul %v3float %272 %501 + %503 = OpVectorShuffle %v3float %500 %500 0 1 2 + %504 = OpFAdd %v3float %502 %503 + %505 = OpLoad %type_3d_image %View_GlobalDistanceFieldTexture3 + %506 = OpLoad %type_sampler %View_GlobalDistanceFieldSampler0 + %507 = OpSampledImage %type_sampled_image %505 %506 + %508 = OpImageSampleExplicitLod %v4float %507 %504 Lod %float_0 + %509 = OpCompositeExtract %float %508 0 + %510 = OpExtInst %float %1 FMix %400 %509 %498 + OpBranch %492 + %492 = OpLabel + %511 = OpPhi %float %400 %487 %510 %493 + OpBranch %485 + %486 = OpLabel + %512 = OpAccessChain %_ptr_Uniform_v4float %View %int_154 %uint_2 + %513 = OpLoad %v4float %512 + %514 = OpVectorShuffle %v3float %513 %513 3 3 3 + %515 = OpFMul %v3float %272 %514 + %516 = OpVectorShuffle %v3float %513 %513 0 1 2 + %517 = OpFAdd %v3float %515 %516 + %518 = OpLoad %type_3d_image %View_GlobalDistanceFieldTexture2 + %519 = OpLoad %type_sampler %View_GlobalDistanceFieldSampler0 + %520 = OpSampledImage %type_sampled_image %518 %519 + %521 = OpImageSampleExplicitLod %v4float %520 %517 Lod %float_0 + %522 = OpCompositeExtract %float %521 0 + OpBranch %485 + %485 = OpLabel + %523 = OpPhi %float %522 %486 %511 %492 + OpBranch %446 + %447 = OpLabel + %524 = OpAccessChain %_ptr_Uniform_v4float %View %int_154 %uint_1 + %525 = OpLoad %v4float %524 + %526 = OpVectorShuffle %v3float %525 %525 3 3 3 + %527 = OpFMul %v3float %272 %526 + %528 = OpVectorShuffle %v3float %525 %525 0 1 2 + %529 = OpFAdd %v3float %527 %528 + %530 = OpLoad %type_3d_image %View_GlobalDistanceFieldTexture1 + %531 = OpLoad %type_sampler %View_GlobalDistanceFieldSampler0 + %532 = OpSampledImage %type_sampled_image %530 %531 + %533 = OpImageSampleExplicitLod %v4float %532 %529 Lod %float_0 + %534 = OpCompositeExtract %float %533 0 + OpBranch %446 + %446 = OpLabel + %535 = OpPhi %float %534 %447 %523 %485 + OpBranch %423 + %424 = OpLabel + %536 = OpAccessChain %_ptr_Uniform_v4float %View %int_154 %uint_0 + %537 = OpLoad %v4float %536 + %538 = OpVectorShuffle %v3float %537 %537 3 3 3 + %539 = OpFMul %v3float %272 %538 + %540 = OpVectorShuffle %v3float %537 %537 0 1 2 + %541 = OpFAdd %v3float %539 %540 + %542 = OpLoad %type_3d_image %View_GlobalDistanceFieldTexture0 + %543 = OpLoad %type_sampler %View_GlobalDistanceFieldSampler0 + %544 = OpSampledImage %type_sampled_image %542 %543 + %545 = OpImageSampleExplicitLod %v4float %544 %541 Lod %float_0 + %546 = OpCompositeExtract %float %545 0 + OpBranch %423 + %423 = OpLabel + %547 = OpPhi %float %546 %424 %535 %446 + %548 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_2 + %549 = OpLoad %float %548 + %550 = OpFAdd %float %547 %549 + %551 = OpExtInst %float %1 FMin %550 %float_0 + %552 = OpAccessChain %_ptr_Uniform_float %Material %int_1 %int_0 %int_3 + %553 = OpLoad %float %552 + %554 = OpFMul %float %551 %553 + %555 = OpCompositeExtract %v3float %398 2 + %556 = OpCompositeConstruct %v3float %554 %554 %554 + %557 = OpFMul %v3float %555 %556 + %558 = OpFMul %float %163 %187 + %559 = OpFMul %float %165 %188 + %560 = OpFAdd %float %558 %559 + %561 = OpFMul %float %167 %189 + %562 = OpFAdd %float %560 %561 + %563 = OpCompositeConstruct %v3float %562 %562 %562 + %564 = OpFMul %v3float %557 %563 + %565 = OpFAdd %v3float %264 %564 + %566 = OpVectorShuffle %v4float %235 %565 4 5 6 3 + %567 = OpVectorShuffle %v3float %565 %117 0 1 2 + %568 = OpFSub %v3float %567 %184 + %569 = OpCompositeExtract %float %568 0 + %570 = OpCompositeExtract %float %568 1 + %571 = OpCompositeExtract %float %568 2 + %572 = OpCompositeConstruct %v4float %569 %570 %571 %float_1 + %573 = OpDot %float %186 %572 + %574 = OpMatrixTimesVector %v4float %180 %566 + %575 = OpCompositeExtract %float %574 3 + %576 = OpFMul %float %float_0_00100000005 %575 + %577 = OpCompositeExtract %float %574 2 + %578 = OpFAdd %float %577 %576 + %579 = OpCompositeInsert %v4float %578 %574 2 + OpStore %gl_Position %579 + OpStore %out_var_TEXCOORD6 %261 + OpStore %out_var_TEXCOORD7 %263 + OpStore %out_var_TEXCOORD10_centroid %257 + OpStore %out_var_TEXCOORD11_centroid %259 + %580 = OpAccessChain %_ptr_Output_float %gl_ClipDistance %uint_0 + OpStore %580 %573 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese new file mode 100644 index 000000000..e792c7e11 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-patch-inputs.asm.tese @@ -0,0 +1,547 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 236 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationEvaluation %MainDomain "main" %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_VS_to_DS_Position %in_var_VS_To_DS_VertexID %in_var_PN_POSITION %in_var_PN_DisplacementScales %in_var_PN_TessellationMultiplier %in_var_PN_WorldDisplacementMultiplier %in_var_PN_DominantVertex %in_var_PN_DominantVertex1 %in_var_PN_DominantVertex2 %in_var_PN_DominantEdge %in_var_PN_DominantEdge1 %in_var_PN_DominantEdge2 %in_var_PN_DominantEdge3 %in_var_PN_DominantEdge4 %in_var_PN_DominantEdge5 %gl_TessLevelOuter %gl_TessLevelInner %in_var_PN_POSITION9 %gl_TessCoord %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_TEXCOORD6 %out_var_TEXCOORD7 %gl_Position + OpExecutionMode %MainDomain Triangles + OpSource HLSL 600 + OpName %type_ShadowDepthPass "type.ShadowDepthPass" + OpMemberName %type_ShadowDepthPass 0 "PrePadding_ShadowDepthPass_LPV_0" + OpMemberName %type_ShadowDepthPass 1 "PrePadding_ShadowDepthPass_LPV_4" + OpMemberName %type_ShadowDepthPass 2 "PrePadding_ShadowDepthPass_LPV_8" + OpMemberName %type_ShadowDepthPass 3 "PrePadding_ShadowDepthPass_LPV_12" + OpMemberName %type_ShadowDepthPass 4 "PrePadding_ShadowDepthPass_LPV_16" + OpMemberName %type_ShadowDepthPass 5 "PrePadding_ShadowDepthPass_LPV_20" + OpMemberName %type_ShadowDepthPass 6 "PrePadding_ShadowDepthPass_LPV_24" + OpMemberName %type_ShadowDepthPass 7 "PrePadding_ShadowDepthPass_LPV_28" + OpMemberName %type_ShadowDepthPass 8 "PrePadding_ShadowDepthPass_LPV_32" + OpMemberName %type_ShadowDepthPass 9 "PrePadding_ShadowDepthPass_LPV_36" + OpMemberName %type_ShadowDepthPass 10 "PrePadding_ShadowDepthPass_LPV_40" + OpMemberName %type_ShadowDepthPass 11 "PrePadding_ShadowDepthPass_LPV_44" + OpMemberName %type_ShadowDepthPass 12 "PrePadding_ShadowDepthPass_LPV_48" + OpMemberName %type_ShadowDepthPass 13 "PrePadding_ShadowDepthPass_LPV_52" + OpMemberName %type_ShadowDepthPass 14 "PrePadding_ShadowDepthPass_LPV_56" + OpMemberName %type_ShadowDepthPass 15 "PrePadding_ShadowDepthPass_LPV_60" + OpMemberName %type_ShadowDepthPass 16 "PrePadding_ShadowDepthPass_LPV_64" + OpMemberName %type_ShadowDepthPass 17 "PrePadding_ShadowDepthPass_LPV_68" + OpMemberName %type_ShadowDepthPass 18 "PrePadding_ShadowDepthPass_LPV_72" + OpMemberName %type_ShadowDepthPass 19 "PrePadding_ShadowDepthPass_LPV_76" + OpMemberName %type_ShadowDepthPass 20 "PrePadding_ShadowDepthPass_LPV_80" + OpMemberName %type_ShadowDepthPass 21 "PrePadding_ShadowDepthPass_LPV_84" + OpMemberName %type_ShadowDepthPass 22 "PrePadding_ShadowDepthPass_LPV_88" + OpMemberName %type_ShadowDepthPass 23 "PrePadding_ShadowDepthPass_LPV_92" + OpMemberName %type_ShadowDepthPass 24 "PrePadding_ShadowDepthPass_LPV_96" + OpMemberName %type_ShadowDepthPass 25 "PrePadding_ShadowDepthPass_LPV_100" + OpMemberName %type_ShadowDepthPass 26 "PrePadding_ShadowDepthPass_LPV_104" + OpMemberName %type_ShadowDepthPass 27 "PrePadding_ShadowDepthPass_LPV_108" + OpMemberName %type_ShadowDepthPass 28 "PrePadding_ShadowDepthPass_LPV_112" + OpMemberName %type_ShadowDepthPass 29 "PrePadding_ShadowDepthPass_LPV_116" + OpMemberName %type_ShadowDepthPass 30 "PrePadding_ShadowDepthPass_LPV_120" + OpMemberName %type_ShadowDepthPass 31 "PrePadding_ShadowDepthPass_LPV_124" + OpMemberName %type_ShadowDepthPass 32 "PrePadding_ShadowDepthPass_LPV_128" + OpMemberName %type_ShadowDepthPass 33 "PrePadding_ShadowDepthPass_LPV_132" + OpMemberName %type_ShadowDepthPass 34 "PrePadding_ShadowDepthPass_LPV_136" + OpMemberName %type_ShadowDepthPass 35 "PrePadding_ShadowDepthPass_LPV_140" + OpMemberName %type_ShadowDepthPass 36 "PrePadding_ShadowDepthPass_LPV_144" + OpMemberName %type_ShadowDepthPass 37 "PrePadding_ShadowDepthPass_LPV_148" + OpMemberName %type_ShadowDepthPass 38 "PrePadding_ShadowDepthPass_LPV_152" + OpMemberName %type_ShadowDepthPass 39 "PrePadding_ShadowDepthPass_LPV_156" + OpMemberName %type_ShadowDepthPass 40 "PrePadding_ShadowDepthPass_LPV_160" + OpMemberName %type_ShadowDepthPass 41 "PrePadding_ShadowDepthPass_LPV_164" + OpMemberName %type_ShadowDepthPass 42 "PrePadding_ShadowDepthPass_LPV_168" + OpMemberName %type_ShadowDepthPass 43 "PrePadding_ShadowDepthPass_LPV_172" + OpMemberName %type_ShadowDepthPass 44 "PrePadding_ShadowDepthPass_LPV_176" + OpMemberName %type_ShadowDepthPass 45 "PrePadding_ShadowDepthPass_LPV_180" + OpMemberName %type_ShadowDepthPass 46 "PrePadding_ShadowDepthPass_LPV_184" + OpMemberName %type_ShadowDepthPass 47 "PrePadding_ShadowDepthPass_LPV_188" + OpMemberName %type_ShadowDepthPass 48 "PrePadding_ShadowDepthPass_LPV_192" + OpMemberName %type_ShadowDepthPass 49 "PrePadding_ShadowDepthPass_LPV_196" + OpMemberName %type_ShadowDepthPass 50 "PrePadding_ShadowDepthPass_LPV_200" + OpMemberName %type_ShadowDepthPass 51 "PrePadding_ShadowDepthPass_LPV_204" + OpMemberName %type_ShadowDepthPass 52 "PrePadding_ShadowDepthPass_LPV_208" + OpMemberName %type_ShadowDepthPass 53 "PrePadding_ShadowDepthPass_LPV_212" + OpMemberName %type_ShadowDepthPass 54 "PrePadding_ShadowDepthPass_LPV_216" + OpMemberName %type_ShadowDepthPass 55 "PrePadding_ShadowDepthPass_LPV_220" + OpMemberName %type_ShadowDepthPass 56 "PrePadding_ShadowDepthPass_LPV_224" + OpMemberName %type_ShadowDepthPass 57 "PrePadding_ShadowDepthPass_LPV_228" + OpMemberName %type_ShadowDepthPass 58 "PrePadding_ShadowDepthPass_LPV_232" + OpMemberName %type_ShadowDepthPass 59 "PrePadding_ShadowDepthPass_LPV_236" + OpMemberName %type_ShadowDepthPass 60 "PrePadding_ShadowDepthPass_LPV_240" + OpMemberName %type_ShadowDepthPass 61 "PrePadding_ShadowDepthPass_LPV_244" + OpMemberName %type_ShadowDepthPass 62 "PrePadding_ShadowDepthPass_LPV_248" + OpMemberName %type_ShadowDepthPass 63 "PrePadding_ShadowDepthPass_LPV_252" + OpMemberName %type_ShadowDepthPass 64 "PrePadding_ShadowDepthPass_LPV_256" + OpMemberName %type_ShadowDepthPass 65 "PrePadding_ShadowDepthPass_LPV_260" + OpMemberName %type_ShadowDepthPass 66 "PrePadding_ShadowDepthPass_LPV_264" + OpMemberName %type_ShadowDepthPass 67 "PrePadding_ShadowDepthPass_LPV_268" + OpMemberName %type_ShadowDepthPass 68 "ShadowDepthPass_LPV_mRsmToWorld" + OpMemberName %type_ShadowDepthPass 69 "ShadowDepthPass_LPV_mLightColour" + OpMemberName %type_ShadowDepthPass 70 "ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection" + OpMemberName %type_ShadowDepthPass 71 "ShadowDepthPass_LPV_mEyePos" + OpMemberName %type_ShadowDepthPass 72 "ShadowDepthPass_LPV_mOldGridOffset" + OpMemberName %type_ShadowDepthPass 73 "PrePadding_ShadowDepthPass_LPV_396" + OpMemberName %type_ShadowDepthPass 74 "ShadowDepthPass_LPV_mLpvGridOffset" + OpMemberName %type_ShadowDepthPass 75 "ShadowDepthPass_LPV_ClearMultiplier" + OpMemberName %type_ShadowDepthPass 76 "ShadowDepthPass_LPV_LpvScale" + OpMemberName %type_ShadowDepthPass 77 "ShadowDepthPass_LPV_OneOverLpvScale" + OpMemberName %type_ShadowDepthPass 78 "ShadowDepthPass_LPV_DirectionalOcclusionIntensity" + OpMemberName %type_ShadowDepthPass 79 "ShadowDepthPass_LPV_DirectionalOcclusionRadius" + OpMemberName %type_ShadowDepthPass 80 "ShadowDepthPass_LPV_RsmAreaIntensityMultiplier" + OpMemberName %type_ShadowDepthPass 81 "ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier" + OpMemberName %type_ShadowDepthPass 82 "ShadowDepthPass_LPV_SecondaryOcclusionStrength" + OpMemberName %type_ShadowDepthPass 83 "ShadowDepthPass_LPV_SecondaryBounceStrength" + OpMemberName %type_ShadowDepthPass 84 "ShadowDepthPass_LPV_VplInjectionBias" + OpMemberName %type_ShadowDepthPass 85 "ShadowDepthPass_LPV_GeometryVolumeInjectionBias" + OpMemberName %type_ShadowDepthPass 86 "ShadowDepthPass_LPV_EmissiveInjectionMultiplier" + OpMemberName %type_ShadowDepthPass 87 "ShadowDepthPass_LPV_PropagationIndex" + OpMemberName %type_ShadowDepthPass 88 "ShadowDepthPass_ProjectionMatrix" + OpMemberName %type_ShadowDepthPass 89 "ShadowDepthPass_ViewMatrix" + OpMemberName %type_ShadowDepthPass 90 "ShadowDepthPass_ShadowParams" + OpMemberName %type_ShadowDepthPass 91 "ShadowDepthPass_bClampToNearPlane" + OpMemberName %type_ShadowDepthPass 92 "PrePadding_ShadowDepthPass_612" + OpMemberName %type_ShadowDepthPass 93 "PrePadding_ShadowDepthPass_616" + OpMemberName %type_ShadowDepthPass 94 "PrePadding_ShadowDepthPass_620" + OpMemberName %type_ShadowDepthPass 95 "ShadowDepthPass_ShadowViewProjectionMatrices" + OpMemberName %type_ShadowDepthPass 96 "ShadowDepthPass_ShadowViewMatrices" + OpName %ShadowDepthPass "ShadowDepthPass" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_VS_to_DS_Position "in.var.VS_to_DS_Position" + OpName %in_var_VS_To_DS_VertexID "in.var.VS_To_DS_VertexID" + OpName %in_var_PN_POSITION "in.var.PN_POSITION" + OpName %in_var_PN_DisplacementScales "in.var.PN_DisplacementScales" + OpName %in_var_PN_TessellationMultiplier "in.var.PN_TessellationMultiplier" + OpName %in_var_PN_WorldDisplacementMultiplier "in.var.PN_WorldDisplacementMultiplier" + OpName %in_var_PN_DominantVertex "in.var.PN_DominantVertex" + OpName %in_var_PN_DominantVertex1 "in.var.PN_DominantVertex1" + OpName %in_var_PN_DominantVertex2 "in.var.PN_DominantVertex2" + OpName %in_var_PN_DominantEdge "in.var.PN_DominantEdge" + OpName %in_var_PN_DominantEdge1 "in.var.PN_DominantEdge1" + OpName %in_var_PN_DominantEdge2 "in.var.PN_DominantEdge2" + OpName %in_var_PN_DominantEdge3 "in.var.PN_DominantEdge3" + OpName %in_var_PN_DominantEdge4 "in.var.PN_DominantEdge4" + OpName %in_var_PN_DominantEdge5 "in.var.PN_DominantEdge5" + OpName %in_var_PN_POSITION9 "in.var.PN_POSITION9" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_TEXCOORD6 "out.var.TEXCOORD6" + OpName %out_var_TEXCOORD7 "out.var.TEXCOORD7" + OpName %MainDomain "MainDomain" + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_VS_to_DS_Position UserSemantic "VS_to_DS_Position" + OpDecorateString %in_var_VS_To_DS_VertexID UserSemantic "VS_To_DS_VertexID" + OpDecorateString %in_var_PN_POSITION UserSemantic "PN_POSITION" + OpDecorateString %in_var_PN_DisplacementScales UserSemantic "PN_DisplacementScales" + OpDecorateString %in_var_PN_TessellationMultiplier UserSemantic "PN_TessellationMultiplier" + OpDecorateString %in_var_PN_WorldDisplacementMultiplier UserSemantic "PN_WorldDisplacementMultiplier" + OpDecorateString %in_var_PN_DominantVertex UserSemantic "PN_DominantVertex" + OpDecorateString %in_var_PN_DominantVertex1 UserSemantic "PN_DominantVertex" + OpDecorateString %in_var_PN_DominantVertex2 UserSemantic "PN_DominantVertex" + OpDecorateString %in_var_PN_DominantEdge UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge1 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge2 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge3 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge4 UserSemantic "PN_DominantEdge" + OpDecorateString %in_var_PN_DominantEdge5 UserSemantic "PN_DominantEdge" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %in_var_PN_POSITION9 UserSemantic "PN_POSITION9" + OpDecorate %in_var_PN_POSITION9 Patch + OpDecorate %gl_TessCoord BuiltIn TessCoord + OpDecorateString %gl_TessCoord UserSemantic "SV_DomainLocation" + OpDecorate %gl_TessCoord Patch + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %out_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorate %in_var_PN_DisplacementScales Location 0 + OpDecorate %in_var_PN_DominantEdge Location 1 + OpDecorate %in_var_PN_DominantEdge1 Location 2 + OpDecorate %in_var_PN_DominantEdge2 Location 3 + OpDecorate %in_var_PN_DominantEdge3 Location 4 + OpDecorate %in_var_PN_DominantEdge4 Location 5 + OpDecorate %in_var_PN_DominantEdge5 Location 6 + OpDecorate %in_var_PN_DominantVertex Location 7 + OpDecorate %in_var_PN_DominantVertex1 Location 8 + OpDecorate %in_var_PN_DominantVertex2 Location 9 + OpDecorate %in_var_PN_POSITION Location 10 + OpDecorate %in_var_PN_POSITION9 Location 13 + OpDecorate %in_var_PN_TessellationMultiplier Location 14 + OpDecorate %in_var_PN_WorldDisplacementMultiplier Location 15 + OpDecorate %in_var_TEXCOORD10_centroid Location 16 + OpDecorate %in_var_TEXCOORD11_centroid Location 17 + OpDecorate %in_var_VS_To_DS_VertexID Location 18 + OpDecorate %in_var_VS_to_DS_Position Location 19 + OpDecorate %out_var_TEXCOORD10_centroid Location 0 + OpDecorate %out_var_TEXCOORD11_centroid Location 1 + OpDecorate %out_var_TEXCOORD6 Location 2 + OpDecorate %out_var_TEXCOORD7 Location 3 + OpDecorate %ShadowDepthPass DescriptorSet 0 + OpDecorate %ShadowDepthPass Binding 0 + OpDecorate %_arr_mat4v4float_uint_6 ArrayStride 64 + OpMemberDecorate %type_ShadowDepthPass 0 Offset 0 + OpMemberDecorate %type_ShadowDepthPass 1 Offset 4 + OpMemberDecorate %type_ShadowDepthPass 2 Offset 8 + OpMemberDecorate %type_ShadowDepthPass 3 Offset 12 + OpMemberDecorate %type_ShadowDepthPass 4 Offset 16 + OpMemberDecorate %type_ShadowDepthPass 5 Offset 20 + OpMemberDecorate %type_ShadowDepthPass 6 Offset 24 + OpMemberDecorate %type_ShadowDepthPass 7 Offset 28 + OpMemberDecorate %type_ShadowDepthPass 8 Offset 32 + OpMemberDecorate %type_ShadowDepthPass 9 Offset 36 + OpMemberDecorate %type_ShadowDepthPass 10 Offset 40 + OpMemberDecorate %type_ShadowDepthPass 11 Offset 44 + OpMemberDecorate %type_ShadowDepthPass 12 Offset 48 + OpMemberDecorate %type_ShadowDepthPass 13 Offset 52 + OpMemberDecorate %type_ShadowDepthPass 14 Offset 56 + OpMemberDecorate %type_ShadowDepthPass 15 Offset 60 + OpMemberDecorate %type_ShadowDepthPass 16 Offset 64 + OpMemberDecorate %type_ShadowDepthPass 17 Offset 68 + OpMemberDecorate %type_ShadowDepthPass 18 Offset 72 + OpMemberDecorate %type_ShadowDepthPass 19 Offset 76 + OpMemberDecorate %type_ShadowDepthPass 20 Offset 80 + OpMemberDecorate %type_ShadowDepthPass 21 Offset 84 + OpMemberDecorate %type_ShadowDepthPass 22 Offset 88 + OpMemberDecorate %type_ShadowDepthPass 23 Offset 92 + OpMemberDecorate %type_ShadowDepthPass 24 Offset 96 + OpMemberDecorate %type_ShadowDepthPass 25 Offset 100 + OpMemberDecorate %type_ShadowDepthPass 26 Offset 104 + OpMemberDecorate %type_ShadowDepthPass 27 Offset 108 + OpMemberDecorate %type_ShadowDepthPass 28 Offset 112 + OpMemberDecorate %type_ShadowDepthPass 29 Offset 116 + OpMemberDecorate %type_ShadowDepthPass 30 Offset 120 + OpMemberDecorate %type_ShadowDepthPass 31 Offset 124 + OpMemberDecorate %type_ShadowDepthPass 32 Offset 128 + OpMemberDecorate %type_ShadowDepthPass 33 Offset 132 + OpMemberDecorate %type_ShadowDepthPass 34 Offset 136 + OpMemberDecorate %type_ShadowDepthPass 35 Offset 140 + OpMemberDecorate %type_ShadowDepthPass 36 Offset 144 + OpMemberDecorate %type_ShadowDepthPass 37 Offset 148 + OpMemberDecorate %type_ShadowDepthPass 38 Offset 152 + OpMemberDecorate %type_ShadowDepthPass 39 Offset 156 + OpMemberDecorate %type_ShadowDepthPass 40 Offset 160 + OpMemberDecorate %type_ShadowDepthPass 41 Offset 164 + OpMemberDecorate %type_ShadowDepthPass 42 Offset 168 + OpMemberDecorate %type_ShadowDepthPass 43 Offset 172 + OpMemberDecorate %type_ShadowDepthPass 44 Offset 176 + OpMemberDecorate %type_ShadowDepthPass 45 Offset 180 + OpMemberDecorate %type_ShadowDepthPass 46 Offset 184 + OpMemberDecorate %type_ShadowDepthPass 47 Offset 188 + OpMemberDecorate %type_ShadowDepthPass 48 Offset 192 + OpMemberDecorate %type_ShadowDepthPass 49 Offset 196 + OpMemberDecorate %type_ShadowDepthPass 50 Offset 200 + OpMemberDecorate %type_ShadowDepthPass 51 Offset 204 + OpMemberDecorate %type_ShadowDepthPass 52 Offset 208 + OpMemberDecorate %type_ShadowDepthPass 53 Offset 212 + OpMemberDecorate %type_ShadowDepthPass 54 Offset 216 + OpMemberDecorate %type_ShadowDepthPass 55 Offset 220 + OpMemberDecorate %type_ShadowDepthPass 56 Offset 224 + OpMemberDecorate %type_ShadowDepthPass 57 Offset 228 + OpMemberDecorate %type_ShadowDepthPass 58 Offset 232 + OpMemberDecorate %type_ShadowDepthPass 59 Offset 236 + OpMemberDecorate %type_ShadowDepthPass 60 Offset 240 + OpMemberDecorate %type_ShadowDepthPass 61 Offset 244 + OpMemberDecorate %type_ShadowDepthPass 62 Offset 248 + OpMemberDecorate %type_ShadowDepthPass 63 Offset 252 + OpMemberDecorate %type_ShadowDepthPass 64 Offset 256 + OpMemberDecorate %type_ShadowDepthPass 65 Offset 260 + OpMemberDecorate %type_ShadowDepthPass 66 Offset 264 + OpMemberDecorate %type_ShadowDepthPass 67 Offset 268 + OpMemberDecorate %type_ShadowDepthPass 68 Offset 272 + OpMemberDecorate %type_ShadowDepthPass 68 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 68 ColMajor + OpMemberDecorate %type_ShadowDepthPass 69 Offset 336 + OpMemberDecorate %type_ShadowDepthPass 70 Offset 352 + OpMemberDecorate %type_ShadowDepthPass 71 Offset 368 + OpMemberDecorate %type_ShadowDepthPass 72 Offset 384 + OpMemberDecorate %type_ShadowDepthPass 73 Offset 396 + OpMemberDecorate %type_ShadowDepthPass 74 Offset 400 + OpMemberDecorate %type_ShadowDepthPass 75 Offset 412 + OpMemberDecorate %type_ShadowDepthPass 76 Offset 416 + OpMemberDecorate %type_ShadowDepthPass 77 Offset 420 + OpMemberDecorate %type_ShadowDepthPass 78 Offset 424 + OpMemberDecorate %type_ShadowDepthPass 79 Offset 428 + OpMemberDecorate %type_ShadowDepthPass 80 Offset 432 + OpMemberDecorate %type_ShadowDepthPass 81 Offset 436 + OpMemberDecorate %type_ShadowDepthPass 82 Offset 440 + OpMemberDecorate %type_ShadowDepthPass 83 Offset 444 + OpMemberDecorate %type_ShadowDepthPass 84 Offset 448 + OpMemberDecorate %type_ShadowDepthPass 85 Offset 452 + OpMemberDecorate %type_ShadowDepthPass 86 Offset 456 + OpMemberDecorate %type_ShadowDepthPass 87 Offset 460 + OpMemberDecorate %type_ShadowDepthPass 88 Offset 464 + OpMemberDecorate %type_ShadowDepthPass 88 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 88 ColMajor + OpMemberDecorate %type_ShadowDepthPass 89 Offset 528 + OpMemberDecorate %type_ShadowDepthPass 89 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 89 ColMajor + OpMemberDecorate %type_ShadowDepthPass 90 Offset 592 + OpMemberDecorate %type_ShadowDepthPass 91 Offset 608 + OpMemberDecorate %type_ShadowDepthPass 92 Offset 612 + OpMemberDecorate %type_ShadowDepthPass 93 Offset 616 + OpMemberDecorate %type_ShadowDepthPass 94 Offset 620 + OpMemberDecorate %type_ShadowDepthPass 95 Offset 624 + OpMemberDecorate %type_ShadowDepthPass 95 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 95 ColMajor + OpMemberDecorate %type_ShadowDepthPass 96 Offset 1008 + OpMemberDecorate %type_ShadowDepthPass 96 MatrixStride 16 + OpMemberDecorate %type_ShadowDepthPass 96 ColMajor + OpDecorate %type_ShadowDepthPass Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_4 = OpConstant %uint 4 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %float_3 = OpConstant %float 3 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %float_6 = OpConstant %float 6 + %48 = OpConstantComposite %v4float %float_6 %float_6 %float_6 %float_6 + %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 + %int_3 = OpConstant %int 3 + %int_88 = OpConstant %int 88 + %int_89 = OpConstant %int 89 + %int_90 = OpConstant %int 90 + %int_91 = OpConstant %int 91 +%float_9_99999997en07 = OpConstant %float 9.99999997e-07 + %uint_6 = OpConstant %uint 6 +%_arr_mat4v4float_uint_6 = OpTypeArray %mat4v4float %uint_6 + %v3int = OpTypeVector %int 3 +%type_ShadowDepthPass = OpTypeStruct %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %mat4v4float %v4float %v4float %v4float %v3int %int %v3int %float %float %float %float %float %float %float %float %float %float %float %float %int %mat4v4float %mat4v4float %v4float %float %float %float %float %_arr_mat4v4float_uint_6 %_arr_mat4v4float_uint_6 +%_ptr_Uniform_type_ShadowDepthPass = OpTypePointer Uniform %type_ShadowDepthPass + %uint_3 = OpConstant %uint 3 +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%_ptr_Input__arr_v4float_uint_3 = OpTypePointer Input %_arr_v4float_uint_3 +%_arr_uint_uint_3 = OpTypeArray %uint %uint_3 +%_ptr_Input__arr_uint_uint_3 = OpTypePointer Input %_arr_uint_uint_3 +%_arr__arr_v4float_uint_3_uint_3 = OpTypeArray %_arr_v4float_uint_3 %uint_3 +%_ptr_Input__arr__arr_v4float_uint_3_uint_3 = OpTypePointer Input %_arr__arr_v4float_uint_3_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Input__arr_v3float_uint_3 = OpTypePointer Input %_arr_v3float_uint_3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 +%_ptr_Input__arr_float_uint_3 = OpTypePointer Input %_arr_float_uint_3 +%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3 +%_ptr_Input__arr_v2float_uint_3 = OpTypePointer Input %_arr_v2float_uint_3 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Input__arr_float_uint_4 = OpTypePointer Input %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Input__arr_float_uint_2 = OpTypePointer Input %_arr_float_uint_2 +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input_v3float = OpTypePointer Input %v3float +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Output_v3float = OpTypePointer Output %v3float + %void = OpTypeVoid + %83 = OpTypeFunction %void +%_ptr_Function_float = OpTypePointer Function %float + %bool = OpTypeBool +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%ShadowDepthPass = OpVariable %_ptr_Uniform_type_ShadowDepthPass Uniform +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_VS_to_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_VS_To_DS_VertexID = OpVariable %_ptr_Input__arr_uint_uint_3 Input +%in_var_PN_POSITION = OpVariable %_ptr_Input__arr__arr_v4float_uint_3_uint_3 Input +%in_var_PN_DisplacementScales = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_TessellationMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%in_var_PN_WorldDisplacementMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%in_var_PN_DominantVertex = OpVariable %_ptr_Input__arr_v2float_uint_3 Input +%in_var_PN_DominantVertex1 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_DominantVertex2 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_DominantEdge = OpVariable %_ptr_Input__arr_v2float_uint_3 Input +%in_var_PN_DominantEdge1 = OpVariable %_ptr_Input__arr_v2float_uint_3 Input +%in_var_PN_DominantEdge2 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_DominantEdge3 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_PN_DominantEdge4 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_PN_DominantEdge5 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%gl_TessLevelOuter = OpVariable %_ptr_Input__arr_float_uint_4 Input +%gl_TessLevelInner = OpVariable %_ptr_Input__arr_float_uint_2 Input +%in_var_PN_POSITION9 = OpVariable %_ptr_Input_v4float Input +%gl_TessCoord = OpVariable %_ptr_Input_v3float Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD6 = OpVariable %_ptr_Output_float Output +%out_var_TEXCOORD7 = OpVariable %_ptr_Output_v3float Output +%gl_Position = OpVariable %_ptr_Output_v4float Output + %89 = OpConstantNull %v4float + %90 = OpUndef %v4float + %MainDomain = OpFunction %void None %83 + %91 = OpLabel + %92 = OpVariable %_ptr_Function_mat4v4float Function + %93 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD10_centroid + %94 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD11_centroid + %95 = OpCompositeExtract %v4float %93 0 + %96 = OpCompositeExtract %v4float %94 0 + %97 = OpCompositeExtract %v4float %93 1 + %98 = OpCompositeExtract %v4float %94 1 + %99 = OpCompositeExtract %v4float %93 2 + %100 = OpCompositeExtract %v4float %94 2 + %101 = OpLoad %_arr__arr_v4float_uint_3_uint_3 %in_var_PN_POSITION + %102 = OpCompositeExtract %_arr_v4float_uint_3 %101 0 + %103 = OpCompositeExtract %_arr_v4float_uint_3 %101 1 + %104 = OpCompositeExtract %_arr_v4float_uint_3 %101 2 + %105 = OpCompositeExtract %v4float %102 0 + %106 = OpCompositeExtract %v4float %102 1 + %107 = OpCompositeExtract %v4float %102 2 + %108 = OpCompositeExtract %v4float %103 0 + %109 = OpCompositeExtract %v4float %103 1 + %110 = OpCompositeExtract %v4float %103 2 + %111 = OpCompositeExtract %v4float %104 0 + %112 = OpCompositeExtract %v4float %104 1 + %113 = OpCompositeExtract %v4float %104 2 + %114 = OpLoad %v4float %in_var_PN_POSITION9 + %115 = OpLoad %v3float %gl_TessCoord + %116 = OpCompositeExtract %float %115 0 + %117 = OpCompositeExtract %float %115 1 + %118 = OpCompositeExtract %float %115 2 + %119 = OpFMul %float %116 %116 + %120 = OpFMul %float %117 %117 + %121 = OpFMul %float %118 %118 + %122 = OpFMul %float %119 %float_3 + %123 = OpFMul %float %120 %float_3 + %124 = OpFMul %float %121 %float_3 + %125 = OpCompositeConstruct %v4float %119 %119 %119 %119 + %126 = OpFMul %v4float %105 %125 + %127 = OpCompositeConstruct %v4float %116 %116 %116 %116 + %128 = OpFMul %v4float %126 %127 + %129 = OpCompositeConstruct %v4float %120 %120 %120 %120 + %130 = OpFMul %v4float %108 %129 + %131 = OpCompositeConstruct %v4float %117 %117 %117 %117 + %132 = OpFMul %v4float %130 %131 + %133 = OpFAdd %v4float %128 %132 + %134 = OpCompositeConstruct %v4float %121 %121 %121 %121 + %135 = OpFMul %v4float %111 %134 + %136 = OpCompositeConstruct %v4float %118 %118 %118 %118 + %137 = OpFMul %v4float %135 %136 + %138 = OpFAdd %v4float %133 %137 + %139 = OpCompositeConstruct %v4float %122 %122 %122 %122 + %140 = OpFMul %v4float %106 %139 + %141 = OpFMul %v4float %140 %131 + %142 = OpFAdd %v4float %138 %141 + %143 = OpCompositeConstruct %v4float %123 %123 %123 %123 + %144 = OpFMul %v4float %107 %143 + %145 = OpFMul %v4float %144 %127 + %146 = OpFAdd %v4float %142 %145 + %147 = OpFMul %v4float %109 %143 + %148 = OpFMul %v4float %147 %136 + %149 = OpFAdd %v4float %146 %148 + %150 = OpCompositeConstruct %v4float %124 %124 %124 %124 + %151 = OpFMul %v4float %110 %150 + %152 = OpFMul %v4float %151 %131 + %153 = OpFAdd %v4float %149 %152 + %154 = OpFMul %v4float %112 %150 + %155 = OpFMul %v4float %154 %127 + %156 = OpFAdd %v4float %153 %155 + %157 = OpFMul %v4float %113 %139 + %158 = OpFMul %v4float %157 %136 + %159 = OpFAdd %v4float %156 %158 + %160 = OpFMul %v4float %114 %48 + %161 = OpFMul %v4float %160 %136 + %162 = OpFMul %v4float %161 %127 + %163 = OpFMul %v4float %162 %131 + %164 = OpFAdd %v4float %159 %163 + %165 = OpVectorShuffle %v3float %95 %95 0 1 2 + %166 = OpCompositeConstruct %v3float %116 %116 %116 + %167 = OpFMul %v3float %165 %166 + %168 = OpVectorShuffle %v3float %97 %97 0 1 2 + %169 = OpCompositeConstruct %v3float %117 %117 %117 + %170 = OpFMul %v3float %168 %169 + %171 = OpFAdd %v3float %167 %170 + %172 = OpFMul %v4float %96 %127 + %173 = OpFMul %v4float %98 %131 + %174 = OpFAdd %v4float %172 %173 + %175 = OpVectorShuffle %v3float %171 %89 0 1 2 + %176 = OpVectorShuffle %v3float %99 %99 0 1 2 + %177 = OpCompositeConstruct %v3float %118 %118 %118 + %178 = OpFMul %v3float %176 %177 + %179 = OpFAdd %v3float %175 %178 + %180 = OpVectorShuffle %v4float %90 %179 4 5 6 3 + %181 = OpFMul %v4float %100 %136 + %182 = OpFAdd %v4float %174 %181 + %183 = OpVectorShuffle %v3float %182 %182 0 1 2 + %184 = OpVectorShuffle %v4float %164 %164 4 5 6 3 + %185 = OpAccessChain %_ptr_Uniform_mat4v4float %ShadowDepthPass %int_88 + %186 = OpLoad %mat4v4float %185 + %187 = OpAccessChain %_ptr_Uniform_mat4v4float %ShadowDepthPass %int_89 + %188 = OpLoad %mat4v4float %187 + OpStore %92 %188 + %189 = OpMatrixTimesVector %v4float %186 %184 + %190 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_91 + %191 = OpLoad %float %190 + %192 = OpFOrdGreaterThan %bool %191 %float_0 + %193 = OpCompositeExtract %float %189 2 + %194 = OpFOrdLessThan %bool %193 %float_0 + %195 = OpLogicalAnd %bool %192 %194 + OpSelectionMerge %196 None + OpBranchConditional %195 %197 %196 + %197 = OpLabel + %198 = OpCompositeInsert %v4float %float_9_99999997en07 %189 2 + %199 = OpCompositeInsert %v4float %float_1 %198 3 + OpBranch %196 + %196 = OpLabel + %200 = OpPhi %v4float %189 %91 %199 %197 + %201 = OpAccessChain %_ptr_Function_float %92 %uint_0 %int_2 + %202 = OpLoad %float %201 + %203 = OpAccessChain %_ptr_Function_float %92 %uint_1 %int_2 + %204 = OpLoad %float %203 + %205 = OpAccessChain %_ptr_Function_float %92 %uint_2 %int_2 + %206 = OpLoad %float %205 + %207 = OpCompositeConstruct %v3float %202 %204 %206 + %208 = OpDot %float %207 %183 + %209 = OpExtInst %float %1 FAbs %208 + %210 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_2 + %211 = OpLoad %float %210 + %212 = OpExtInst %float %1 FAbs %209 + %213 = OpFOrdGreaterThan %bool %212 %float_0 + %214 = OpFMul %float %209 %209 + %215 = OpFSub %float %float_1 %214 + %216 = OpExtInst %float %1 FClamp %215 %float_0 %float_1 + %217 = OpExtInst %float %1 Sqrt %216 + %218 = OpFDiv %float %217 %209 + %219 = OpSelect %float %213 %218 %211 + %220 = OpExtInst %float %1 FClamp %219 %float_0 %211 + %221 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_1 + %222 = OpLoad %float %221 + %223 = OpFMul %float %222 %220 + %224 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_0 + %225 = OpLoad %float %224 + %226 = OpFAdd %float %223 %225 + %227 = OpAccessChain %_ptr_Uniform_float %ShadowDepthPass %int_90 %int_3 + %228 = OpLoad %float %227 + %229 = OpCompositeExtract %float %200 2 + %230 = OpFMul %float %229 %228 + %231 = OpFAdd %float %230 %226 + %232 = OpCompositeExtract %float %200 3 + %233 = OpFMul %float %231 %232 + %234 = OpCompositeInsert %v4float %233 %200 2 + %235 = OpVectorShuffle %v3float %164 %89 0 1 2 + OpStore %out_var_TEXCOORD10_centroid %180 + OpStore %out_var_TEXCOORD11_centroid %182 + OpStore %out_var_TEXCOORD6 %float_0 + OpStore %out_var_TEXCOORD7 %235 + OpStore %gl_Position %234 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese new file mode 100644 index 000000000..778e93d39 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/tese/ds-texcoord-array.asm.tese @@ -0,0 +1,715 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 183 +; Schema: 0 + OpCapability Tessellation + OpCapability SampledBuffer + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint TessellationEvaluation %MainDomain "main" %gl_TessLevelOuter %gl_TessLevelInner %in_var_TEXCOORD10_centroid %in_var_TEXCOORD11_centroid %in_var_TEXCOORD0 %in_var_COLOR1 %in_var_COLOR2 %in_var_VS_To_DS_Position %in_var_TEXCOORD7 %in_var_Flat_DisplacementScales %in_var_Flat_TessellationMultiplier %in_var_Flat_WorldDisplacementMultiplier %gl_TessCoord %out_var_TEXCOORD10_centroid %out_var_TEXCOORD11_centroid %out_var_TEXCOORD0 %out_var_COLOR1 %out_var_COLOR2 %out_var_TEXCOORD6 %out_var_TEXCOORD7 %gl_Position + OpExecutionMode %MainDomain Triangles + OpExecutionMode %MainDomain SpacingFractionalOdd + OpExecutionMode %MainDomain VertexOrderCw + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_ClipToWorld" + OpMemberName %type_View 3 "View_TranslatedWorldToView" + OpMemberName %type_View 4 "View_ViewToTranslatedWorld" + OpMemberName %type_View 5 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 6 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 7 "View_ViewToClip" + OpMemberName %type_View 8 "View_ViewToClipNoAA" + OpMemberName %type_View 9 "View_ClipToView" + OpMemberName %type_View 10 "View_ClipToTranslatedWorld" + OpMemberName %type_View 11 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 12 "View_ScreenToWorld" + OpMemberName %type_View 13 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 14 "View_ViewForward" + OpMemberName %type_View 15 "PrePadding_View_908" + OpMemberName %type_View 16 "View_ViewUp" + OpMemberName %type_View 17 "PrePadding_View_924" + OpMemberName %type_View 18 "View_ViewRight" + OpMemberName %type_View 19 "PrePadding_View_940" + OpMemberName %type_View 20 "View_HMDViewNoRollUp" + OpMemberName %type_View 21 "PrePadding_View_956" + OpMemberName %type_View 22 "View_HMDViewNoRollRight" + OpMemberName %type_View 23 "PrePadding_View_972" + OpMemberName %type_View 24 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 25 "View_ScreenPositionScaleBias" + OpMemberName %type_View 26 "View_WorldCameraOrigin" + OpMemberName %type_View 27 "PrePadding_View_1020" + OpMemberName %type_View 28 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 29 "PrePadding_View_1036" + OpMemberName %type_View 30 "View_WorldViewOrigin" + OpMemberName %type_View 31 "PrePadding_View_1052" + OpMemberName %type_View 32 "View_PreViewTranslation" + OpMemberName %type_View 33 "PrePadding_View_1068" + OpMemberName %type_View 34 "View_PrevProjection" + OpMemberName %type_View 35 "View_PrevViewProj" + OpMemberName %type_View 36 "View_PrevViewRotationProj" + OpMemberName %type_View 37 "View_PrevViewToClip" + OpMemberName %type_View 38 "View_PrevClipToView" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 40 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 41 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 42 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 43 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 44 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 45 "PrePadding_View_1724" + OpMemberName %type_View 46 "View_PrevWorldViewOrigin" + OpMemberName %type_View 47 "PrePadding_View_1740" + OpMemberName %type_View 48 "View_PrevPreViewTranslation" + OpMemberName %type_View 49 "PrePadding_View_1756" + OpMemberName %type_View 50 "View_PrevInvViewProj" + OpMemberName %type_View 51 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 52 "View_ClipToPrevClip" + OpMemberName %type_View 53 "View_TemporalAAJitter" + OpMemberName %type_View 54 "View_GlobalClippingPlane" + OpMemberName %type_View 55 "View_FieldOfViewWideAngles" + OpMemberName %type_View 56 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 57 "View_ViewRectMin" + OpMemberName %type_View 58 "View_ViewSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferSizeAndInvSize" + OpMemberName %type_View 60 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 61 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 62 "View_PreExposure" + OpMemberName %type_View 63 "View_OneOverPreExposure" + OpMemberName %type_View 64 "PrePadding_View_2076" + OpMemberName %type_View 65 "View_DiffuseOverrideParameter" + OpMemberName %type_View 66 "View_SpecularOverrideParameter" + OpMemberName %type_View 67 "View_NormalOverrideParameter" + OpMemberName %type_View 68 "View_RoughnessOverrideParameter" + OpMemberName %type_View 69 "View_PrevFrameGameTime" + OpMemberName %type_View 70 "View_PrevFrameRealTime" + OpMemberName %type_View 71 "View_OutOfBoundsMask" + OpMemberName %type_View 72 "PrePadding_View_2148" + OpMemberName %type_View 73 "PrePadding_View_2152" + OpMemberName %type_View 74 "PrePadding_View_2156" + OpMemberName %type_View 75 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 76 "View_CullingSign" + OpMemberName %type_View 77 "View_NearPlane" + OpMemberName %type_View 78 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 79 "View_GameTime" + OpMemberName %type_View 80 "View_RealTime" + OpMemberName %type_View 81 "View_DeltaTime" + OpMemberName %type_View 82 "View_MaterialTextureMipBias" + OpMemberName %type_View 83 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 84 "View_Random" + OpMemberName %type_View 85 "View_FrameNumber" + OpMemberName %type_View 86 "View_StateFrameIndexMod8" + OpMemberName %type_View 87 "View_StateFrameIndex" + OpMemberName %type_View 88 "View_CameraCut" + OpMemberName %type_View 89 "View_UnlitViewmodeMask" + OpMemberName %type_View 90 "PrePadding_View_2228" + OpMemberName %type_View 91 "PrePadding_View_2232" + OpMemberName %type_View 92 "PrePadding_View_2236" + OpMemberName %type_View 93 "View_DirectionalLightColor" + OpMemberName %type_View 94 "View_DirectionalLightDirection" + OpMemberName %type_View 95 "PrePadding_View_2268" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 97 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 98 "View_TemporalAAParams" + OpMemberName %type_View 99 "View_CircleDOFParams" + OpMemberName %type_View 100 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 101 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 102 "View_DepthOfFieldScale" + OpMemberName %type_View 103 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 104 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 105 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 106 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 107 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 108 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 109 "View_GeneralPurposeTweak" + OpMemberName %type_View 110 "View_DemosaicVposOffset" + OpMemberName %type_View 111 "PrePadding_View_2412" + OpMemberName %type_View 112 "View_IndirectLightingColorScale" + OpMemberName %type_View 113 "View_HDR32bppEncodingMode" + OpMemberName %type_View 114 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 115 "View_AtmosphericFogSunPower" + OpMemberName %type_View 116 "View_AtmosphericFogPower" + OpMemberName %type_View 117 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 118 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 119 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 120 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 121 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 122 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 123 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 124 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 125 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 126 "View_AtmosphericFogSunDiscHalfApexAngleRadian" + OpMemberName %type_View 127 "PrePadding_View_2492" + OpMemberName %type_View 128 "View_AtmosphericFogSunDiscLuminance" + OpMemberName %type_View 129 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 130 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 131 "PrePadding_View_2520" + OpMemberName %type_View 132 "PrePadding_View_2524" + OpMemberName %type_View 133 "View_AtmosphericFogSunColor" + OpMemberName %type_View 134 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 135 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 136 "View_AmbientCubemapTint" + OpMemberName %type_View 137 "View_AmbientCubemapIntensity" + OpMemberName %type_View 138 "View_SkyLightParameters" + OpMemberName %type_View 139 "PrePadding_View_2584" + OpMemberName %type_View 140 "PrePadding_View_2588" + OpMemberName %type_View 141 "View_SkyLightColor" + OpMemberName %type_View 142 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 143 "View_MobilePreviewMode" + OpMemberName %type_View 144 "View_HMDEyePaddingOffset" + OpMemberName %type_View 145 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 146 "View_ShowDecalsMask" + OpMemberName %type_View 147 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 148 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 149 "PrePadding_View_2744" + OpMemberName %type_View 150 "PrePadding_View_2748" + OpMemberName %type_View 151 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 152 "View_StereoPassIndex" + OpMemberName %type_View 153 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 154 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 155 "View_GlobalVolumeDimension" + OpMemberName %type_View 156 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 157 "View_MaxGlobalDistance" + OpMemberName %type_View 158 "PrePadding_View_2908" + OpMemberName %type_View 159 "View_CursorPosition" + OpMemberName %type_View 160 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 161 "PrePadding_View_2924" + OpMemberName %type_View 162 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 163 "PrePadding_View_2940" + OpMemberName %type_View 164 "View_VolumetricFogGridZParams" + OpMemberName %type_View 165 "PrePadding_View_2956" + OpMemberName %type_View 166 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 167 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 168 "PrePadding_View_2972" + OpMemberName %type_View 169 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 170 "PrePadding_View_2988" + OpMemberName %type_View 171 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 172 "PrePadding_View_3004" + OpMemberName %type_View 173 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 174 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 175 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 176 "View_StereoIPD" + OpMemberName %type_View 177 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 178 "View_EyeToPixelSpreadAngle" + OpMemberName %type_View 179 "PrePadding_View_3048" + OpMemberName %type_View 180 "PrePadding_View_3052" + OpMemberName %type_View 181 "View_WorldToVirtualTexture" + OpMemberName %type_View 182 "View_VirtualTextureParams" + OpMemberName %type_View 183 "View_XRPassthroughCameraUVs" + OpName %View "View" + OpName %in_var_TEXCOORD10_centroid "in.var.TEXCOORD10_centroid" + OpName %in_var_TEXCOORD11_centroid "in.var.TEXCOORD11_centroid" + OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" + OpName %in_var_COLOR1 "in.var.COLOR1" + OpName %in_var_COLOR2 "in.var.COLOR2" + OpName %in_var_VS_To_DS_Position "in.var.VS_To_DS_Position" + OpName %in_var_TEXCOORD7 "in.var.TEXCOORD7" + OpName %in_var_Flat_DisplacementScales "in.var.Flat_DisplacementScales" + OpName %in_var_Flat_TessellationMultiplier "in.var.Flat_TessellationMultiplier" + OpName %in_var_Flat_WorldDisplacementMultiplier "in.var.Flat_WorldDisplacementMultiplier" + OpName %out_var_TEXCOORD10_centroid "out.var.TEXCOORD10_centroid" + OpName %out_var_TEXCOORD11_centroid "out.var.TEXCOORD11_centroid" + OpName %out_var_TEXCOORD0 "out.var.TEXCOORD0" + OpName %out_var_COLOR1 "out.var.COLOR1" + OpName %out_var_COLOR2 "out.var.COLOR2" + OpName %out_var_TEXCOORD6 "out.var.TEXCOORD6" + OpName %out_var_TEXCOORD7 "out.var.TEXCOORD7" + OpName %MainDomain "MainDomain" + OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter + OpDecorateString %gl_TessLevelOuter UserSemantic "SV_TessFactor" + OpDecorate %gl_TessLevelOuter Patch + OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner + OpDecorateString %gl_TessLevelInner UserSemantic "SV_InsideTessFactor" + OpDecorate %gl_TessLevelInner Patch + OpDecorateString %in_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %in_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %in_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %in_var_COLOR1 UserSemantic "COLOR1" + OpDecorateString %in_var_COLOR2 UserSemantic "COLOR2" + OpDecorateString %in_var_VS_To_DS_Position UserSemantic "VS_To_DS_Position" + OpDecorateString %in_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorateString %in_var_Flat_DisplacementScales UserSemantic "Flat_DisplacementScales" + OpDecorateString %in_var_Flat_TessellationMultiplier UserSemantic "Flat_TessellationMultiplier" + OpDecorateString %in_var_Flat_WorldDisplacementMultiplier UserSemantic "Flat_WorldDisplacementMultiplier" + OpDecorate %gl_TessCoord BuiltIn TessCoord + OpDecorateString %gl_TessCoord UserSemantic "SV_DomainLocation" + OpDecorate %gl_TessCoord Patch + OpDecorateString %out_var_TEXCOORD10_centroid UserSemantic "TEXCOORD10_centroid" + OpDecorateString %out_var_TEXCOORD11_centroid UserSemantic "TEXCOORD11_centroid" + OpDecorateString %out_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %out_var_COLOR1 UserSemantic "COLOR1" + OpDecorateString %out_var_COLOR2 UserSemantic "COLOR2" + OpDecorateString %out_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorateString %out_var_TEXCOORD7 UserSemantic "TEXCOORD7" + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorate %in_var_COLOR1 Location 0 + OpDecorate %in_var_COLOR2 Location 1 + OpDecorate %in_var_Flat_DisplacementScales Location 2 + OpDecorate %in_var_Flat_TessellationMultiplier Location 3 + OpDecorate %in_var_Flat_WorldDisplacementMultiplier Location 4 + OpDecorate %in_var_TEXCOORD0 Location 5 + OpDecorate %in_var_TEXCOORD10_centroid Location 6 + OpDecorate %in_var_TEXCOORD11_centroid Location 7 + OpDecorate %in_var_TEXCOORD7 Location 8 + OpDecorate %in_var_VS_To_DS_Position Location 9 + OpDecorate %out_var_TEXCOORD10_centroid Location 0 + OpDecorate %out_var_TEXCOORD11_centroid Location 1 + OpDecorate %out_var_TEXCOORD0 Location 2 + OpDecorate %out_var_COLOR1 Location 3 + OpDecorate %out_var_COLOR2 Location 4 + OpDecorate %out_var_TEXCOORD6 Location 5 + OpDecorate %out_var_TEXCOORD7 Location 6 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 13 MatrixStride 16 + OpMemberDecorate %type_View 13 ColMajor + OpMemberDecorate %type_View 14 Offset 896 + OpMemberDecorate %type_View 15 Offset 908 + OpMemberDecorate %type_View 16 Offset 912 + OpMemberDecorate %type_View 17 Offset 924 + OpMemberDecorate %type_View 18 Offset 928 + OpMemberDecorate %type_View 19 Offset 940 + OpMemberDecorate %type_View 20 Offset 944 + OpMemberDecorate %type_View 21 Offset 956 + OpMemberDecorate %type_View 22 Offset 960 + OpMemberDecorate %type_View 23 Offset 972 + OpMemberDecorate %type_View 24 Offset 976 + OpMemberDecorate %type_View 25 Offset 992 + OpMemberDecorate %type_View 26 Offset 1008 + OpMemberDecorate %type_View 27 Offset 1020 + OpMemberDecorate %type_View 28 Offset 1024 + OpMemberDecorate %type_View 29 Offset 1036 + OpMemberDecorate %type_View 30 Offset 1040 + OpMemberDecorate %type_View 31 Offset 1052 + OpMemberDecorate %type_View 32 Offset 1056 + OpMemberDecorate %type_View 33 Offset 1068 + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 43 MatrixStride 16 + OpMemberDecorate %type_View 43 ColMajor + OpMemberDecorate %type_View 44 Offset 1712 + OpMemberDecorate %type_View 45 Offset 1724 + OpMemberDecorate %type_View 46 Offset 1728 + OpMemberDecorate %type_View 47 Offset 1740 + OpMemberDecorate %type_View 48 Offset 1744 + OpMemberDecorate %type_View 49 Offset 1756 + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 52 MatrixStride 16 + OpMemberDecorate %type_View 52 ColMajor + OpMemberDecorate %type_View 53 Offset 1952 + OpMemberDecorate %type_View 54 Offset 1968 + OpMemberDecorate %type_View 55 Offset 1984 + OpMemberDecorate %type_View 56 Offset 1992 + OpMemberDecorate %type_View 57 Offset 2000 + OpMemberDecorate %type_View 58 Offset 2016 + OpMemberDecorate %type_View 59 Offset 2032 + OpMemberDecorate %type_View 60 Offset 2048 + OpMemberDecorate %type_View 61 Offset 2064 + OpMemberDecorate %type_View 62 Offset 2068 + OpMemberDecorate %type_View 63 Offset 2072 + OpMemberDecorate %type_View 64 Offset 2076 + OpMemberDecorate %type_View 65 Offset 2080 + OpMemberDecorate %type_View 66 Offset 2096 + OpMemberDecorate %type_View 67 Offset 2112 + OpMemberDecorate %type_View 68 Offset 2128 + OpMemberDecorate %type_View 69 Offset 2136 + OpMemberDecorate %type_View 70 Offset 2140 + OpMemberDecorate %type_View 71 Offset 2144 + OpMemberDecorate %type_View 72 Offset 2148 + OpMemberDecorate %type_View 73 Offset 2152 + OpMemberDecorate %type_View 74 Offset 2156 + OpMemberDecorate %type_View 75 Offset 2160 + OpMemberDecorate %type_View 76 Offset 2172 + OpMemberDecorate %type_View 77 Offset 2176 + OpMemberDecorate %type_View 78 Offset 2180 + OpMemberDecorate %type_View 79 Offset 2184 + OpMemberDecorate %type_View 80 Offset 2188 + OpMemberDecorate %type_View 81 Offset 2192 + OpMemberDecorate %type_View 82 Offset 2196 + OpMemberDecorate %type_View 83 Offset 2200 + OpMemberDecorate %type_View 84 Offset 2204 + OpMemberDecorate %type_View 85 Offset 2208 + OpMemberDecorate %type_View 86 Offset 2212 + OpMemberDecorate %type_View 87 Offset 2216 + OpMemberDecorate %type_View 88 Offset 2220 + OpMemberDecorate %type_View 89 Offset 2224 + OpMemberDecorate %type_View 90 Offset 2228 + OpMemberDecorate %type_View 91 Offset 2232 + OpMemberDecorate %type_View 92 Offset 2236 + OpMemberDecorate %type_View 93 Offset 2240 + OpMemberDecorate %type_View 94 Offset 2256 + OpMemberDecorate %type_View 95 Offset 2268 + OpMemberDecorate %type_View 96 Offset 2272 + OpMemberDecorate %type_View 97 Offset 2304 + OpMemberDecorate %type_View 98 Offset 2336 + OpMemberDecorate %type_View 99 Offset 2352 + OpMemberDecorate %type_View 100 Offset 2368 + OpMemberDecorate %type_View 101 Offset 2372 + OpMemberDecorate %type_View 102 Offset 2376 + OpMemberDecorate %type_View 103 Offset 2380 + OpMemberDecorate %type_View 104 Offset 2384 + OpMemberDecorate %type_View 105 Offset 2388 + OpMemberDecorate %type_View 106 Offset 2392 + OpMemberDecorate %type_View 107 Offset 2396 + OpMemberDecorate %type_View 108 Offset 2400 + OpMemberDecorate %type_View 109 Offset 2404 + OpMemberDecorate %type_View 110 Offset 2408 + OpMemberDecorate %type_View 111 Offset 2412 + OpMemberDecorate %type_View 112 Offset 2416 + OpMemberDecorate %type_View 113 Offset 2428 + OpMemberDecorate %type_View 114 Offset 2432 + OpMemberDecorate %type_View 115 Offset 2444 + OpMemberDecorate %type_View 116 Offset 2448 + OpMemberDecorate %type_View 117 Offset 2452 + OpMemberDecorate %type_View 118 Offset 2456 + OpMemberDecorate %type_View 119 Offset 2460 + OpMemberDecorate %type_View 120 Offset 2464 + OpMemberDecorate %type_View 121 Offset 2468 + OpMemberDecorate %type_View 122 Offset 2472 + OpMemberDecorate %type_View 123 Offset 2476 + OpMemberDecorate %type_View 124 Offset 2480 + OpMemberDecorate %type_View 125 Offset 2484 + OpMemberDecorate %type_View 126 Offset 2488 + OpMemberDecorate %type_View 127 Offset 2492 + OpMemberDecorate %type_View 128 Offset 2496 + OpMemberDecorate %type_View 129 Offset 2512 + OpMemberDecorate %type_View 130 Offset 2516 + OpMemberDecorate %type_View 131 Offset 2520 + OpMemberDecorate %type_View 132 Offset 2524 + OpMemberDecorate %type_View 133 Offset 2528 + OpMemberDecorate %type_View 134 Offset 2544 + OpMemberDecorate %type_View 135 Offset 2556 + OpMemberDecorate %type_View 136 Offset 2560 + OpMemberDecorate %type_View 137 Offset 2576 + OpMemberDecorate %type_View 138 Offset 2580 + OpMemberDecorate %type_View 139 Offset 2584 + OpMemberDecorate %type_View 140 Offset 2588 + OpMemberDecorate %type_View 141 Offset 2592 + OpMemberDecorate %type_View 142 Offset 2608 + OpMemberDecorate %type_View 143 Offset 2720 + OpMemberDecorate %type_View 144 Offset 2724 + OpMemberDecorate %type_View 145 Offset 2728 + OpMemberDecorate %type_View 146 Offset 2732 + OpMemberDecorate %type_View 147 Offset 2736 + OpMemberDecorate %type_View 148 Offset 2740 + OpMemberDecorate %type_View 149 Offset 2744 + OpMemberDecorate %type_View 150 Offset 2748 + OpMemberDecorate %type_View 151 Offset 2752 + OpMemberDecorate %type_View 152 Offset 2764 + OpMemberDecorate %type_View 153 Offset 2768 + OpMemberDecorate %type_View 154 Offset 2832 + OpMemberDecorate %type_View 155 Offset 2896 + OpMemberDecorate %type_View 156 Offset 2900 + OpMemberDecorate %type_View 157 Offset 2904 + OpMemberDecorate %type_View 158 Offset 2908 + OpMemberDecorate %type_View 159 Offset 2912 + OpMemberDecorate %type_View 160 Offset 2920 + OpMemberDecorate %type_View 161 Offset 2924 + OpMemberDecorate %type_View 162 Offset 2928 + OpMemberDecorate %type_View 163 Offset 2940 + OpMemberDecorate %type_View 164 Offset 2944 + OpMemberDecorate %type_View 165 Offset 2956 + OpMemberDecorate %type_View 166 Offset 2960 + OpMemberDecorate %type_View 167 Offset 2968 + OpMemberDecorate %type_View 168 Offset 2972 + OpMemberDecorate %type_View 169 Offset 2976 + OpMemberDecorate %type_View 170 Offset 2988 + OpMemberDecorate %type_View 171 Offset 2992 + OpMemberDecorate %type_View 172 Offset 3004 + OpMemberDecorate %type_View 173 Offset 3008 + OpMemberDecorate %type_View 174 Offset 3020 + OpMemberDecorate %type_View 175 Offset 3024 + OpMemberDecorate %type_View 176 Offset 3036 + OpMemberDecorate %type_View 177 Offset 3040 + OpMemberDecorate %type_View 178 Offset 3044 + OpMemberDecorate %type_View 179 Offset 3048 + OpMemberDecorate %type_View 180 Offset 3052 + OpMemberDecorate %type_View 181 Offset 3056 + OpMemberDecorate %type_View 181 MatrixStride 16 + OpMemberDecorate %type_View 181 ColMajor + OpMemberDecorate %type_View 182 Offset 3120 + OpMemberDecorate %type_View 183 Offset 3136 + OpDecorate %type_View Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %v2int = OpTypeVector %int 2 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %uint_1 = OpConstant %uint 1 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %float %float %v4float %uint %uint %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v2int %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float %float %float %mat4v4float %v4float %_arr_v4float_uint_2 +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Input__arr_float_uint_4 = OpTypePointer Input %_arr_float_uint_4 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Input__arr_float_uint_2 = OpTypePointer Input %_arr_float_uint_2 + %uint_3 = OpConstant %uint 3 +%_arr_v4float_uint_3 = OpTypeArray %v4float %uint_3 +%_ptr_Input__arr_v4float_uint_3 = OpTypePointer Input %_arr_v4float_uint_3 +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%_arr__arr_v4float_uint_1_uint_3 = OpTypeArray %_arr_v4float_uint_1 %uint_3 +%_ptr_Input__arr__arr_v4float_uint_1_uint_3 = OpTypePointer Input %_arr__arr_v4float_uint_1_uint_3 +%_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 +%_ptr_Input__arr_v3float_uint_3 = OpTypePointer Input %_arr_v3float_uint_3 +%_arr_float_uint_3 = OpTypeArray %float %uint_3 +%_ptr_Input__arr_float_uint_3 = OpTypePointer Input %_arr_float_uint_3 +%_ptr_Input_v3float = OpTypePointer Input %v3float +%_ptr_Output_v4float = OpTypePointer Output %v4float +%_ptr_Output__arr_v4float_uint_1 = OpTypePointer Output %_arr_v4float_uint_1 +%_ptr_Output_v3float = OpTypePointer Output %v3float + %void = OpTypeVoid + %63 = OpTypeFunction %void +%_ptr_Function_v4float = OpTypePointer Function %v4float + %bool = OpTypeBool +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float + %View = OpVariable %_ptr_Uniform_type_View Uniform +%gl_TessLevelOuter = OpVariable %_ptr_Input__arr_float_uint_4 Input +%gl_TessLevelInner = OpVariable %_ptr_Input__arr_float_uint_2 Input +%in_var_TEXCOORD10_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD11_centroid = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input__arr__arr_v4float_uint_1_uint_3 Input +%in_var_COLOR1 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_COLOR2 = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_VS_To_DS_Position = OpVariable %_ptr_Input__arr_v4float_uint_3 Input +%in_var_TEXCOORD7 = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_Flat_DisplacementScales = OpVariable %_ptr_Input__arr_v3float_uint_3 Input +%in_var_Flat_TessellationMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%in_var_Flat_WorldDisplacementMultiplier = OpVariable %_ptr_Input__arr_float_uint_3 Input +%gl_TessCoord = OpVariable %_ptr_Input_v3float Input +%out_var_TEXCOORD10_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD11_centroid = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD0 = OpVariable %_ptr_Output__arr_v4float_uint_1 Output +%out_var_COLOR1 = OpVariable %_ptr_Output_v4float Output +%out_var_COLOR2 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD6 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD7 = OpVariable %_ptr_Output_v3float Output +%gl_Position = OpVariable %_ptr_Output_v4float Output +%_ptr_Function__arr_v4float_uint_1 = OpTypePointer Function %_arr_v4float_uint_1 + %68 = OpUndef %v4float + %69 = OpConstantNull %v4float + %MainDomain = OpFunction %void None %63 + %70 = OpLabel + %71 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %72 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %73 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %74 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %75 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %76 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %77 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD10_centroid + %78 = OpLoad %_arr_v4float_uint_3 %in_var_TEXCOORD11_centroid + %79 = OpLoad %_arr__arr_v4float_uint_1_uint_3 %in_var_TEXCOORD0 + %80 = OpLoad %_arr_v4float_uint_3 %in_var_COLOR1 + %81 = OpLoad %_arr_v4float_uint_3 %in_var_COLOR2 + %82 = OpCompositeExtract %v4float %77 0 + %83 = OpCompositeExtract %v4float %78 0 + %84 = OpCompositeExtract %_arr_v4float_uint_1 %79 0 + %85 = OpCompositeExtract %v4float %80 0 + %86 = OpCompositeExtract %v4float %81 0 + %87 = OpCompositeExtract %v4float %77 1 + %88 = OpCompositeExtract %v4float %78 1 + %89 = OpCompositeExtract %_arr_v4float_uint_1 %79 1 + %90 = OpCompositeExtract %v4float %80 1 + %91 = OpCompositeExtract %v4float %81 1 + %92 = OpCompositeExtract %v4float %77 2 + %93 = OpCompositeExtract %v4float %78 2 + %94 = OpCompositeExtract %_arr_v4float_uint_1 %79 2 + %95 = OpCompositeExtract %v4float %80 2 + %96 = OpCompositeExtract %v4float %81 2 + %97 = OpLoad %_arr_v4float_uint_3 %in_var_VS_To_DS_Position + %98 = OpLoad %_arr_v3float_uint_3 %in_var_TEXCOORD7 + %99 = OpCompositeExtract %v4float %97 0 + %100 = OpCompositeExtract %v3float %98 0 + %101 = OpCompositeExtract %v4float %97 1 + %102 = OpCompositeExtract %v3float %98 1 + %103 = OpCompositeExtract %v4float %97 2 + %104 = OpCompositeExtract %v3float %98 2 + %105 = OpLoad %v3float %gl_TessCoord + %106 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_0 + %107 = OpLoad %mat4v4float %106 + %108 = OpCompositeExtract %float %105 0 + %109 = OpCompositeExtract %float %105 1 + %110 = OpCompositeExtract %float %105 2 + %111 = OpCompositeConstruct %v4float %108 %108 %108 %108 + %112 = OpFMul %v4float %99 %111 + %113 = OpCompositeConstruct %v4float %109 %109 %109 %109 + %114 = OpFMul %v4float %101 %113 + %115 = OpFAdd %v4float %112 %114 + %116 = OpCompositeConstruct %v4float %110 %110 %110 %110 + %117 = OpFMul %v4float %103 %116 + %118 = OpFAdd %v4float %115 %117 + OpStore %72 %84 + OpStore %71 %89 + %119 = OpVectorShuffle %v3float %82 %82 0 1 2 + %120 = OpCompositeConstruct %v3float %108 %108 %108 + %121 = OpFMul %v3float %119 %120 + %122 = OpVectorShuffle %v3float %87 %87 0 1 2 + %123 = OpCompositeConstruct %v3float %109 %109 %109 + %124 = OpFMul %v3float %122 %123 + %125 = OpFAdd %v3float %121 %124 + %126 = OpFMul %v4float %83 %111 + %127 = OpFMul %v4float %88 %113 + %128 = OpFAdd %v4float %126 %127 + %129 = OpFMul %v4float %85 %111 + %130 = OpFMul %v4float %90 %113 + %131 = OpFAdd %v4float %129 %130 + OpBranch %132 + %132 = OpLabel + %133 = OpPhi %int %int_0 %70 %134 %135 + %136 = OpSLessThan %bool %133 %int_1 + OpLoopMerge %137 %135 None + OpBranchConditional %136 %135 %137 + %135 = OpLabel + %138 = OpAccessChain %_ptr_Function_v4float %72 %133 + %139 = OpLoad %v4float %138 + %140 = OpFMul %v4float %139 %111 + %141 = OpAccessChain %_ptr_Function_v4float %71 %133 + %142 = OpLoad %v4float %141 + %143 = OpFMul %v4float %142 %113 + %144 = OpFAdd %v4float %140 %143 + %145 = OpAccessChain %_ptr_Function_v4float %73 %133 + OpStore %145 %144 + %134 = OpIAdd %int %133 %int_1 + OpBranch %132 + %137 = OpLabel + %146 = OpFMul %v4float %86 %111 + %147 = OpFMul %v4float %91 %113 + %148 = OpFAdd %v4float %146 %147 + %149 = OpLoad %_arr_v4float_uint_1 %73 + %150 = OpFMul %v3float %100 %120 + %151 = OpFMul %v3float %102 %123 + %152 = OpFAdd %v3float %150 %151 + OpStore %75 %149 + OpStore %74 %94 + %153 = OpVectorShuffle %v3float %125 %69 0 1 2 + %154 = OpVectorShuffle %v3float %92 %92 0 1 2 + %155 = OpCompositeConstruct %v3float %110 %110 %110 + %156 = OpFMul %v3float %154 %155 + %157 = OpFAdd %v3float %153 %156 + %158 = OpVectorShuffle %v4float %68 %157 4 5 6 3 + %159 = OpFMul %v4float %93 %116 + %160 = OpFAdd %v4float %128 %159 + %161 = OpFMul %v4float %95 %116 + %162 = OpFAdd %v4float %131 %161 + OpBranch %163 + %163 = OpLabel + %164 = OpPhi %int %int_0 %137 %165 %166 + %167 = OpSLessThan %bool %164 %int_1 + OpLoopMerge %168 %166 None + OpBranchConditional %167 %166 %168 + %166 = OpLabel + %169 = OpAccessChain %_ptr_Function_v4float %75 %164 + %170 = OpLoad %v4float %169 + %171 = OpAccessChain %_ptr_Function_v4float %74 %164 + %172 = OpLoad %v4float %171 + %173 = OpFMul %v4float %172 %116 + %174 = OpFAdd %v4float %170 %173 + %175 = OpAccessChain %_ptr_Function_v4float %76 %164 + OpStore %175 %174 + %165 = OpIAdd %int %164 %int_1 + OpBranch %163 + %168 = OpLabel + %176 = OpFMul %v4float %96 %116 + %177 = OpFAdd %v4float %148 %176 + %178 = OpLoad %_arr_v4float_uint_1 %76 + %179 = OpFMul %v3float %104 %155 + %180 = OpFAdd %v3float %152 %179 + %181 = OpVectorShuffle %v4float %118 %118 4 5 6 3 + %182 = OpMatrixTimesVector %v4float %107 %181 + OpStore %out_var_TEXCOORD10_centroid %158 + OpStore %out_var_TEXCOORD11_centroid %160 + OpStore %out_var_TEXCOORD0 %178 + OpStore %out_var_COLOR1 %162 + OpStore %out_var_COLOR2 %177 + OpStore %out_var_TEXCOORD6 %181 + OpStore %out_var_TEXCOORD7 %180 + OpStore %gl_Position %182 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/vert/array-missing-copies.asm.vert b/3rdparty/spirv-cross/shaders-ue4/asm/vert/array-missing-copies.asm.vert new file mode 100644 index 000000000..23dc72756 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/vert/array-missing-copies.asm.vert @@ -0,0 +1,1131 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 487 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %Main "main" %in_var_ATTRIBUTE0 %in_var_ATTRIBUTE1 %out_var_TEXCOORD0 %out_var_TEXCOORD1 %out_var_TEXCOORD2 %out_var_TEXCOORD3 %out_var_TEXCOORD8 %gl_Position + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_MobileBasePass "type.MobileBasePass" + OpMemberName %type_MobileBasePass 0 "MobileBasePass_Fog_ExponentialFogParameters" + OpMemberName %type_MobileBasePass 1 "MobileBasePass_Fog_ExponentialFogParameters2" + OpMemberName %type_MobileBasePass 2 "MobileBasePass_Fog_ExponentialFogColorParameter" + OpMemberName %type_MobileBasePass 3 "MobileBasePass_Fog_ExponentialFogParameters3" + OpMemberName %type_MobileBasePass 4 "MobileBasePass_Fog_InscatteringLightDirection" + OpMemberName %type_MobileBasePass 5 "MobileBasePass_Fog_DirectionalInscatteringColor" + OpMemberName %type_MobileBasePass 6 "MobileBasePass_Fog_SinCosInscatteringColorCubemapRotation" + OpMemberName %type_MobileBasePass 7 "PrePadding_MobileBasePass_Fog_104" + OpMemberName %type_MobileBasePass 8 "PrePadding_MobileBasePass_Fog_108" + OpMemberName %type_MobileBasePass 9 "MobileBasePass_Fog_FogInscatteringTextureParameters" + OpMemberName %type_MobileBasePass 10 "MobileBasePass_Fog_ApplyVolumetricFog" + OpMemberName %type_MobileBasePass 11 "PrePadding_MobileBasePass_PlanarReflection_128" + OpMemberName %type_MobileBasePass 12 "PrePadding_MobileBasePass_PlanarReflection_132" + OpMemberName %type_MobileBasePass 13 "PrePadding_MobileBasePass_PlanarReflection_136" + OpMemberName %type_MobileBasePass 14 "PrePadding_MobileBasePass_PlanarReflection_140" + OpMemberName %type_MobileBasePass 15 "PrePadding_MobileBasePass_PlanarReflection_144" + OpMemberName %type_MobileBasePass 16 "PrePadding_MobileBasePass_PlanarReflection_148" + OpMemberName %type_MobileBasePass 17 "PrePadding_MobileBasePass_PlanarReflection_152" + OpMemberName %type_MobileBasePass 18 "PrePadding_MobileBasePass_PlanarReflection_156" + OpMemberName %type_MobileBasePass 19 "MobileBasePass_PlanarReflection_ReflectionPlane" + OpMemberName %type_MobileBasePass 20 "MobileBasePass_PlanarReflection_PlanarReflectionOrigin" + OpMemberName %type_MobileBasePass 21 "MobileBasePass_PlanarReflection_PlanarReflectionXAxis" + OpMemberName %type_MobileBasePass 22 "MobileBasePass_PlanarReflection_PlanarReflectionYAxis" + OpMemberName %type_MobileBasePass 23 "MobileBasePass_PlanarReflection_InverseTransposeMirrorMatrix" + OpMemberName %type_MobileBasePass 24 "MobileBasePass_PlanarReflection_PlanarReflectionParameters" + OpMemberName %type_MobileBasePass 25 "PrePadding_MobileBasePass_PlanarReflection_284" + OpMemberName %type_MobileBasePass 26 "MobileBasePass_PlanarReflection_PlanarReflectionParameters2" + OpMemberName %type_MobileBasePass 27 "PrePadding_MobileBasePass_PlanarReflection_296" + OpMemberName %type_MobileBasePass 28 "PrePadding_MobileBasePass_PlanarReflection_300" + OpMemberName %type_MobileBasePass 29 "MobileBasePass_PlanarReflection_ProjectionWithExtraFOV" + OpMemberName %type_MobileBasePass 30 "MobileBasePass_PlanarReflection_PlanarReflectionScreenScaleBias" + OpMemberName %type_MobileBasePass 31 "MobileBasePass_PlanarReflection_PlanarReflectionScreenBound" + OpMemberName %type_MobileBasePass 32 "MobileBasePass_PlanarReflection_bIsStereo" + OpName %MobileBasePass "MobileBasePass" + OpName %type_Primitive "type.Primitive" + OpMemberName %type_Primitive 0 "Primitive_LocalToWorld" + OpMemberName %type_Primitive 1 "Primitive_InvNonUniformScaleAndDeterminantSign" + OpMemberName %type_Primitive 2 "Primitive_ObjectWorldPositionAndRadius" + OpMemberName %type_Primitive 3 "Primitive_WorldToLocal" + OpMemberName %type_Primitive 4 "Primitive_PreviousLocalToWorld" + OpMemberName %type_Primitive 5 "Primitive_PreviousWorldToLocal" + OpMemberName %type_Primitive 6 "Primitive_ActorWorldPosition" + OpMemberName %type_Primitive 7 "Primitive_UseSingleSampleShadowFromStationaryLights" + OpMemberName %type_Primitive 8 "Primitive_ObjectBounds" + OpMemberName %type_Primitive 9 "Primitive_LpvBiasMultiplier" + OpMemberName %type_Primitive 10 "Primitive_DecalReceiverMask" + OpMemberName %type_Primitive 11 "Primitive_PerObjectGBufferData" + OpMemberName %type_Primitive 12 "Primitive_UseVolumetricLightmapShadowFromStationaryLights" + OpMemberName %type_Primitive 13 "Primitive_UseEditorDepthTest" + OpMemberName %type_Primitive 14 "Primitive_ObjectOrientation" + OpMemberName %type_Primitive 15 "Primitive_NonUniformScale" + OpMemberName %type_Primitive 16 "Primitive_LocalObjectBoundsMin" + OpMemberName %type_Primitive 17 "PrePadding_Primitive_380" + OpMemberName %type_Primitive 18 "Primitive_LocalObjectBoundsMax" + OpMemberName %type_Primitive 19 "Primitive_LightingChannelMask" + OpMemberName %type_Primitive 20 "Primitive_LightmapDataIndex" + OpMemberName %type_Primitive 21 "Primitive_SingleCaptureIndex" + OpName %Primitive "Primitive" + OpName %type_LandscapeParameters "type.LandscapeParameters" + OpMemberName %type_LandscapeParameters 0 "LandscapeParameters_HeightmapUVScaleBias" + OpMemberName %type_LandscapeParameters 1 "LandscapeParameters_WeightmapUVScaleBias" + OpMemberName %type_LandscapeParameters 2 "LandscapeParameters_LandscapeLightmapScaleBias" + OpMemberName %type_LandscapeParameters 3 "LandscapeParameters_SubsectionSizeVertsLayerUVPan" + OpMemberName %type_LandscapeParameters 4 "LandscapeParameters_SubsectionOffsetParams" + OpMemberName %type_LandscapeParameters 5 "LandscapeParameters_LightmapSubsectionOffsetParams" + OpMemberName %type_LandscapeParameters 6 "LandscapeParameters_LocalToWorldNoScaling" + OpName %LandscapeParameters "LandscapeParameters" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "LodBias" + OpMemberName %type__Globals 1 "LodValues" + OpMemberName %type__Globals 2 "SectionLods" + OpMemberName %type__Globals 3 "NeighborSectionLod" + OpName %_Globals "$Globals" + OpName %in_var_ATTRIBUTE0 "in.var.ATTRIBUTE0" + OpName %in_var_ATTRIBUTE1 "in.var.ATTRIBUTE1" + OpName %out_var_TEXCOORD0 "out.var.TEXCOORD0" + OpName %out_var_TEXCOORD1 "out.var.TEXCOORD1" + OpName %out_var_TEXCOORD2 "out.var.TEXCOORD2" + OpName %out_var_TEXCOORD3 "out.var.TEXCOORD3" + OpName %out_var_TEXCOORD8 "out.var.TEXCOORD8" + OpName %Main "Main" + OpDecorateString %in_var_ATTRIBUTE0 UserSemantic "ATTRIBUTE0" + OpDecorateString %in_var_ATTRIBUTE1 UserSemantic "ATTRIBUTE1" + OpDecorateString %out_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %out_var_TEXCOORD1 UserSemantic "TEXCOORD1" + OpDecorateString %out_var_TEXCOORD2 UserSemantic "TEXCOORD2" + OpDecorateString %out_var_TEXCOORD3 UserSemantic "TEXCOORD3" + OpDecorateString %out_var_TEXCOORD8 UserSemantic "TEXCOORD8" + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorate %in_var_ATTRIBUTE0 Location 0 + OpDecorate %in_var_ATTRIBUTE1 Location 1 + OpDecorate %out_var_TEXCOORD0 Location 0 + OpDecorate %out_var_TEXCOORD1 Location 1 + OpDecorate %out_var_TEXCOORD2 Location 2 + OpDecorate %out_var_TEXCOORD3 Location 3 + OpDecorate %out_var_TEXCOORD8 Location 4 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 0 + OpDecorate %MobileBasePass DescriptorSet 0 + OpDecorate %MobileBasePass Binding 1 + OpDecorate %Primitive DescriptorSet 0 + OpDecorate %Primitive Binding 2 + OpDecorate %LandscapeParameters DescriptorSet 0 + OpDecorate %LandscapeParameters Binding 3 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 4 + OpDecorate %_arr_v4float_uint_2_0 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpDecorate %_arr_mat4v4float_uint_2 ArrayStride 64 + OpMemberDecorate %type_MobileBasePass 0 Offset 0 + OpMemberDecorate %type_MobileBasePass 1 Offset 16 + OpMemberDecorate %type_MobileBasePass 2 Offset 32 + OpMemberDecorate %type_MobileBasePass 3 Offset 48 + OpMemberDecorate %type_MobileBasePass 4 Offset 64 + OpMemberDecorate %type_MobileBasePass 5 Offset 80 + OpMemberDecorate %type_MobileBasePass 6 Offset 96 + OpMemberDecorate %type_MobileBasePass 7 Offset 104 + OpMemberDecorate %type_MobileBasePass 8 Offset 108 + OpMemberDecorate %type_MobileBasePass 9 Offset 112 + OpMemberDecorate %type_MobileBasePass 10 Offset 124 + OpMemberDecorate %type_MobileBasePass 11 Offset 128 + OpMemberDecorate %type_MobileBasePass 12 Offset 132 + OpMemberDecorate %type_MobileBasePass 13 Offset 136 + OpMemberDecorate %type_MobileBasePass 14 Offset 140 + OpMemberDecorate %type_MobileBasePass 15 Offset 144 + OpMemberDecorate %type_MobileBasePass 16 Offset 148 + OpMemberDecorate %type_MobileBasePass 17 Offset 152 + OpMemberDecorate %type_MobileBasePass 18 Offset 156 + OpMemberDecorate %type_MobileBasePass 19 Offset 160 + OpMemberDecorate %type_MobileBasePass 20 Offset 176 + OpMemberDecorate %type_MobileBasePass 21 Offset 192 + OpMemberDecorate %type_MobileBasePass 22 Offset 208 + OpMemberDecorate %type_MobileBasePass 23 Offset 224 + OpMemberDecorate %type_MobileBasePass 23 MatrixStride 16 + OpMemberDecorate %type_MobileBasePass 23 ColMajor + OpMemberDecorate %type_MobileBasePass 24 Offset 272 + OpMemberDecorate %type_MobileBasePass 25 Offset 284 + OpMemberDecorate %type_MobileBasePass 26 Offset 288 + OpMemberDecorate %type_MobileBasePass 27 Offset 296 + OpMemberDecorate %type_MobileBasePass 28 Offset 300 + OpMemberDecorate %type_MobileBasePass 29 Offset 304 + OpMemberDecorate %type_MobileBasePass 29 MatrixStride 16 + OpMemberDecorate %type_MobileBasePass 29 ColMajor + OpMemberDecorate %type_MobileBasePass 30 Offset 432 + OpMemberDecorate %type_MobileBasePass 31 Offset 464 + OpMemberDecorate %type_MobileBasePass 32 Offset 472 + OpDecorate %type_MobileBasePass Block + OpMemberDecorate %type_Primitive 0 Offset 0 + OpMemberDecorate %type_Primitive 0 MatrixStride 16 + OpMemberDecorate %type_Primitive 0 ColMajor + OpMemberDecorate %type_Primitive 1 Offset 64 + OpMemberDecorate %type_Primitive 2 Offset 80 + OpMemberDecorate %type_Primitive 3 Offset 96 + OpMemberDecorate %type_Primitive 3 MatrixStride 16 + OpMemberDecorate %type_Primitive 3 ColMajor + OpMemberDecorate %type_Primitive 4 Offset 160 + OpMemberDecorate %type_Primitive 4 MatrixStride 16 + OpMemberDecorate %type_Primitive 4 ColMajor + OpMemberDecorate %type_Primitive 5 Offset 224 + OpMemberDecorate %type_Primitive 5 MatrixStride 16 + OpMemberDecorate %type_Primitive 5 ColMajor + OpMemberDecorate %type_Primitive 6 Offset 288 + OpMemberDecorate %type_Primitive 7 Offset 300 + OpMemberDecorate %type_Primitive 8 Offset 304 + OpMemberDecorate %type_Primitive 9 Offset 316 + OpMemberDecorate %type_Primitive 10 Offset 320 + OpMemberDecorate %type_Primitive 11 Offset 324 + OpMemberDecorate %type_Primitive 12 Offset 328 + OpMemberDecorate %type_Primitive 13 Offset 332 + OpMemberDecorate %type_Primitive 14 Offset 336 + OpMemberDecorate %type_Primitive 15 Offset 352 + OpMemberDecorate %type_Primitive 16 Offset 368 + OpMemberDecorate %type_Primitive 17 Offset 380 + OpMemberDecorate %type_Primitive 18 Offset 384 + OpMemberDecorate %type_Primitive 19 Offset 396 + OpMemberDecorate %type_Primitive 20 Offset 400 + OpMemberDecorate %type_Primitive 21 Offset 404 + OpDecorate %type_Primitive Block + OpMemberDecorate %type_LandscapeParameters 0 Offset 0 + OpMemberDecorate %type_LandscapeParameters 1 Offset 16 + OpMemberDecorate %type_LandscapeParameters 2 Offset 32 + OpMemberDecorate %type_LandscapeParameters 3 Offset 48 + OpMemberDecorate %type_LandscapeParameters 4 Offset 64 + OpMemberDecorate %type_LandscapeParameters 5 Offset 80 + OpMemberDecorate %type_LandscapeParameters 6 Offset 96 + OpMemberDecorate %type_LandscapeParameters 6 MatrixStride 16 + OpMemberDecorate %type_LandscapeParameters 6 ColMajor + OpDecorate %type_LandscapeParameters Block + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 2 Offset 32 + OpMemberDecorate %type__Globals 3 Offset 48 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 +%float_0_00999999978 = OpConstant %float 0.00999999978 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_0 = OpConstant %float 0 + %40 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %float_255 = OpConstant %float 255 + %44 = OpConstantComposite %v4float %float_255 %float_255 %float_255 %float_255 + %float_0_5 = OpConstant %float 0.5 + %46 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %float_2 = OpConstant %float 2 + %48 = OpConstantComposite %v2float %float_2 %float_2 + %float_1 = OpConstant %float 1 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 + %float_3 = OpConstant %float 3 + %float_0_25 = OpConstant %float 0.25 + %uint_3 = OpConstant %uint 3 + %float_4 = OpConstant %float 4 +%float_0_125 = OpConstant %float 0.125 + %float_5 = OpConstant %float 5 +%float_0_0625 = OpConstant %float 0.0625 +%float_0_03125 = OpConstant %float 0.03125 + %60 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int_5 = OpConstant %int 5 + %int_4 = OpConstant %int 4 + %63 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %int_25 = OpConstant %int 25 + %int_27 = OpConstant %int 27 + %int_31 = OpConstant %int 31 + %67 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 +%float_32768 = OpConstant %float 32768 +%_arr_v4float_uint_2_0 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2_0 %_arr_v4float_uint_2_0 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%mat3v4float = OpTypeMatrix %v4float 3 +%_arr_mat4v4float_uint_2 = OpTypeArray %mat4v4float %uint_2 +%type_MobileBasePass = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %v4float %v2float %float %float %v3float %float %float %float %float %float %float %float %float %float %v4float %v4float %v4float %v4float %mat3v4float %v3float %float %v2float %float %float %_arr_mat4v4float_uint_2 %_arr_v4float_uint_2_0 %v2float %uint +%_ptr_Uniform_type_MobileBasePass = OpTypePointer Uniform %type_MobileBasePass +%type_Primitive = OpTypeStruct %mat4v4float %v4float %v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %float %float %float %float %v4float %v4float %v3float %float %v3float %uint %uint %int +%_ptr_Uniform_type_Primitive = OpTypePointer Uniform %type_Primitive +%type_LandscapeParameters = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %v4float %mat4v4float +%_ptr_Uniform_type_LandscapeParameters = OpTypePointer Uniform %type_LandscapeParameters +%type__Globals = OpTypeStruct %v4float %v4float %v4float %_arr_v4float_uint_4 +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%_ptr_Input_v4float = OpTypePointer Input %v4float +%_ptr_Input__arr_v4float_uint_2 = OpTypePointer Input %_arr_v4float_uint_2 +%_ptr_Output_v2float = OpTypePointer Output %v2float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %80 = OpTypeFunction %void +%_arr_v4float_uint_1 = OpTypeArray %v4float %uint_1 +%_ptr_Function__arr_v4float_uint_1 = OpTypePointer Function %_arr_v4float_uint_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %bool = OpTypeBool +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float + %v3bool = OpTypeVector %bool 3 +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float + %View = OpVariable %_ptr_Uniform_type_View Uniform +%MobileBasePass = OpVariable %_ptr_Uniform_type_MobileBasePass Uniform + %Primitive = OpVariable %_ptr_Uniform_type_Primitive Uniform +%LandscapeParameters = OpVariable %_ptr_Uniform_type_LandscapeParameters Uniform + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%in_var_ATTRIBUTE0 = OpVariable %_ptr_Input_v4float Input +%in_var_ATTRIBUTE1 = OpVariable %_ptr_Input__arr_v4float_uint_2 Input +%out_var_TEXCOORD0 = OpVariable %_ptr_Output_v2float Output +%out_var_TEXCOORD1 = OpVariable %_ptr_Output_v2float Output +%out_var_TEXCOORD2 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD3 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD8 = OpVariable %_ptr_Output_v4float Output +%gl_Position = OpVariable %_ptr_Output_v4float Output +%float_0_0078125 = OpConstant %float 0.0078125 + %float_n127 = OpConstant %float -127 + %92 = OpConstantNull %v4float +%float_0_00392156886 = OpConstant %float 0.00392156886 + %94 = OpConstantComposite %v2float %float_0_00392156886 %float_0_00392156886 +%float_65280 = OpConstant %float 65280 + %Main = OpFunction %void None %80 + %96 = OpLabel + %97 = OpVariable %_ptr_Function__arr_v4float_uint_1 Function + %98 = OpLoad %v4float %in_var_ATTRIBUTE0 + %99 = OpLoad %_arr_v4float_uint_2 %in_var_ATTRIBUTE1 + %100 = OpAccessChain %_ptr_Uniform_mat4v4float %View %int_0 + %101 = OpLoad %mat4v4float %100 + %102 = OpAccessChain %_ptr_Uniform_v3float %View %int_27 + %103 = OpLoad %v3float %102 + %104 = OpAccessChain %_ptr_Uniform_v3float %View %int_31 + %105 = OpLoad %v3float %104 + OpBranch %106 + %106 = OpLabel + %107 = OpPhi %int %int_0 %96 %108 %109 + %110 = OpSLessThan %bool %107 %int_1 + OpLoopMerge %111 %109 Unroll + OpBranchConditional %110 %109 %111 + %109 = OpLabel + %112 = OpAccessChain %_ptr_Function_v4float %97 %107 + OpStore %112 %40 + %108 = OpIAdd %int %107 %int_1 + OpBranch %106 + %111 = OpLabel + %113 = OpCompositeExtract %v4float %99 0 + %114 = OpCompositeExtract %v4float %99 1 + %115 = OpFMul %v4float %98 %44 + %116 = OpVectorShuffle %v2float %115 %115 2 3 + %117 = OpFMul %v2float %116 %46 + %118 = OpExtInst %v2float %1 Fract %117 + %119 = OpFMul %v2float %118 %48 + %120 = OpFSub %v2float %116 %119 + %121 = OpFMul %v2float %120 %94 + %122 = OpVectorShuffle %v2float %115 %92 0 1 + %123 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 %int_3 + %124 = OpLoad %float %123 + %125 = OpCompositeConstruct %v2float %124 %124 + %126 = OpFMul %v2float %122 %125 + %127 = OpCompositeExtract %float %126 1 + %128 = OpCompositeExtract %float %126 0 + %129 = OpFSub %float %float_1 %128 + %130 = OpFSub %float %float_1 %127 + %131 = OpCompositeConstruct %v4float %127 %128 %129 %130 + %132 = OpFMul %v4float %131 %67 + %133 = OpCompositeExtract %float %119 1 + %134 = OpFOrdGreaterThan %bool %133 %float_0_5 + OpSelectionMerge %135 None + OpBranchConditional %134 %136 %137 + %136 = OpLabel + %138 = OpCompositeExtract %float %119 0 + %139 = OpFOrdGreaterThan %bool %138 %float_0_5 + OpSelectionMerge %140 None + OpBranchConditional %139 %141 %142 + %141 = OpLabel + %143 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 %int_3 + %144 = OpLoad %float %143 + %145 = OpCompositeConstruct %v4float %144 %144 %144 %144 + %146 = OpFMul %v4float %132 %145 + %147 = OpFSub %v4float %60 %132 + %148 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_3 %int_3 + %149 = OpLoad %v4float %148 + %150 = OpFMul %v4float %147 %149 + %151 = OpFAdd %v4float %146 %150 + OpBranch %140 + %142 = OpLabel + %152 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 %int_2 + %153 = OpLoad %float %152 + %154 = OpCompositeConstruct %v4float %153 %153 %153 %153 + %155 = OpFMul %v4float %132 %154 + %156 = OpFSub %v4float %60 %132 + %157 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_3 %int_2 + %158 = OpLoad %v4float %157 + %159 = OpFMul %v4float %156 %158 + %160 = OpFAdd %v4float %155 %159 + OpBranch %140 + %140 = OpLabel + %161 = OpPhi %v4float %151 %141 %160 %142 + OpBranch %135 + %137 = OpLabel + %162 = OpCompositeExtract %float %119 0 + %163 = OpFOrdGreaterThan %bool %162 %float_0_5 + OpSelectionMerge %164 None + OpBranchConditional %163 %165 %166 + %165 = OpLabel + %167 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 %int_1 + %168 = OpLoad %float %167 + %169 = OpCompositeConstruct %v4float %168 %168 %168 %168 + %170 = OpFMul %v4float %132 %169 + %171 = OpFSub %v4float %60 %132 + %172 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_3 %int_1 + %173 = OpLoad %v4float %172 + %174 = OpFMul %v4float %171 %173 + %175 = OpFAdd %v4float %170 %174 + OpBranch %164 + %166 = OpLabel + %176 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 %int_0 + %177 = OpLoad %float %176 + %178 = OpCompositeConstruct %v4float %177 %177 %177 %177 + %179 = OpFMul %v4float %132 %178 + %180 = OpFSub %v4float %60 %132 + %181 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_3 %int_0 + %182 = OpLoad %v4float %181 + %183 = OpFMul %v4float %180 %182 + %184 = OpFAdd %v4float %179 %183 + OpBranch %164 + %164 = OpLabel + %185 = OpPhi %v4float %175 %165 %184 %166 + OpBranch %135 + %135 = OpLabel + %186 = OpPhi %v4float %161 %140 %185 %164 + %187 = OpFAdd %float %128 %127 + %188 = OpFOrdGreaterThan %bool %187 %float_1 + OpSelectionMerge %189 None + OpBranchConditional %188 %190 %191 + %190 = OpLabel + %192 = OpFOrdLessThan %bool %128 %127 + OpSelectionMerge %193 None + OpBranchConditional %192 %194 %195 + %194 = OpLabel + %196 = OpCompositeExtract %float %186 3 + OpBranch %193 + %195 = OpLabel + %197 = OpCompositeExtract %float %186 2 + OpBranch %193 + %193 = OpLabel + %198 = OpPhi %float %196 %194 %197 %195 + OpBranch %189 + %191 = OpLabel + %199 = OpFOrdLessThan %bool %128 %127 + OpSelectionMerge %200 None + OpBranchConditional %199 %201 %202 + %201 = OpLabel + %203 = OpCompositeExtract %float %186 1 + OpBranch %200 + %202 = OpLabel + %204 = OpCompositeExtract %float %186 0 + OpBranch %200 + %200 = OpLabel + %205 = OpPhi %float %203 %201 %204 %202 + OpBranch %189 + %189 = OpLabel + %206 = OpPhi %float %198 %193 %205 %200 + %207 = OpExtInst %float %1 Floor %206 + %208 = OpFSub %float %206 %207 + %209 = OpFOrdLessThan %bool %207 %float_1 + %210 = OpCompositeExtract %float %114 0 + %211 = OpCompositeExtract %float %114 1 + %212 = OpCompositeConstruct %v3float %float_1 %210 %211 + %213 = OpFOrdLessThan %bool %207 %float_2 + %214 = OpCompositeExtract %float %114 2 + %215 = OpCompositeConstruct %v3float %float_0_5 %211 %214 + %216 = OpFOrdLessThan %bool %207 %float_3 + %217 = OpCompositeExtract %float %114 3 + %218 = OpCompositeConstruct %v3float %float_0_25 %214 %217 + %219 = OpFOrdLessThan %bool %207 %float_4 + %220 = OpCompositeExtract %float %121 0 + %221 = OpCompositeConstruct %v3float %float_0_125 %217 %220 + %222 = OpFOrdLessThan %bool %207 %float_5 + %223 = OpCompositeExtract %float %121 1 + %224 = OpCompositeConstruct %v3float %float_0_0625 %220 %223 + %225 = OpCompositeConstruct %v3float %float_0_03125 %223 %223 + %226 = OpCompositeConstruct %v3bool %222 %222 %222 + %227 = OpSelect %v3float %226 %224 %225 + %228 = OpCompositeConstruct %v3bool %219 %219 %219 + %229 = OpSelect %v3float %228 %221 %227 + %230 = OpCompositeConstruct %v3bool %216 %216 %216 + %231 = OpSelect %v3float %230 %218 %229 + %232 = OpCompositeConstruct %v3bool %213 %213 %213 + %233 = OpSelect %v3float %232 %215 %231 + %234 = OpCompositeConstruct %v3bool %209 %209 %209 + %235 = OpSelect %v3float %234 %212 %233 + %236 = OpCompositeExtract %float %235 0 + %237 = OpCompositeExtract %float %235 1 + %238 = OpCompositeExtract %float %235 2 + %239 = OpCompositeExtract %float %113 0 + %240 = OpFMul %float %239 %float_65280 + %241 = OpCompositeExtract %float %113 1 + %242 = OpFMul %float %241 %float_255 + %243 = OpFAdd %float %240 %242 + %244 = OpFSub %float %243 %float_32768 + %245 = OpFMul %float %244 %float_0_0078125 + %246 = OpCompositeExtract %float %113 2 + %247 = OpFMul %float %246 %float_65280 + %248 = OpCompositeExtract %float %113 3 + %249 = OpFMul %float %248 %float_255 + %250 = OpFAdd %float %247 %249 + %251 = OpFSub %float %250 %float_32768 + %252 = OpFMul %float %251 %float_0_0078125 + %253 = OpExtInst %float %1 FMix %245 %252 %237 + %254 = OpExtInst %float %1 FMix %245 %252 %238 + %255 = OpCompositeConstruct %v2float %236 %236 + %256 = OpFMul %v2float %122 %255 + %257 = OpExtInst %v2float %1 Floor %256 + %258 = OpAccessChain %_ptr_Uniform_v4float %LandscapeParameters %int_3 + %259 = OpAccessChain %_ptr_Uniform_float %LandscapeParameters %int_3 %int_0 + %260 = OpLoad %float %259 + %261 = OpFMul %float %260 %236 + %262 = OpFSub %float %261 %float_1 + %263 = OpFMul %float %260 %float_0_5 + %264 = OpFMul %float %263 %236 + %265 = OpExtInst %float %1 FMax %264 %float_2 + %266 = OpFSub %float %265 %float_1 + %267 = OpCompositeConstruct %v2float %262 %266 + %268 = OpAccessChain %_ptr_Uniform_float %LandscapeParameters %int_3 %int_1 + %269 = OpLoad %float %268 + %270 = OpCompositeConstruct %v2float %269 %269 + %271 = OpFMul %v2float %267 %270 + %272 = OpCompositeExtract %float %271 0 + %273 = OpCompositeConstruct %v2float %272 %272 + %274 = OpFDiv %v2float %257 %273 + %275 = OpFMul %v2float %257 %46 + %276 = OpExtInst %v2float %1 Floor %275 + %277 = OpCompositeExtract %float %271 1 + %278 = OpCompositeConstruct %v2float %277 %277 + %279 = OpFDiv %v2float %276 %278 + %280 = OpCompositeExtract %float %274 0 + %281 = OpCompositeExtract %float %274 1 + %282 = OpCompositeConstruct %v3float %280 %281 %253 + %283 = OpCompositeExtract %float %279 0 + %284 = OpCompositeExtract %float %279 1 + %285 = OpCompositeConstruct %v3float %283 %284 %254 + %286 = OpCompositeConstruct %v3float %208 %208 %208 + %287 = OpExtInst %v3float %1 FMix %282 %285 %286 + %288 = OpVectorShuffle %v2float %119 %92 0 1 + %289 = OpAccessChain %_ptr_Uniform_v4float %LandscapeParameters %int_4 + %290 = OpLoad %v4float %289 + %291 = OpVectorShuffle %v2float %290 %290 3 3 + %292 = OpFMul %v2float %288 %291 + %293 = OpCompositeExtract %float %292 0 + %294 = OpCompositeExtract %float %292 1 + %295 = OpCompositeConstruct %v3float %293 %294 %float_0 + %296 = OpFAdd %v3float %287 %295 + %297 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_0 + %298 = OpLoad %v4float %297 + %299 = OpVectorShuffle %v3float %298 %298 0 1 2 + %300 = OpVectorShuffle %v3float %296 %296 0 0 0 + %301 = OpFMul %v3float %299 %300 + %302 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_1 + %303 = OpLoad %v4float %302 + %304 = OpVectorShuffle %v3float %303 %303 0 1 2 + %305 = OpVectorShuffle %v3float %296 %296 1 1 1 + %306 = OpFMul %v3float %304 %305 + %307 = OpFAdd %v3float %301 %306 + %308 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_2 + %309 = OpLoad %v4float %308 + %310 = OpVectorShuffle %v3float %309 %309 0 1 2 + %311 = OpVectorShuffle %v3float %296 %296 2 2 2 + %312 = OpFMul %v3float %310 %311 + %313 = OpFAdd %v3float %307 %312 + %314 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_3 + %315 = OpLoad %v4float %314 + %316 = OpVectorShuffle %v3float %315 %315 0 1 2 + %317 = OpFAdd %v3float %316 %105 + %318 = OpFAdd %v3float %313 %317 + %319 = OpCompositeExtract %float %318 0 + %320 = OpCompositeExtract %float %318 1 + %321 = OpCompositeExtract %float %318 2 + %322 = OpCompositeConstruct %v4float %319 %320 %321 %float_1 + %323 = OpVectorShuffle %v2float %287 %287 0 1 + %324 = OpLoad %v4float %258 + %325 = OpVectorShuffle %v2float %324 %324 2 3 + %326 = OpFAdd %v2float %323 %325 + %327 = OpFAdd %v2float %326 %292 + %328 = OpAccessChain %_ptr_Uniform_v4float %LandscapeParameters %int_1 + %329 = OpLoad %v4float %328 + %330 = OpVectorShuffle %v2float %329 %329 0 1 + %331 = OpFMul %v2float %323 %330 + %332 = OpVectorShuffle %v2float %329 %329 2 3 + %333 = OpFAdd %v2float %331 %332 + %334 = OpVectorShuffle %v2float %290 %290 2 2 + %335 = OpFMul %v2float %288 %334 + %336 = OpFAdd %v2float %333 %335 + %337 = OpVectorShuffle %v2float %327 %92 0 1 + %338 = OpVectorShuffle %v4float %322 %322 4 5 6 3 + %339 = OpMatrixTimesVector %v4float %101 %338 + %340 = OpVectorShuffle %v3float %322 %92 0 1 2 + %341 = OpFSub %v3float %340 %103 + %342 = OpAccessChain %_ptr_Uniform_v4float %MobileBasePass %int_2 + %343 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_2 %int_3 + %344 = OpLoad %float %343 + %345 = OpDot %float %341 %341 + %346 = OpExtInst %float %1 InverseSqrt %345 + %347 = OpFMul %float %345 %346 + %348 = OpCompositeConstruct %v3float %346 %346 %346 + %349 = OpFMul %v3float %341 %348 + %350 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_0 %int_0 + %351 = OpLoad %float %350 + %352 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_1 %int_0 + %353 = OpLoad %float %352 + %354 = OpCompositeExtract %float %341 2 + %355 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_0 %int_3 + %356 = OpLoad %float %355 + %357 = OpExtInst %float %1 FMax %float_0 %356 + %358 = OpFOrdGreaterThan %bool %357 %float_0 + OpSelectionMerge %359 None + OpBranchConditional %358 %360 %359 + %360 = OpLabel + %361 = OpFMul %float %357 %346 + %362 = OpFMul %float %361 %354 + %363 = OpAccessChain %_ptr_Uniform_float %View %int_25 %int_2 + %364 = OpLoad %float %363 + %365 = OpFAdd %float %364 %362 + %366 = OpFSub %float %354 %362 + %367 = OpFSub %float %float_1 %361 + %368 = OpFMul %float %367 %347 + %369 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_0 %int_1 + %370 = OpLoad %float %369 + %371 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_3 %int_1 + %372 = OpLoad %float %371 + %373 = OpFSub %float %365 %372 + %374 = OpFMul %float %370 %373 + %375 = OpExtInst %float %1 FMax %float_n127 %374 + %376 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_3 %int_0 + %377 = OpLoad %float %376 + %378 = OpFNegate %float %375 + %379 = OpExtInst %float %1 Exp2 %378 + %380 = OpFMul %float %377 %379 + %381 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_1 %int_1 + %382 = OpLoad %float %381 + %383 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_1 %int_3 + %384 = OpLoad %float %383 + %385 = OpFSub %float %365 %384 + %386 = OpFMul %float %382 %385 + %387 = OpExtInst %float %1 FMax %float_n127 %386 + %388 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_1 %int_2 + %389 = OpLoad %float %388 + %390 = OpFNegate %float %387 + %391 = OpExtInst %float %1 Exp2 %390 + %392 = OpFMul %float %389 %391 + OpBranch %359 + %359 = OpLabel + %393 = OpPhi %float %347 %189 %368 %360 + %394 = OpPhi %float %353 %189 %392 %360 + %395 = OpPhi %float %351 %189 %380 %360 + %396 = OpPhi %float %354 %189 %366 %360 + %397 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_0 %int_1 + %398 = OpLoad %float %397 + %399 = OpFMul %float %398 %396 + %400 = OpExtInst %float %1 FMax %float_n127 %399 + %401 = OpFNegate %float %400 + %402 = OpExtInst %float %1 Exp2 %401 + %403 = OpFSub %float %float_1 %402 + %404 = OpFDiv %float %403 %400 + %405 = OpExtInst %float %1 Log %float_2 + %406 = OpFMul %float %405 %405 + %407 = OpFMul %float %float_0_5 %406 + %408 = OpFMul %float %407 %400 + %409 = OpFSub %float %405 %408 + %410 = OpExtInst %float %1 FAbs %400 + %411 = OpFOrdGreaterThan %bool %410 %float_0_00999999978 + %412 = OpSelect %float %411 %404 %409 + %413 = OpFMul %float %395 %412 + %414 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_1 %int_1 + %415 = OpLoad %float %414 + %416 = OpFMul %float %415 %396 + %417 = OpExtInst %float %1 FMax %float_n127 %416 + %418 = OpFNegate %float %417 + %419 = OpExtInst %float %1 Exp2 %418 + %420 = OpFSub %float %float_1 %419 + %421 = OpFDiv %float %420 %417 + %422 = OpFMul %float %407 %417 + %423 = OpFSub %float %405 %422 + %424 = OpExtInst %float %1 FAbs %417 + %425 = OpFOrdGreaterThan %bool %424 %float_0_00999999978 + %426 = OpSelect %float %425 %421 %423 + %427 = OpFMul %float %394 %426 + %428 = OpFAdd %float %413 %427 + %429 = OpFMul %float %428 %393 + %430 = OpLoad %v4float %342 + %431 = OpVectorShuffle %v3float %430 %430 0 1 2 + %432 = OpAccessChain %_ptr_Uniform_v4float %MobileBasePass %int_4 + %433 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_4 %int_3 + %434 = OpLoad %float %433 + %435 = OpFOrdGreaterThanEqual %bool %434 %float_0 + OpSelectionMerge %436 DontFlatten + OpBranchConditional %435 %437 %436 + %437 = OpLabel + %438 = OpAccessChain %_ptr_Uniform_v4float %MobileBasePass %int_5 + %439 = OpLoad %v4float %438 + %440 = OpVectorShuffle %v3float %439 %439 0 1 2 + %441 = OpLoad %v4float %432 + %442 = OpVectorShuffle %v3float %441 %441 0 1 2 + %443 = OpDot %float %349 %442 + %444 = OpExtInst %float %1 FClamp %443 %float_0 %float_1 + %445 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_5 %int_3 + %446 = OpLoad %float %445 + %447 = OpExtInst %float %1 Pow %444 %446 + %448 = OpCompositeConstruct %v3float %447 %447 %447 + %449 = OpFMul %v3float %440 %448 + %450 = OpFSub %float %393 %434 + %451 = OpExtInst %float %1 FMax %450 %float_0 + %452 = OpFMul %float %428 %451 + %453 = OpFNegate %float %452 + %454 = OpExtInst %float %1 Exp2 %453 + %455 = OpExtInst %float %1 FClamp %454 %float_0 %float_1 + %456 = OpFSub %float %float_1 %455 + %457 = OpCompositeConstruct %v3float %456 %456 %456 + %458 = OpFMul %v3float %449 %457 + OpBranch %436 + %436 = OpLabel + %459 = OpPhi %v3float %63 %359 %458 %437 + %460 = OpFNegate %float %429 + %461 = OpExtInst %float %1 Exp2 %460 + %462 = OpExtInst %float %1 FClamp %461 %float_0 %float_1 + %463 = OpExtInst %float %1 FMax %462 %344 + %464 = OpAccessChain %_ptr_Uniform_float %MobileBasePass %int_3 %int_3 + %465 = OpLoad %float %464 + %466 = OpFOrdGreaterThan %bool %465 %float_0 + %467 = OpFOrdGreaterThan %bool %347 %465 + %468 = OpLogicalAnd %bool %466 %467 + %469 = OpCompositeConstruct %v3bool %468 %468 %468 + %470 = OpSelect %v3float %469 %63 %459 + %471 = OpSelect %float %468 %float_1 %463 + %472 = OpFSub %float %float_1 %471 + %473 = OpCompositeConstruct %v3float %472 %472 %472 + %474 = OpFMul %v3float %431 %473 + %475 = OpFAdd %v3float %474 %470 + %476 = OpCompositeExtract %float %475 0 + %477 = OpCompositeExtract %float %475 1 + %478 = OpCompositeExtract %float %475 2 + %479 = OpCompositeConstruct %v4float %476 %477 %478 %471 + %480 = OpAccessChain %_ptr_Function_v4float %97 %int_0 + OpStore %480 %479 + %481 = OpCompositeExtract %float %339 3 + %482 = OpCompositeInsert %v4float %481 %338 3 + %483 = OpLoad %_arr_v4float_uint_1 %97 + %484 = OpCompositeExtract %v4float %483 0 + %485 = OpVectorShuffle %v4float %92 %484 0 1 4 5 + %486 = OpVectorShuffle %v4float %92 %484 0 1 6 7 + OpStore %out_var_TEXCOORD0 %337 + OpStore %out_var_TEXCOORD1 %336 + OpStore %out_var_TEXCOORD2 %485 + OpStore %out_var_TEXCOORD3 %486 + OpStore %out_var_TEXCOORD8 %482 + OpStore %gl_Position %339 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert b/3rdparty/spirv-cross/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert new file mode 100644 index 000000000..693f16c00 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/vert/loop-accesschain-writethrough.asm.vert @@ -0,0 +1,259 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 181 +; Schema: 0 + OpCapability Shader + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %ScatterMainVS "main" %gl_VertexIndex %gl_InstanceIndex %out_var_TEXCOORD0 %out_var_TEXCOORD1 %out_var_TEXCOORD2 %out_var_TEXCOORD3 %out_var_TEXCOORD4 %out_var_TEXCOORD5 %out_var_TEXCOORD6 %gl_Position + OpSource HLSL 600 + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "ViewportSize" + OpMemberName %type__Globals 1 "ScatteringScaling" + OpMemberName %type__Globals 2 "CocRadiusToCircumscribedRadius" + OpName %_Globals "$Globals" + OpName %type_StructuredBuffer_v4float "type.StructuredBuffer.v4float" + OpName %ScatterDrawList "ScatterDrawList" + OpName %out_var_TEXCOORD0 "out.var.TEXCOORD0" + OpName %out_var_TEXCOORD1 "out.var.TEXCOORD1" + OpName %out_var_TEXCOORD2 "out.var.TEXCOORD2" + OpName %out_var_TEXCOORD3 "out.var.TEXCOORD3" + OpName %out_var_TEXCOORD4 "out.var.TEXCOORD4" + OpName %out_var_TEXCOORD5 "out.var.TEXCOORD5" + OpName %out_var_TEXCOORD6 "out.var.TEXCOORD6" + OpName %ScatterMainVS "ScatterMainVS" + OpDecorate %gl_VertexIndex BuiltIn VertexIndex + OpDecorateString %gl_VertexIndex UserSemantic "SV_VertexID" + OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex + OpDecorateString %gl_InstanceIndex UserSemantic "SV_InstanceID" + OpDecorateString %out_var_TEXCOORD0 UserSemantic "TEXCOORD0" + OpDecorateString %out_var_TEXCOORD1 UserSemantic "TEXCOORD1" + OpDecorateString %out_var_TEXCOORD2 UserSemantic "TEXCOORD2" + OpDecorateString %out_var_TEXCOORD3 UserSemantic "TEXCOORD3" + OpDecorateString %out_var_TEXCOORD4 UserSemantic "TEXCOORD4" + OpDecorateString %out_var_TEXCOORD5 UserSemantic "TEXCOORD5" + OpDecorateString %out_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorate %out_var_TEXCOORD0 Location 0 + OpDecorate %out_var_TEXCOORD1 Location 1 + OpDecorate %out_var_TEXCOORD2 Location 2 + OpDecorate %out_var_TEXCOORD3 Location 3 + OpDecorate %out_var_TEXCOORD4 Location 4 + OpDecorate %out_var_TEXCOORD5 Location 5 + OpDecorate %out_var_TEXCOORD6 Location 6 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 1 + OpDecorate %ScatterDrawList DescriptorSet 0 + OpDecorate %ScatterDrawList Binding 0 + OpMemberDecorate %type__Globals 0 Offset 0 + OpMemberDecorate %type__Globals 1 Offset 16 + OpMemberDecorate %type__Globals 2 Offset 20 + OpDecorate %type__Globals Block + OpDecorate %_runtimearr_v4float ArrayStride 16 + OpMemberDecorate %type_StructuredBuffer_v4float 0 Offset 0 + OpMemberDecorate %type_StructuredBuffer_v4float 0 NonWritable + OpDecorate %type_StructuredBuffer_v4float BufferBlock + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_4 = OpConstant %uint 4 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %float_0_5 = OpConstant %float 0.5 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 + %uint_16 = OpConstant %uint 16 + %float_0 = OpConstant %float 0 + %uint_0 = OpConstant %uint 0 + %uint_5 = OpConstant %uint 5 + %uint_1 = OpConstant %uint 1 + %int_3 = OpConstant %int 3 + %float_n0_5 = OpConstant %float -0.5 + %int_2 = OpConstant %int 2 + %float_2 = OpConstant %float 2 + %39 = OpConstantComposite %v2float %float_2 %float_2 + %40 = OpConstantComposite %v2float %float_1 %float_1 + %41 = OpConstantComposite %v2float %float_0_5 %float_0_5 +%type__Globals = OpTypeStruct %v4float %float %float +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%_runtimearr_v4float = OpTypeRuntimeArray %v4float +%type_StructuredBuffer_v4float = OpTypeStruct %_runtimearr_v4float +%_ptr_Uniform_type_StructuredBuffer_v4float = OpTypePointer Uniform %type_StructuredBuffer_v4float +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output_v2float = OpTypePointer Output %v2float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %48 = OpTypeFunction %void +%_ptr_Function_v2float = OpTypePointer Function %v2float +%_ptr_Function_v4float = OpTypePointer Function %v4float +%_ptr_Function__arr_v4float_uint_4 = OpTypePointer Function %_arr_v4float_uint_4 +%_arr_float_uint_4 = OpTypeArray %float %uint_4 +%_ptr_Function__arr_float_uint_4 = OpTypePointer Function %_arr_float_uint_4 +%_arr_v2float_uint_4 = OpTypeArray %v2float %uint_4 +%_ptr_Function__arr_v2float_uint_4 = OpTypePointer Function %_arr_v2float_uint_4 +%_ptr_Function_float = OpTypePointer Function %float + %bool = OpTypeBool +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%_ptr_Uniform_float = OpTypePointer Uniform %float + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%ScatterDrawList = OpVariable %_ptr_Uniform_type_StructuredBuffer_v4float Uniform +%gl_VertexIndex = OpVariable %_ptr_Input_uint Input +%gl_InstanceIndex = OpVariable %_ptr_Input_uint Input +%out_var_TEXCOORD0 = OpVariable %_ptr_Output_v2float Output +%out_var_TEXCOORD1 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD2 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD3 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD4 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD5 = OpVariable %_ptr_Output_v4float Output +%out_var_TEXCOORD6 = OpVariable %_ptr_Output_v4float Output +%gl_Position = OpVariable %_ptr_Output_v4float Output +%ScatterMainVS = OpFunction %void None %48 + %60 = OpLabel + %61 = OpVariable %_ptr_Function__arr_v4float_uint_4 Function + %62 = OpVariable %_ptr_Function__arr_float_uint_4 Function + %63 = OpVariable %_ptr_Function__arr_v2float_uint_4 Function + %64 = OpLoad %uint %gl_VertexIndex + %65 = OpLoad %uint %gl_InstanceIndex + %66 = OpUDiv %uint %64 %uint_4 + %67 = OpIMul %uint %66 %uint_4 + %68 = OpISub %uint %64 %67 + %69 = OpIMul %uint %uint_16 %65 + %70 = OpIAdd %uint %69 %66 + OpBranch %71 + %71 = OpLabel + %72 = OpPhi %float %float_0 %60 %73 %74 + %75 = OpPhi %uint %uint_0 %60 %76 %74 + %77 = OpULessThan %bool %75 %uint_4 + OpLoopMerge %78 %74 Unroll + OpBranchConditional %77 %79 %78 + %79 = OpLabel + %80 = OpIMul %uint %uint_5 %70 + %81 = OpIAdd %uint %80 %75 + %82 = OpIAdd %uint %81 %uint_1 + %83 = OpAccessChain %_ptr_Uniform_v4float %ScatterDrawList %int_0 %82 + %84 = OpLoad %v4float %83 + %85 = OpCompositeExtract %float %84 0 + %86 = OpCompositeExtract %float %84 1 + %87 = OpCompositeExtract %float %84 2 + %88 = OpCompositeConstruct %v4float %85 %86 %87 %float_0 + %89 = OpAccessChain %_ptr_Function_v4float %61 %75 + OpStore %89 %88 + %90 = OpCompositeExtract %float %84 3 + %91 = OpAccessChain %_ptr_Function_float %62 %75 + OpStore %91 %90 + %92 = OpIEqual %bool %75 %uint_0 + OpSelectionMerge %74 None + OpBranchConditional %92 %93 %94 + %93 = OpLabel + %95 = OpLoad %float %91 + OpBranch %74 + %94 = OpLabel + %96 = OpLoad %float %91 + %97 = OpExtInst %float %1 FMax %72 %96 + OpBranch %74 + %74 = OpLabel + %73 = OpPhi %float %95 %93 %97 %94 + %98 = OpLoad %float %91 + %99 = OpFDiv %float %float_n0_5 %98 + %100 = OpAccessChain %_ptr_Function_float %63 %75 %int_0 + OpStore %100 %99 + %101 = OpLoad %float %91 + %102 = OpFMul %float %float_0_5 %101 + %103 = OpFAdd %float %102 %float_0_5 + %104 = OpAccessChain %_ptr_Function_float %63 %75 %int_1 + OpStore %104 %103 + %76 = OpIAdd %uint %75 %uint_1 + OpBranch %71 + %78 = OpLabel + %105 = OpAccessChain %_ptr_Function_v4float %61 %int_0 + %106 = OpLoad %v4float %105 + %107 = OpCompositeExtract %float %106 0 + %108 = OpCompositeExtract %float %106 1 + %109 = OpCompositeExtract %float %106 2 + %110 = OpAccessChain %_ptr_Function_float %62 %int_0 + %111 = OpLoad %float %110 + %112 = OpCompositeConstruct %v4float %107 %108 %109 %111 + %113 = OpAccessChain %_ptr_Function_v4float %61 %int_1 + %114 = OpLoad %v4float %113 + %115 = OpCompositeExtract %float %114 0 + %116 = OpCompositeExtract %float %114 1 + %117 = OpCompositeExtract %float %114 2 + %118 = OpAccessChain %_ptr_Function_float %62 %int_1 + %119 = OpLoad %float %118 + %120 = OpCompositeConstruct %v4float %115 %116 %117 %119 + %121 = OpAccessChain %_ptr_Function_v4float %61 %int_2 + %122 = OpLoad %v4float %121 + %123 = OpCompositeExtract %float %122 0 + %124 = OpCompositeExtract %float %122 1 + %125 = OpCompositeExtract %float %122 2 + %126 = OpAccessChain %_ptr_Function_float %62 %int_2 + %127 = OpLoad %float %126 + %128 = OpCompositeConstruct %v4float %123 %124 %125 %127 + %129 = OpAccessChain %_ptr_Function_v4float %61 %int_3 + %130 = OpLoad %v4float %129 + %131 = OpCompositeExtract %float %130 0 + %132 = OpCompositeExtract %float %130 1 + %133 = OpCompositeExtract %float %130 2 + %134 = OpAccessChain %_ptr_Function_float %62 %int_3 + %135 = OpLoad %float %134 + %136 = OpCompositeConstruct %v4float %131 %132 %133 %135 + %137 = OpAccessChain %_ptr_Uniform_float %_Globals %int_1 + %138 = OpLoad %float %137 + %139 = OpCompositeConstruct %v2float %138 %138 + %140 = OpIMul %uint %uint_5 %70 + %141 = OpAccessChain %_ptr_Uniform_v4float %ScatterDrawList %int_0 %140 + %142 = OpLoad %v4float %141 + %143 = OpVectorShuffle %v2float %142 %142 0 1 + %144 = OpFMul %v2float %139 %143 + %145 = OpAccessChain %_ptr_Function_v2float %63 %int_0 + %146 = OpLoad %v2float %145 + %147 = OpAccessChain %_ptr_Function_v2float %63 %int_1 + %148 = OpLoad %v2float %147 + %149 = OpVectorShuffle %v4float %146 %148 0 1 2 3 + %150 = OpAccessChain %_ptr_Function_v2float %63 %int_2 + %151 = OpLoad %v2float %150 + %152 = OpAccessChain %_ptr_Function_v2float %63 %int_3 + %153 = OpLoad %v2float %152 + %154 = OpVectorShuffle %v4float %151 %153 0 1 2 3 + %155 = OpUMod %uint %68 %uint_2 + %156 = OpConvertUToF %float %155 + %157 = OpUDiv %uint %68 %uint_2 + %158 = OpConvertUToF %float %157 + %159 = OpCompositeConstruct %v2float %156 %158 + %160 = OpFMul %v2float %159 %39 + %161 = OpFSub %v2float %160 %40 + %162 = OpAccessChain %_ptr_Uniform_float %_Globals %int_2 + %163 = OpLoad %float %162 + %164 = OpFMul %float %72 %163 + %165 = OpFAdd %float %164 %float_1 + %166 = OpCompositeConstruct %v2float %165 %165 + %167 = OpFMul %v2float %166 %161 + %168 = OpFAdd %v2float %167 %144 + %169 = OpFAdd %v2float %168 %41 + %170 = OpAccessChain %_ptr_Uniform_v4float %_Globals %int_0 + %171 = OpLoad %v4float %170 + %172 = OpVectorShuffle %v2float %171 %171 2 3 + %173 = OpFMul %v2float %169 %172 + %174 = OpCompositeExtract %float %173 0 + %175 = OpFMul %float %174 %float_2 + %176 = OpFSub %float %175 %float_1 + %177 = OpCompositeExtract %float %173 1 + %178 = OpFMul %float %177 %float_2 + %179 = OpFSub %float %float_1 %178 + %180 = OpCompositeConstruct %v4float %176 %179 %float_0 %float_1 + OpStore %out_var_TEXCOORD0 %144 + OpStore %out_var_TEXCOORD1 %112 + OpStore %out_var_TEXCOORD2 %120 + OpStore %out_var_TEXCOORD3 %128 + OpStore %out_var_TEXCOORD4 %136 + OpStore %out_var_TEXCOORD5 %149 + OpStore %out_var_TEXCOORD6 %154 + OpStore %gl_Position %180 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/shaders-ue4/asm/vert/texture-buffer.asm.vert b/3rdparty/spirv-cross/shaders-ue4/asm/vert/texture-buffer.asm.vert new file mode 100644 index 000000000..6d52623a1 --- /dev/null +++ b/3rdparty/spirv-cross/shaders-ue4/asm/vert/texture-buffer.asm.vert @@ -0,0 +1,1054 @@ +; SPIR-V +; Version: 1.0 +; Generator: Google spiregg; 0 +; Bound: 397 +; Schema: 0 + OpCapability Shader + OpCapability SampledBuffer + OpCapability StorageImageExtendedFormats + OpExtension "SPV_GOOGLE_hlsl_functionality1" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %Main "main" %gl_VertexIndex %gl_InstanceIndex %in_var_ATTRIBUTE0 %out_var_TEXCOORD6 %gl_Position + OpSource HLSL 600 + OpName %type_View "type.View" + OpMemberName %type_View 0 "View_TranslatedWorldToClip" + OpMemberName %type_View 1 "View_WorldToClip" + OpMemberName %type_View 2 "View_TranslatedWorldToView" + OpMemberName %type_View 3 "View_ViewToTranslatedWorld" + OpMemberName %type_View 4 "View_TranslatedWorldToCameraView" + OpMemberName %type_View 5 "View_CameraViewToTranslatedWorld" + OpMemberName %type_View 6 "View_ViewToClip" + OpMemberName %type_View 7 "View_ViewToClipNoAA" + OpMemberName %type_View 8 "View_ClipToView" + OpMemberName %type_View 9 "View_ClipToTranslatedWorld" + OpMemberName %type_View 10 "View_SVPositionToTranslatedWorld" + OpMemberName %type_View 11 "View_ScreenToWorld" + OpMemberName %type_View 12 "View_ScreenToTranslatedWorld" + OpMemberName %type_View 13 "View_ViewForward" + OpMemberName %type_View 14 "PrePadding_View_844" + OpMemberName %type_View 15 "View_ViewUp" + OpMemberName %type_View 16 "PrePadding_View_860" + OpMemberName %type_View 17 "View_ViewRight" + OpMemberName %type_View 18 "PrePadding_View_876" + OpMemberName %type_View 19 "View_HMDViewNoRollUp" + OpMemberName %type_View 20 "PrePadding_View_892" + OpMemberName %type_View 21 "View_HMDViewNoRollRight" + OpMemberName %type_View 22 "PrePadding_View_908" + OpMemberName %type_View 23 "View_InvDeviceZToWorldZTransform" + OpMemberName %type_View 24 "View_ScreenPositionScaleBias" + OpMemberName %type_View 25 "View_WorldCameraOrigin" + OpMemberName %type_View 26 "PrePadding_View_956" + OpMemberName %type_View 27 "View_TranslatedWorldCameraOrigin" + OpMemberName %type_View 28 "PrePadding_View_972" + OpMemberName %type_View 29 "View_WorldViewOrigin" + OpMemberName %type_View 30 "PrePadding_View_988" + OpMemberName %type_View 31 "View_PreViewTranslation" + OpMemberName %type_View 32 "PrePadding_View_1004" + OpMemberName %type_View 33 "View_PrevProjection" + OpMemberName %type_View 34 "View_PrevViewProj" + OpMemberName %type_View 35 "View_PrevViewRotationProj" + OpMemberName %type_View 36 "View_PrevViewToClip" + OpMemberName %type_View 37 "View_PrevClipToView" + OpMemberName %type_View 38 "View_PrevTranslatedWorldToClip" + OpMemberName %type_View 39 "View_PrevTranslatedWorldToView" + OpMemberName %type_View 40 "View_PrevViewToTranslatedWorld" + OpMemberName %type_View 41 "View_PrevTranslatedWorldToCameraView" + OpMemberName %type_View 42 "View_PrevCameraViewToTranslatedWorld" + OpMemberName %type_View 43 "View_PrevWorldCameraOrigin" + OpMemberName %type_View 44 "PrePadding_View_1660" + OpMemberName %type_View 45 "View_PrevWorldViewOrigin" + OpMemberName %type_View 46 "PrePadding_View_1676" + OpMemberName %type_View 47 "View_PrevPreViewTranslation" + OpMemberName %type_View 48 "PrePadding_View_1692" + OpMemberName %type_View 49 "View_PrevInvViewProj" + OpMemberName %type_View 50 "View_PrevScreenToTranslatedWorld" + OpMemberName %type_View 51 "View_ClipToPrevClip" + OpMemberName %type_View 52 "View_TemporalAAJitter" + OpMemberName %type_View 53 "View_GlobalClippingPlane" + OpMemberName %type_View 54 "View_FieldOfViewWideAngles" + OpMemberName %type_View 55 "View_PrevFieldOfViewWideAngles" + OpMemberName %type_View 56 "View_ViewRectMin" + OpMemberName %type_View 57 "View_ViewSizeAndInvSize" + OpMemberName %type_View 58 "View_BufferSizeAndInvSize" + OpMemberName %type_View 59 "View_BufferBilinearUVMinMax" + OpMemberName %type_View 60 "View_NumSceneColorMSAASamples" + OpMemberName %type_View 61 "View_PreExposure" + OpMemberName %type_View 62 "View_OneOverPreExposure" + OpMemberName %type_View 63 "PrePadding_View_2012" + OpMemberName %type_View 64 "View_DiffuseOverrideParameter" + OpMemberName %type_View 65 "View_SpecularOverrideParameter" + OpMemberName %type_View 66 "View_NormalOverrideParameter" + OpMemberName %type_View 67 "View_RoughnessOverrideParameter" + OpMemberName %type_View 68 "View_PrevFrameGameTime" + OpMemberName %type_View 69 "View_PrevFrameRealTime" + OpMemberName %type_View 70 "View_OutOfBoundsMask" + OpMemberName %type_View 71 "PrePadding_View_2084" + OpMemberName %type_View 72 "PrePadding_View_2088" + OpMemberName %type_View 73 "PrePadding_View_2092" + OpMemberName %type_View 74 "View_WorldCameraMovementSinceLastFrame" + OpMemberName %type_View 75 "View_CullingSign" + OpMemberName %type_View 76 "View_NearPlane" + OpMemberName %type_View 77 "View_AdaptiveTessellationFactor" + OpMemberName %type_View 78 "View_GameTime" + OpMemberName %type_View 79 "View_RealTime" + OpMemberName %type_View 80 "View_DeltaTime" + OpMemberName %type_View 81 "View_MaterialTextureMipBias" + OpMemberName %type_View 82 "View_MaterialTextureDerivativeMultiply" + OpMemberName %type_View 83 "View_Random" + OpMemberName %type_View 84 "View_FrameNumber" + OpMemberName %type_View 85 "View_StateFrameIndexMod8" + OpMemberName %type_View 86 "View_StateFrameIndex" + OpMemberName %type_View 87 "View_CameraCut" + OpMemberName %type_View 88 "View_UnlitViewmodeMask" + OpMemberName %type_View 89 "PrePadding_View_2164" + OpMemberName %type_View 90 "PrePadding_View_2168" + OpMemberName %type_View 91 "PrePadding_View_2172" + OpMemberName %type_View 92 "View_DirectionalLightColor" + OpMemberName %type_View 93 "View_DirectionalLightDirection" + OpMemberName %type_View 94 "PrePadding_View_2204" + OpMemberName %type_View 95 "View_TranslucencyLightingVolumeMin" + OpMemberName %type_View 96 "View_TranslucencyLightingVolumeInvSize" + OpMemberName %type_View 97 "View_TemporalAAParams" + OpMemberName %type_View 98 "View_CircleDOFParams" + OpMemberName %type_View 99 "View_DepthOfFieldSensorWidth" + OpMemberName %type_View 100 "View_DepthOfFieldFocalDistance" + OpMemberName %type_View 101 "View_DepthOfFieldScale" + OpMemberName %type_View 102 "View_DepthOfFieldFocalLength" + OpMemberName %type_View 103 "View_DepthOfFieldFocalRegion" + OpMemberName %type_View 104 "View_DepthOfFieldNearTransitionRegion" + OpMemberName %type_View 105 "View_DepthOfFieldFarTransitionRegion" + OpMemberName %type_View 106 "View_MotionBlurNormalizedToPixel" + OpMemberName %type_View 107 "View_bSubsurfacePostprocessEnabled" + OpMemberName %type_View 108 "View_GeneralPurposeTweak" + OpMemberName %type_View 109 "View_DemosaicVposOffset" + OpMemberName %type_View 110 "PrePadding_View_2348" + OpMemberName %type_View 111 "View_IndirectLightingColorScale" + OpMemberName %type_View 112 "View_HDR32bppEncodingMode" + OpMemberName %type_View 113 "View_AtmosphericFogSunDirection" + OpMemberName %type_View 114 "View_AtmosphericFogSunPower" + OpMemberName %type_View 115 "View_AtmosphericFogPower" + OpMemberName %type_View 116 "View_AtmosphericFogDensityScale" + OpMemberName %type_View 117 "View_AtmosphericFogDensityOffset" + OpMemberName %type_View 118 "View_AtmosphericFogGroundOffset" + OpMemberName %type_View 119 "View_AtmosphericFogDistanceScale" + OpMemberName %type_View 120 "View_AtmosphericFogAltitudeScale" + OpMemberName %type_View 121 "View_AtmosphericFogHeightScaleRayleigh" + OpMemberName %type_View 122 "View_AtmosphericFogStartDistance" + OpMemberName %type_View 123 "View_AtmosphericFogDistanceOffset" + OpMemberName %type_View 124 "View_AtmosphericFogSunDiscScale" + OpMemberName %type_View 125 "View_AtmosphericFogRenderMask" + OpMemberName %type_View 126 "View_AtmosphericFogInscatterAltitudeSampleNum" + OpMemberName %type_View 127 "View_AtmosphericFogSunColor" + OpMemberName %type_View 128 "View_NormalCurvatureToRoughnessScaleBias" + OpMemberName %type_View 129 "View_RenderingReflectionCaptureMask" + OpMemberName %type_View 130 "View_AmbientCubemapTint" + OpMemberName %type_View 131 "View_AmbientCubemapIntensity" + OpMemberName %type_View 132 "View_SkyLightParameters" + OpMemberName %type_View 133 "PrePadding_View_2488" + OpMemberName %type_View 134 "PrePadding_View_2492" + OpMemberName %type_View 135 "View_SkyLightColor" + OpMemberName %type_View 136 "View_SkyIrradianceEnvironmentMap" + OpMemberName %type_View 137 "View_MobilePreviewMode" + OpMemberName %type_View 138 "View_HMDEyePaddingOffset" + OpMemberName %type_View 139 "View_ReflectionCubemapMaxMip" + OpMemberName %type_View 140 "View_ShowDecalsMask" + OpMemberName %type_View 141 "View_DistanceFieldAOSpecularOcclusionMode" + OpMemberName %type_View 142 "View_IndirectCapsuleSelfShadowingIntensity" + OpMemberName %type_View 143 "PrePadding_View_2648" + OpMemberName %type_View 144 "PrePadding_View_2652" + OpMemberName %type_View 145 "View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight" + OpMemberName %type_View 146 "View_StereoPassIndex" + OpMemberName %type_View 147 "View_GlobalVolumeCenterAndExtent" + OpMemberName %type_View 148 "View_GlobalVolumeWorldToUVAddAndMul" + OpMemberName %type_View 149 "View_GlobalVolumeDimension" + OpMemberName %type_View 150 "View_GlobalVolumeTexelSize" + OpMemberName %type_View 151 "View_MaxGlobalDistance" + OpMemberName %type_View 152 "View_bCheckerboardSubsurfaceProfileRendering" + OpMemberName %type_View 153 "View_VolumetricFogInvGridSize" + OpMemberName %type_View 154 "PrePadding_View_2828" + OpMemberName %type_View 155 "View_VolumetricFogGridZParams" + OpMemberName %type_View 156 "PrePadding_View_2844" + OpMemberName %type_View 157 "View_VolumetricFogSVPosToVolumeUV" + OpMemberName %type_View 158 "View_VolumetricFogMaxDistance" + OpMemberName %type_View 159 "PrePadding_View_2860" + OpMemberName %type_View 160 "View_VolumetricLightmapWorldToUVScale" + OpMemberName %type_View 161 "PrePadding_View_2876" + OpMemberName %type_View 162 "View_VolumetricLightmapWorldToUVAdd" + OpMemberName %type_View 163 "PrePadding_View_2892" + OpMemberName %type_View 164 "View_VolumetricLightmapIndirectionTextureSize" + OpMemberName %type_View 165 "View_VolumetricLightmapBrickSize" + OpMemberName %type_View 166 "View_VolumetricLightmapBrickTexelSize" + OpMemberName %type_View 167 "View_StereoIPD" + OpMemberName %type_View 168 "View_IndirectLightingCacheShowFlag" + OpMemberName %type_View 169 "View_EyeToPixelSpreadAngle" + OpName %View "View" + OpName %type_Primitive "type.Primitive" + OpMemberName %type_Primitive 0 "Primitive_LocalToWorld" + OpMemberName %type_Primitive 1 "Primitive_InvNonUniformScaleAndDeterminantSign" + OpMemberName %type_Primitive 2 "Primitive_ObjectWorldPositionAndRadius" + OpMemberName %type_Primitive 3 "Primitive_WorldToLocal" + OpMemberName %type_Primitive 4 "Primitive_PreviousLocalToWorld" + OpMemberName %type_Primitive 5 "Primitive_PreviousWorldToLocal" + OpMemberName %type_Primitive 6 "Primitive_ActorWorldPosition" + OpMemberName %type_Primitive 7 "Primitive_UseSingleSampleShadowFromStationaryLights" + OpMemberName %type_Primitive 8 "Primitive_ObjectBounds" + OpMemberName %type_Primitive 9 "Primitive_LpvBiasMultiplier" + OpMemberName %type_Primitive 10 "Primitive_DecalReceiverMask" + OpMemberName %type_Primitive 11 "Primitive_PerObjectGBufferData" + OpMemberName %type_Primitive 12 "Primitive_UseVolumetricLightmapShadowFromStationaryLights" + OpMemberName %type_Primitive 13 "Primitive_UseEditorDepthTest" + OpMemberName %type_Primitive 14 "Primitive_ObjectOrientation" + OpMemberName %type_Primitive 15 "Primitive_NonUniformScale" + OpMemberName %type_Primitive 16 "Primitive_LocalObjectBoundsMin" + OpMemberName %type_Primitive 17 "PrePadding_Primitive_380" + OpMemberName %type_Primitive 18 "Primitive_LocalObjectBoundsMax" + OpMemberName %type_Primitive 19 "Primitive_LightingChannelMask" + OpMemberName %type_Primitive 20 "Primitive_LightmapDataIndex" + OpMemberName %type_Primitive 21 "Primitive_SingleCaptureIndex" + OpName %Primitive "Primitive" + OpName %type_MobileShadowDepthPass "type.MobileShadowDepthPass" + OpMemberName %type_MobileShadowDepthPass 0 "PrePadding_MobileShadowDepthPass_0" + OpMemberName %type_MobileShadowDepthPass 1 "PrePadding_MobileShadowDepthPass_4" + OpMemberName %type_MobileShadowDepthPass 2 "PrePadding_MobileShadowDepthPass_8" + OpMemberName %type_MobileShadowDepthPass 3 "PrePadding_MobileShadowDepthPass_12" + OpMemberName %type_MobileShadowDepthPass 4 "PrePadding_MobileShadowDepthPass_16" + OpMemberName %type_MobileShadowDepthPass 5 "PrePadding_MobileShadowDepthPass_20" + OpMemberName %type_MobileShadowDepthPass 6 "PrePadding_MobileShadowDepthPass_24" + OpMemberName %type_MobileShadowDepthPass 7 "PrePadding_MobileShadowDepthPass_28" + OpMemberName %type_MobileShadowDepthPass 8 "PrePadding_MobileShadowDepthPass_32" + OpMemberName %type_MobileShadowDepthPass 9 "PrePadding_MobileShadowDepthPass_36" + OpMemberName %type_MobileShadowDepthPass 10 "PrePadding_MobileShadowDepthPass_40" + OpMemberName %type_MobileShadowDepthPass 11 "PrePadding_MobileShadowDepthPass_44" + OpMemberName %type_MobileShadowDepthPass 12 "PrePadding_MobileShadowDepthPass_48" + OpMemberName %type_MobileShadowDepthPass 13 "PrePadding_MobileShadowDepthPass_52" + OpMemberName %type_MobileShadowDepthPass 14 "PrePadding_MobileShadowDepthPass_56" + OpMemberName %type_MobileShadowDepthPass 15 "PrePadding_MobileShadowDepthPass_60" + OpMemberName %type_MobileShadowDepthPass 16 "PrePadding_MobileShadowDepthPass_64" + OpMemberName %type_MobileShadowDepthPass 17 "PrePadding_MobileShadowDepthPass_68" + OpMemberName %type_MobileShadowDepthPass 18 "PrePadding_MobileShadowDepthPass_72" + OpMemberName %type_MobileShadowDepthPass 19 "PrePadding_MobileShadowDepthPass_76" + OpMemberName %type_MobileShadowDepthPass 20 "MobileShadowDepthPass_ProjectionMatrix" + OpMemberName %type_MobileShadowDepthPass 21 "MobileShadowDepthPass_ShadowParams" + OpMemberName %type_MobileShadowDepthPass 22 "MobileShadowDepthPass_bClampToNearPlane" + OpMemberName %type_MobileShadowDepthPass 23 "PrePadding_MobileShadowDepthPass_156" + OpMemberName %type_MobileShadowDepthPass 24 "MobileShadowDepthPass_ShadowViewProjectionMatrices" + OpName %MobileShadowDepthPass "MobileShadowDepthPass" + OpName %type_EmitterDynamicUniforms "type.EmitterDynamicUniforms" + OpMemberName %type_EmitterDynamicUniforms 0 "EmitterDynamicUniforms_LocalToWorldScale" + OpMemberName %type_EmitterDynamicUniforms 1 "EmitterDynamicUniforms_EmitterInstRandom" + OpMemberName %type_EmitterDynamicUniforms 2 "PrePadding_EmitterDynamicUniforms_12" + OpMemberName %type_EmitterDynamicUniforms 3 "EmitterDynamicUniforms_AxisLockRight" + OpMemberName %type_EmitterDynamicUniforms 4 "EmitterDynamicUniforms_AxisLockUp" + OpMemberName %type_EmitterDynamicUniforms 5 "EmitterDynamicUniforms_DynamicColor" + OpMemberName %type_EmitterDynamicUniforms 6 "EmitterDynamicUniforms_MacroUVParameters" + OpName %EmitterDynamicUniforms "EmitterDynamicUniforms" + OpName %type_EmitterUniforms "type.EmitterUniforms" + OpMemberName %type_EmitterUniforms 0 "EmitterUniforms_ColorCurve" + OpMemberName %type_EmitterUniforms 1 "EmitterUniforms_ColorScale" + OpMemberName %type_EmitterUniforms 2 "EmitterUniforms_ColorBias" + OpMemberName %type_EmitterUniforms 3 "EmitterUniforms_MiscCurve" + OpMemberName %type_EmitterUniforms 4 "EmitterUniforms_MiscScale" + OpMemberName %type_EmitterUniforms 5 "EmitterUniforms_MiscBias" + OpMemberName %type_EmitterUniforms 6 "EmitterUniforms_SizeBySpeed" + OpMemberName %type_EmitterUniforms 7 "EmitterUniforms_SubImageSize" + OpMemberName %type_EmitterUniforms 8 "EmitterUniforms_TangentSelector" + OpMemberName %type_EmitterUniforms 9 "EmitterUniforms_CameraFacingBlend" + OpMemberName %type_EmitterUniforms 10 "EmitterUniforms_RemoveHMDRoll" + OpMemberName %type_EmitterUniforms 11 "EmitterUniforms_RotationRateScale" + OpMemberName %type_EmitterUniforms 12 "EmitterUniforms_RotationBias" + OpMemberName %type_EmitterUniforms 13 "EmitterUniforms_CameraMotionBlurAmount" + OpMemberName %type_EmitterUniforms 14 "PrePadding_EmitterUniforms_172" + OpMemberName %type_EmitterUniforms 15 "EmitterUniforms_PivotOffset" + OpName %EmitterUniforms "EmitterUniforms" + OpName %type_buffer_image "type.buffer.image" + OpName %ParticleIndices "ParticleIndices" + OpName %type__Globals "type.$Globals" + OpMemberName %type__Globals 0 "ParticleIndicesOffset" + OpName %_Globals "$Globals" + OpName %type_2d_image "type.2d.image" + OpName %PositionTexture "PositionTexture" + OpName %type_sampler "type.sampler" + OpName %PositionTextureSampler "PositionTextureSampler" + OpName %VelocityTexture "VelocityTexture" + OpName %VelocityTextureSampler "VelocityTextureSampler" + OpName %AttributesTexture "AttributesTexture" + OpName %AttributesTextureSampler "AttributesTextureSampler" + OpName %CurveTexture "CurveTexture" + OpName %CurveTextureSampler "CurveTextureSampler" + OpName %in_var_ATTRIBUTE0 "in.var.ATTRIBUTE0" + OpName %out_var_TEXCOORD6 "out.var.TEXCOORD6" + OpName %Main "Main" + OpName %type_sampled_image "type.sampled.image" + OpDecorate %gl_VertexIndex BuiltIn VertexIndex + OpDecorateString %gl_VertexIndex UserSemantic "SV_VertexID" + OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex + OpDecorateString %gl_InstanceIndex UserSemantic "SV_InstanceID" + OpDecorateString %in_var_ATTRIBUTE0 UserSemantic "ATTRIBUTE0" + OpDecorateString %out_var_TEXCOORD6 UserSemantic "TEXCOORD6" + OpDecorate %gl_Position BuiltIn Position + OpDecorateString %gl_Position UserSemantic "SV_POSITION" + OpDecorate %in_var_ATTRIBUTE0 Location 0 + OpDecorate %out_var_TEXCOORD6 Location 0 + OpDecorate %View DescriptorSet 0 + OpDecorate %View Binding 1 + OpDecorate %Primitive DescriptorSet 0 + OpDecorate %Primitive Binding 2 + OpDecorate %MobileShadowDepthPass DescriptorSet 0 + OpDecorate %MobileShadowDepthPass Binding 3 + OpDecorate %EmitterDynamicUniforms DescriptorSet 0 + OpDecorate %EmitterDynamicUniforms Binding 4 + OpDecorate %EmitterUniforms DescriptorSet 0 + OpDecorate %EmitterUniforms Binding 5 + OpDecorate %ParticleIndices DescriptorSet 0 + OpDecorate %ParticleIndices Binding 0 + OpDecorate %_Globals DescriptorSet 0 + OpDecorate %_Globals Binding 6 + OpDecorate %PositionTexture DescriptorSet 0 + OpDecorate %PositionTexture Binding 1 + OpDecorate %PositionTextureSampler DescriptorSet 0 + OpDecorate %PositionTextureSampler Binding 0 + OpDecorate %VelocityTexture DescriptorSet 0 + OpDecorate %VelocityTexture Binding 2 + OpDecorate %VelocityTextureSampler DescriptorSet 0 + OpDecorate %VelocityTextureSampler Binding 1 + OpDecorate %AttributesTexture DescriptorSet 0 + OpDecorate %AttributesTexture Binding 3 + OpDecorate %AttributesTextureSampler DescriptorSet 0 + OpDecorate %AttributesTextureSampler Binding 2 + OpDecorate %CurveTexture DescriptorSet 0 + OpDecorate %CurveTexture Binding 4 + OpDecorate %CurveTextureSampler DescriptorSet 0 + OpDecorate %CurveTextureSampler Binding 3 + OpDecorate %_arr_v4float_uint_2 ArrayStride 16 + OpDecorate %_arr_v4float_uint_7 ArrayStride 16 + OpDecorate %_arr_v4float_uint_4 ArrayStride 16 + OpMemberDecorate %type_View 0 Offset 0 + OpMemberDecorate %type_View 0 MatrixStride 16 + OpMemberDecorate %type_View 0 ColMajor + OpMemberDecorate %type_View 1 Offset 64 + OpMemberDecorate %type_View 1 MatrixStride 16 + OpMemberDecorate %type_View 1 ColMajor + OpMemberDecorate %type_View 2 Offset 128 + OpMemberDecorate %type_View 2 MatrixStride 16 + OpMemberDecorate %type_View 2 ColMajor + OpMemberDecorate %type_View 3 Offset 192 + OpMemberDecorate %type_View 3 MatrixStride 16 + OpMemberDecorate %type_View 3 ColMajor + OpMemberDecorate %type_View 4 Offset 256 + OpMemberDecorate %type_View 4 MatrixStride 16 + OpMemberDecorate %type_View 4 ColMajor + OpMemberDecorate %type_View 5 Offset 320 + OpMemberDecorate %type_View 5 MatrixStride 16 + OpMemberDecorate %type_View 5 ColMajor + OpMemberDecorate %type_View 6 Offset 384 + OpMemberDecorate %type_View 6 MatrixStride 16 + OpMemberDecorate %type_View 6 ColMajor + OpMemberDecorate %type_View 7 Offset 448 + OpMemberDecorate %type_View 7 MatrixStride 16 + OpMemberDecorate %type_View 7 ColMajor + OpMemberDecorate %type_View 8 Offset 512 + OpMemberDecorate %type_View 8 MatrixStride 16 + OpMemberDecorate %type_View 8 ColMajor + OpMemberDecorate %type_View 9 Offset 576 + OpMemberDecorate %type_View 9 MatrixStride 16 + OpMemberDecorate %type_View 9 ColMajor + OpMemberDecorate %type_View 10 Offset 640 + OpMemberDecorate %type_View 10 MatrixStride 16 + OpMemberDecorate %type_View 10 ColMajor + OpMemberDecorate %type_View 11 Offset 704 + OpMemberDecorate %type_View 11 MatrixStride 16 + OpMemberDecorate %type_View 11 ColMajor + OpMemberDecorate %type_View 12 Offset 768 + OpMemberDecorate %type_View 12 MatrixStride 16 + OpMemberDecorate %type_View 12 ColMajor + OpMemberDecorate %type_View 13 Offset 832 + OpMemberDecorate %type_View 14 Offset 844 + OpMemberDecorate %type_View 15 Offset 848 + OpMemberDecorate %type_View 16 Offset 860 + OpMemberDecorate %type_View 17 Offset 864 + OpMemberDecorate %type_View 18 Offset 876 + OpMemberDecorate %type_View 19 Offset 880 + OpMemberDecorate %type_View 20 Offset 892 + OpMemberDecorate %type_View 21 Offset 896 + OpMemberDecorate %type_View 22 Offset 908 + OpMemberDecorate %type_View 23 Offset 912 + OpMemberDecorate %type_View 24 Offset 928 + OpMemberDecorate %type_View 25 Offset 944 + OpMemberDecorate %type_View 26 Offset 956 + OpMemberDecorate %type_View 27 Offset 960 + OpMemberDecorate %type_View 28 Offset 972 + OpMemberDecorate %type_View 29 Offset 976 + OpMemberDecorate %type_View 30 Offset 988 + OpMemberDecorate %type_View 31 Offset 992 + OpMemberDecorate %type_View 32 Offset 1004 + OpMemberDecorate %type_View 33 Offset 1008 + OpMemberDecorate %type_View 33 MatrixStride 16 + OpMemberDecorate %type_View 33 ColMajor + OpMemberDecorate %type_View 34 Offset 1072 + OpMemberDecorate %type_View 34 MatrixStride 16 + OpMemberDecorate %type_View 34 ColMajor + OpMemberDecorate %type_View 35 Offset 1136 + OpMemberDecorate %type_View 35 MatrixStride 16 + OpMemberDecorate %type_View 35 ColMajor + OpMemberDecorate %type_View 36 Offset 1200 + OpMemberDecorate %type_View 36 MatrixStride 16 + OpMemberDecorate %type_View 36 ColMajor + OpMemberDecorate %type_View 37 Offset 1264 + OpMemberDecorate %type_View 37 MatrixStride 16 + OpMemberDecorate %type_View 37 ColMajor + OpMemberDecorate %type_View 38 Offset 1328 + OpMemberDecorate %type_View 38 MatrixStride 16 + OpMemberDecorate %type_View 38 ColMajor + OpMemberDecorate %type_View 39 Offset 1392 + OpMemberDecorate %type_View 39 MatrixStride 16 + OpMemberDecorate %type_View 39 ColMajor + OpMemberDecorate %type_View 40 Offset 1456 + OpMemberDecorate %type_View 40 MatrixStride 16 + OpMemberDecorate %type_View 40 ColMajor + OpMemberDecorate %type_View 41 Offset 1520 + OpMemberDecorate %type_View 41 MatrixStride 16 + OpMemberDecorate %type_View 41 ColMajor + OpMemberDecorate %type_View 42 Offset 1584 + OpMemberDecorate %type_View 42 MatrixStride 16 + OpMemberDecorate %type_View 42 ColMajor + OpMemberDecorate %type_View 43 Offset 1648 + OpMemberDecorate %type_View 44 Offset 1660 + OpMemberDecorate %type_View 45 Offset 1664 + OpMemberDecorate %type_View 46 Offset 1676 + OpMemberDecorate %type_View 47 Offset 1680 + OpMemberDecorate %type_View 48 Offset 1692 + OpMemberDecorate %type_View 49 Offset 1696 + OpMemberDecorate %type_View 49 MatrixStride 16 + OpMemberDecorate %type_View 49 ColMajor + OpMemberDecorate %type_View 50 Offset 1760 + OpMemberDecorate %type_View 50 MatrixStride 16 + OpMemberDecorate %type_View 50 ColMajor + OpMemberDecorate %type_View 51 Offset 1824 + OpMemberDecorate %type_View 51 MatrixStride 16 + OpMemberDecorate %type_View 51 ColMajor + OpMemberDecorate %type_View 52 Offset 1888 + OpMemberDecorate %type_View 53 Offset 1904 + OpMemberDecorate %type_View 54 Offset 1920 + OpMemberDecorate %type_View 55 Offset 1928 + OpMemberDecorate %type_View 56 Offset 1936 + OpMemberDecorate %type_View 57 Offset 1952 + OpMemberDecorate %type_View 58 Offset 1968 + OpMemberDecorate %type_View 59 Offset 1984 + OpMemberDecorate %type_View 60 Offset 2000 + OpMemberDecorate %type_View 61 Offset 2004 + OpMemberDecorate %type_View 62 Offset 2008 + OpMemberDecorate %type_View 63 Offset 2012 + OpMemberDecorate %type_View 64 Offset 2016 + OpMemberDecorate %type_View 65 Offset 2032 + OpMemberDecorate %type_View 66 Offset 2048 + OpMemberDecorate %type_View 67 Offset 2064 + OpMemberDecorate %type_View 68 Offset 2072 + OpMemberDecorate %type_View 69 Offset 2076 + OpMemberDecorate %type_View 70 Offset 2080 + OpMemberDecorate %type_View 71 Offset 2084 + OpMemberDecorate %type_View 72 Offset 2088 + OpMemberDecorate %type_View 73 Offset 2092 + OpMemberDecorate %type_View 74 Offset 2096 + OpMemberDecorate %type_View 75 Offset 2108 + OpMemberDecorate %type_View 76 Offset 2112 + OpMemberDecorate %type_View 77 Offset 2116 + OpMemberDecorate %type_View 78 Offset 2120 + OpMemberDecorate %type_View 79 Offset 2124 + OpMemberDecorate %type_View 80 Offset 2128 + OpMemberDecorate %type_View 81 Offset 2132 + OpMemberDecorate %type_View 82 Offset 2136 + OpMemberDecorate %type_View 83 Offset 2140 + OpMemberDecorate %type_View 84 Offset 2144 + OpMemberDecorate %type_View 85 Offset 2148 + OpMemberDecorate %type_View 86 Offset 2152 + OpMemberDecorate %type_View 87 Offset 2156 + OpMemberDecorate %type_View 88 Offset 2160 + OpMemberDecorate %type_View 89 Offset 2164 + OpMemberDecorate %type_View 90 Offset 2168 + OpMemberDecorate %type_View 91 Offset 2172 + OpMemberDecorate %type_View 92 Offset 2176 + OpMemberDecorate %type_View 93 Offset 2192 + OpMemberDecorate %type_View 94 Offset 2204 + OpMemberDecorate %type_View 95 Offset 2208 + OpMemberDecorate %type_View 96 Offset 2240 + OpMemberDecorate %type_View 97 Offset 2272 + OpMemberDecorate %type_View 98 Offset 2288 + OpMemberDecorate %type_View 99 Offset 2304 + OpMemberDecorate %type_View 100 Offset 2308 + OpMemberDecorate %type_View 101 Offset 2312 + OpMemberDecorate %type_View 102 Offset 2316 + OpMemberDecorate %type_View 103 Offset 2320 + OpMemberDecorate %type_View 104 Offset 2324 + OpMemberDecorate %type_View 105 Offset 2328 + OpMemberDecorate %type_View 106 Offset 2332 + OpMemberDecorate %type_View 107 Offset 2336 + OpMemberDecorate %type_View 108 Offset 2340 + OpMemberDecorate %type_View 109 Offset 2344 + OpMemberDecorate %type_View 110 Offset 2348 + OpMemberDecorate %type_View 111 Offset 2352 + OpMemberDecorate %type_View 112 Offset 2364 + OpMemberDecorate %type_View 113 Offset 2368 + OpMemberDecorate %type_View 114 Offset 2380 + OpMemberDecorate %type_View 115 Offset 2384 + OpMemberDecorate %type_View 116 Offset 2388 + OpMemberDecorate %type_View 117 Offset 2392 + OpMemberDecorate %type_View 118 Offset 2396 + OpMemberDecorate %type_View 119 Offset 2400 + OpMemberDecorate %type_View 120 Offset 2404 + OpMemberDecorate %type_View 121 Offset 2408 + OpMemberDecorate %type_View 122 Offset 2412 + OpMemberDecorate %type_View 123 Offset 2416 + OpMemberDecorate %type_View 124 Offset 2420 + OpMemberDecorate %type_View 125 Offset 2424 + OpMemberDecorate %type_View 126 Offset 2428 + OpMemberDecorate %type_View 127 Offset 2432 + OpMemberDecorate %type_View 128 Offset 2448 + OpMemberDecorate %type_View 129 Offset 2460 + OpMemberDecorate %type_View 130 Offset 2464 + OpMemberDecorate %type_View 131 Offset 2480 + OpMemberDecorate %type_View 132 Offset 2484 + OpMemberDecorate %type_View 133 Offset 2488 + OpMemberDecorate %type_View 134 Offset 2492 + OpMemberDecorate %type_View 135 Offset 2496 + OpMemberDecorate %type_View 136 Offset 2512 + OpMemberDecorate %type_View 137 Offset 2624 + OpMemberDecorate %type_View 138 Offset 2628 + OpMemberDecorate %type_View 139 Offset 2632 + OpMemberDecorate %type_View 140 Offset 2636 + OpMemberDecorate %type_View 141 Offset 2640 + OpMemberDecorate %type_View 142 Offset 2644 + OpMemberDecorate %type_View 143 Offset 2648 + OpMemberDecorate %type_View 144 Offset 2652 + OpMemberDecorate %type_View 145 Offset 2656 + OpMemberDecorate %type_View 146 Offset 2668 + OpMemberDecorate %type_View 147 Offset 2672 + OpMemberDecorate %type_View 148 Offset 2736 + OpMemberDecorate %type_View 149 Offset 2800 + OpMemberDecorate %type_View 150 Offset 2804 + OpMemberDecorate %type_View 151 Offset 2808 + OpMemberDecorate %type_View 152 Offset 2812 + OpMemberDecorate %type_View 153 Offset 2816 + OpMemberDecorate %type_View 154 Offset 2828 + OpMemberDecorate %type_View 155 Offset 2832 + OpMemberDecorate %type_View 156 Offset 2844 + OpMemberDecorate %type_View 157 Offset 2848 + OpMemberDecorate %type_View 158 Offset 2856 + OpMemberDecorate %type_View 159 Offset 2860 + OpMemberDecorate %type_View 160 Offset 2864 + OpMemberDecorate %type_View 161 Offset 2876 + OpMemberDecorate %type_View 162 Offset 2880 + OpMemberDecorate %type_View 163 Offset 2892 + OpMemberDecorate %type_View 164 Offset 2896 + OpMemberDecorate %type_View 165 Offset 2908 + OpMemberDecorate %type_View 166 Offset 2912 + OpMemberDecorate %type_View 167 Offset 2924 + OpMemberDecorate %type_View 168 Offset 2928 + OpMemberDecorate %type_View 169 Offset 2932 + OpDecorate %type_View Block + OpMemberDecorate %type_Primitive 0 Offset 0 + OpMemberDecorate %type_Primitive 0 MatrixStride 16 + OpMemberDecorate %type_Primitive 0 ColMajor + OpMemberDecorate %type_Primitive 1 Offset 64 + OpMemberDecorate %type_Primitive 2 Offset 80 + OpMemberDecorate %type_Primitive 3 Offset 96 + OpMemberDecorate %type_Primitive 3 MatrixStride 16 + OpMemberDecorate %type_Primitive 3 ColMajor + OpMemberDecorate %type_Primitive 4 Offset 160 + OpMemberDecorate %type_Primitive 4 MatrixStride 16 + OpMemberDecorate %type_Primitive 4 ColMajor + OpMemberDecorate %type_Primitive 5 Offset 224 + OpMemberDecorate %type_Primitive 5 MatrixStride 16 + OpMemberDecorate %type_Primitive 5 ColMajor + OpMemberDecorate %type_Primitive 6 Offset 288 + OpMemberDecorate %type_Primitive 7 Offset 300 + OpMemberDecorate %type_Primitive 8 Offset 304 + OpMemberDecorate %type_Primitive 9 Offset 316 + OpMemberDecorate %type_Primitive 10 Offset 320 + OpMemberDecorate %type_Primitive 11 Offset 324 + OpMemberDecorate %type_Primitive 12 Offset 328 + OpMemberDecorate %type_Primitive 13 Offset 332 + OpMemberDecorate %type_Primitive 14 Offset 336 + OpMemberDecorate %type_Primitive 15 Offset 352 + OpMemberDecorate %type_Primitive 16 Offset 368 + OpMemberDecorate %type_Primitive 17 Offset 380 + OpMemberDecorate %type_Primitive 18 Offset 384 + OpMemberDecorate %type_Primitive 19 Offset 396 + OpMemberDecorate %type_Primitive 20 Offset 400 + OpMemberDecorate %type_Primitive 21 Offset 404 + OpDecorate %type_Primitive Block + OpDecorate %_arr_mat4v4float_uint_6 ArrayStride 64 + OpMemberDecorate %type_MobileShadowDepthPass 0 Offset 0 + OpMemberDecorate %type_MobileShadowDepthPass 1 Offset 4 + OpMemberDecorate %type_MobileShadowDepthPass 2 Offset 8 + OpMemberDecorate %type_MobileShadowDepthPass 3 Offset 12 + OpMemberDecorate %type_MobileShadowDepthPass 4 Offset 16 + OpMemberDecorate %type_MobileShadowDepthPass 5 Offset 20 + OpMemberDecorate %type_MobileShadowDepthPass 6 Offset 24 + OpMemberDecorate %type_MobileShadowDepthPass 7 Offset 28 + OpMemberDecorate %type_MobileShadowDepthPass 8 Offset 32 + OpMemberDecorate %type_MobileShadowDepthPass 9 Offset 36 + OpMemberDecorate %type_MobileShadowDepthPass 10 Offset 40 + OpMemberDecorate %type_MobileShadowDepthPass 11 Offset 44 + OpMemberDecorate %type_MobileShadowDepthPass 12 Offset 48 + OpMemberDecorate %type_MobileShadowDepthPass 13 Offset 52 + OpMemberDecorate %type_MobileShadowDepthPass 14 Offset 56 + OpMemberDecorate %type_MobileShadowDepthPass 15 Offset 60 + OpMemberDecorate %type_MobileShadowDepthPass 16 Offset 64 + OpMemberDecorate %type_MobileShadowDepthPass 17 Offset 68 + OpMemberDecorate %type_MobileShadowDepthPass 18 Offset 72 + OpMemberDecorate %type_MobileShadowDepthPass 19 Offset 76 + OpMemberDecorate %type_MobileShadowDepthPass 20 Offset 80 + OpMemberDecorate %type_MobileShadowDepthPass 20 MatrixStride 16 + OpMemberDecorate %type_MobileShadowDepthPass 20 ColMajor + OpMemberDecorate %type_MobileShadowDepthPass 21 Offset 144 + OpMemberDecorate %type_MobileShadowDepthPass 22 Offset 152 + OpMemberDecorate %type_MobileShadowDepthPass 23 Offset 156 + OpMemberDecorate %type_MobileShadowDepthPass 24 Offset 160 + OpMemberDecorate %type_MobileShadowDepthPass 24 MatrixStride 16 + OpMemberDecorate %type_MobileShadowDepthPass 24 ColMajor + OpDecorate %type_MobileShadowDepthPass Block + OpMemberDecorate %type_EmitterDynamicUniforms 0 Offset 0 + OpMemberDecorate %type_EmitterDynamicUniforms 1 Offset 8 + OpMemberDecorate %type_EmitterDynamicUniforms 2 Offset 12 + OpMemberDecorate %type_EmitterDynamicUniforms 3 Offset 16 + OpMemberDecorate %type_EmitterDynamicUniforms 4 Offset 32 + OpMemberDecorate %type_EmitterDynamicUniforms 5 Offset 48 + OpMemberDecorate %type_EmitterDynamicUniforms 6 Offset 64 + OpDecorate %type_EmitterDynamicUniforms Block + OpMemberDecorate %type_EmitterUniforms 0 Offset 0 + OpMemberDecorate %type_EmitterUniforms 1 Offset 16 + OpMemberDecorate %type_EmitterUniforms 2 Offset 32 + OpMemberDecorate %type_EmitterUniforms 3 Offset 48 + OpMemberDecorate %type_EmitterUniforms 4 Offset 64 + OpMemberDecorate %type_EmitterUniforms 5 Offset 80 + OpMemberDecorate %type_EmitterUniforms 6 Offset 96 + OpMemberDecorate %type_EmitterUniforms 7 Offset 112 + OpMemberDecorate %type_EmitterUniforms 8 Offset 128 + OpMemberDecorate %type_EmitterUniforms 9 Offset 144 + OpMemberDecorate %type_EmitterUniforms 10 Offset 156 + OpMemberDecorate %type_EmitterUniforms 11 Offset 160 + OpMemberDecorate %type_EmitterUniforms 12 Offset 164 + OpMemberDecorate %type_EmitterUniforms 13 Offset 168 + OpMemberDecorate %type_EmitterUniforms 14 Offset 172 + OpMemberDecorate %type_EmitterUniforms 15 Offset 176 + OpDecorate %type_EmitterUniforms Block + OpMemberDecorate %type__Globals 0 Offset 0 + OpDecorate %type__Globals Block + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %v3float = OpTypeVector %float 3 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_7 = OpConstant %uint 7 + %uint_4 = OpConstant %uint 4 + %float_0 = OpConstant %float 0 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %uint_16 = OpConstant %uint 16 + %int_3 = OpConstant %int 3 + %float_1 = OpConstant %float 1 +%float_9_99999975en05 = OpConstant %float 9.99999975e-05 + %54 = OpConstantComposite %v3float %float_0 %float_0 %float_9_99999975en05 + %int_2 = OpConstant %int 2 + %int_5 = OpConstant %int 5 + %int_4 = OpConstant %int 4 + %float_0_5 = OpConstant %float 0.5 + %float_n0_5 = OpConstant %float -0.5 + %float_2 = OpConstant %float 2 + %61 = OpConstantComposite %v2float %float_2 %float_2 + %int_6 = OpConstant %int 6 + %63 = OpConstantComposite %v2float %float_1 %float_1 + %int_11 = OpConstant %int 11 + %int_15 = OpConstant %int 15 + %int_8 = OpConstant %int 8 + %int_9 = OpConstant %int 9 + %int_10 = OpConstant %int 10 + %int_12 = OpConstant %int 12 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 +%mat3v3float = OpTypeMatrix %v3float 3 + %int_20 = OpConstant %int 20 + %int_22 = OpConstant %int 22 +%float_9_99999997en07 = OpConstant %float 9.99999997e-07 + %int_21 = OpConstant %int 21 + %int_17 = OpConstant %int 17 + %int_19 = OpConstant %int 19 + %int_27 = OpConstant %int 27 + %int_31 = OpConstant %int 31 + %uint_3 = OpConstant %uint 3 + %82 = OpConstantComposite %v3float %float_0 %float_0 %float_1 +%float_0_00999999978 = OpConstant %float 0.00999999978 +%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2 +%_arr_v4float_uint_7 = OpTypeArray %v4float %uint_7 +%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4 + %type_View = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %v3float %float %v3float %float %v4float %v4float %v3float %float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %v3float %float %mat4v4float %mat4v4float %mat4v4float %v4float %v4float %v2float %v2float %v4float %v4float %v4float %v4float %int %float %float %float %v4float %v4float %v4float %v2float %float %float %float %float %float %float %v3float %float %float %float %float %float %float %float %float %uint %uint %uint %uint %float %float %float %float %float %v4float %v3float %float %_arr_v4float_uint_2 %_arr_v4float_uint_2 %v4float %v4float %float %float %float %float %float %float %float %float %float %float %float %float %v3float %float %v3float %float %float %float %float %float %float %float %float %float %float %float %uint %uint %v4float %v3float %float %v4float %float %float %float %float %v4float %_arr_v4float_uint_7 %float %float %float %float %uint %float %float %float %v3float %int %_arr_v4float_uint_4 %_arr_v4float_uint_4 %float %float %float %float %v3float %float %v3float %float %v2float %float %float %v3float %float %v3float %float %v3float %float %v3float %float %float %float +%_ptr_Uniform_type_View = OpTypePointer Uniform %type_View +%type_Primitive = OpTypeStruct %mat4v4float %v4float %v4float %mat4v4float %mat4v4float %mat4v4float %v3float %float %v3float %float %float %float %float %float %v4float %v4float %v3float %float %v3float %uint %uint %int +%_ptr_Uniform_type_Primitive = OpTypePointer Uniform %type_Primitive + %uint_6 = OpConstant %uint 6 +%_arr_mat4v4float_uint_6 = OpTypeArray %mat4v4float %uint_6 +%type_MobileShadowDepthPass = OpTypeStruct %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %float %mat4v4float %v2float %float %float %_arr_mat4v4float_uint_6 +%_ptr_Uniform_type_MobileShadowDepthPass = OpTypePointer Uniform %type_MobileShadowDepthPass +%type_EmitterDynamicUniforms = OpTypeStruct %v2float %float %float %v4float %v4float %v4float %v4float +%_ptr_Uniform_type_EmitterDynamicUniforms = OpTypePointer Uniform %type_EmitterDynamicUniforms +%type_EmitterUniforms = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v4float %v3float %float %float %float %float %float %v2float +%_ptr_Uniform_type_EmitterUniforms = OpTypePointer Uniform %type_EmitterUniforms +%type_buffer_image = OpTypeImage %float Buffer 2 0 0 1 Rg32f +%_ptr_UniformConstant_type_buffer_image = OpTypePointer UniformConstant %type_buffer_image +%type__Globals = OpTypeStruct %uint +%_ptr_Uniform_type__Globals = OpTypePointer Uniform %type__Globals +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Input_v2float = OpTypePointer Input %v2float +%_ptr_Output_float = OpTypePointer Output %float +%_ptr_Output_v4float = OpTypePointer Output %v4float + %void = OpTypeVoid + %99 = OpTypeFunction %void +%_ptr_Uniform_uint = OpTypePointer Uniform %uint +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %bool = OpTypeBool +%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float +%_ptr_Uniform_float = OpTypePointer Uniform %float +%_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%type_sampled_image = OpTypeSampledImage %type_2d_image + %View = OpVariable %_ptr_Uniform_type_View Uniform + %Primitive = OpVariable %_ptr_Uniform_type_Primitive Uniform +%MobileShadowDepthPass = OpVariable %_ptr_Uniform_type_MobileShadowDepthPass Uniform +%EmitterDynamicUniforms = OpVariable %_ptr_Uniform_type_EmitterDynamicUniforms Uniform +%EmitterUniforms = OpVariable %_ptr_Uniform_type_EmitterUniforms Uniform +%ParticleIndices = OpVariable %_ptr_UniformConstant_type_buffer_image UniformConstant + %_Globals = OpVariable %_ptr_Uniform_type__Globals Uniform +%PositionTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%PositionTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%VelocityTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%VelocityTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%AttributesTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%AttributesTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%CurveTexture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant +%CurveTextureSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%gl_VertexIndex = OpVariable %_ptr_Input_uint Input +%gl_InstanceIndex = OpVariable %_ptr_Input_uint Input +%in_var_ATTRIBUTE0 = OpVariable %_ptr_Input_v2float Input +%out_var_TEXCOORD6 = OpVariable %_ptr_Output_float Output +%gl_Position = OpVariable %_ptr_Output_v4float Output +%float_6_28318548 = OpConstant %float 6.28318548 + %108 = OpConstantNull %v3float + %Main = OpFunction %void None %99 + %109 = OpLabel + %110 = OpLoad %uint %gl_VertexIndex + %111 = OpLoad %uint %gl_InstanceIndex + %112 = OpLoad %v2float %in_var_ATTRIBUTE0 + %113 = OpAccessChain %_ptr_Uniform_v3float %View %int_15 + %114 = OpLoad %v3float %113 + %115 = OpAccessChain %_ptr_Uniform_v3float %View %int_17 + %116 = OpLoad %v3float %115 + %117 = OpAccessChain %_ptr_Uniform_v3float %View %int_19 + %118 = OpLoad %v3float %117 + %119 = OpAccessChain %_ptr_Uniform_v3float %View %int_21 + %120 = OpLoad %v3float %119 + %121 = OpAccessChain %_ptr_Uniform_v3float %View %int_27 + %122 = OpLoad %v3float %121 + %123 = OpAccessChain %_ptr_Uniform_v3float %View %int_31 + %124 = OpLoad %v3float %123 + %125 = OpIMul %uint %111 %uint_16 + %126 = OpUDiv %uint %110 %uint_4 + %127 = OpIAdd %uint %125 %126 + %128 = OpAccessChain %_ptr_Uniform_uint %_Globals %int_0 + %129 = OpLoad %uint %128 + %130 = OpIAdd %uint %129 %127 + %131 = OpLoad %type_buffer_image %ParticleIndices + %132 = OpImageFetch %v4float %131 %130 None + %133 = OpVectorShuffle %v2float %132 %132 0 1 + %134 = OpLoad %type_2d_image %PositionTexture + %135 = OpLoad %type_sampler %PositionTextureSampler + %136 = OpSampledImage %type_sampled_image %134 %135 + %137 = OpImageSampleExplicitLod %v4float %136 %133 Lod %float_0 + %138 = OpLoad %type_2d_image %VelocityTexture + %139 = OpLoad %type_sampler %VelocityTextureSampler + %140 = OpSampledImage %type_sampled_image %138 %139 + %141 = OpImageSampleExplicitLod %v4float %140 %133 Lod %float_0 + %142 = OpLoad %type_2d_image %AttributesTexture + %143 = OpLoad %type_sampler %AttributesTextureSampler + %144 = OpSampledImage %type_sampled_image %142 %143 + %145 = OpImageSampleExplicitLod %v4float %144 %133 Lod %float_0 + %146 = OpCompositeExtract %float %137 3 + %147 = OpExtInst %float %1 Step %146 %float_1 + %148 = OpVectorShuffle %v3float %141 %141 0 1 2 + %149 = OpAccessChain %_ptr_Uniform_mat4v4float %Primitive %int_0 + %150 = OpLoad %mat4v4float %149 + %151 = OpCompositeExtract %v4float %150 0 + %152 = OpVectorShuffle %v3float %151 %151 0 1 2 + %153 = OpCompositeExtract %v4float %150 1 + %154 = OpVectorShuffle %v3float %153 %153 0 1 2 + %155 = OpCompositeExtract %v4float %150 2 + %156 = OpVectorShuffle %v3float %155 %155 0 1 2 + %157 = OpCompositeConstruct %mat3v3float %152 %154 %156 + %158 = OpMatrixTimesVector %v3float %157 %148 + %159 = OpFAdd %v3float %158 %54 + %160 = OpExtInst %v3float %1 Normalize %159 + %161 = OpExtInst %float %1 Length %158 + %162 = OpAccessChain %_ptr_Uniform_v4float %EmitterUniforms %int_3 + %163 = OpLoad %v4float %162 + %164 = OpVectorShuffle %v2float %163 %163 0 1 + %165 = OpVectorShuffle %v2float %163 %163 2 3 + %166 = OpCompositeConstruct %v2float %146 %146 + %167 = OpFMul %v2float %165 %166 + %168 = OpFAdd %v2float %164 %167 + %169 = OpLoad %type_2d_image %CurveTexture + %170 = OpLoad %type_sampler %CurveTextureSampler + %171 = OpSampledImage %type_sampled_image %169 %170 + %172 = OpImageSampleExplicitLod %v4float %171 %168 Lod %float_0 + %173 = OpAccessChain %_ptr_Uniform_v4float %EmitterUniforms %int_4 + %174 = OpLoad %v4float %173 + %175 = OpFMul %v4float %172 %174 + %176 = OpAccessChain %_ptr_Uniform_v4float %EmitterUniforms %int_5 + %177 = OpLoad %v4float %176 + %178 = OpFAdd %v4float %175 %177 + %179 = OpCompositeExtract %float %145 0 + %180 = OpFOrdLessThan %bool %179 %float_0_5 + %181 = OpSelect %float %180 %float_0 %float_n0_5 + %182 = OpCompositeExtract %float %145 1 + %183 = OpFOrdLessThan %bool %182 %float_0_5 + %184 = OpSelect %float %183 %float_0 %float_n0_5 + %185 = OpCompositeConstruct %v2float %181 %184 + %186 = OpVectorShuffle %v2float %145 %145 0 1 + %187 = OpFAdd %v2float %186 %185 + %188 = OpFMul %v2float %187 %61 + %189 = OpVectorShuffle %v2float %178 %178 0 1 + %190 = OpAccessChain %_ptr_Uniform_v2float %EmitterDynamicUniforms %int_0 + %191 = OpLoad %v2float %190 + %192 = OpFMul %v2float %189 %191 + %193 = OpAccessChain %_ptr_Uniform_v4float %EmitterUniforms %int_6 + %194 = OpLoad %v4float %193 + %195 = OpVectorShuffle %v2float %194 %194 0 1 + %196 = OpCompositeConstruct %v2float %161 %161 + %197 = OpFMul %v2float %195 %196 + %198 = OpExtInst %v2float %1 FMax %197 %63 + %199 = OpVectorShuffle %v2float %194 %194 2 3 + %200 = OpExtInst %v2float %1 FMin %198 %199 + %201 = OpFMul %v2float %188 %192 + %202 = OpFMul %v2float %201 %200 + %203 = OpCompositeConstruct %v2float %147 %147 + %204 = OpFMul %v2float %202 %203 + %205 = OpCompositeExtract %float %145 3 + %206 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_11 + %207 = OpLoad %float %206 + %208 = OpFMul %float %205 %207 + %209 = OpCompositeExtract %float %145 2 + %210 = OpFMul %float %208 %146 + %211 = OpFAdd %float %209 %210 + %212 = OpFMul %float %211 %float_6_28318548 + %213 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_0 + %214 = OpLoad %v4float %213 + %215 = OpVectorShuffle %v3float %214 %214 0 1 2 + %216 = OpVectorShuffle %v3float %137 %108 0 0 0 + %217 = OpFMul %v3float %215 %216 + %218 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_1 + %219 = OpLoad %v4float %218 + %220 = OpVectorShuffle %v3float %219 %219 0 1 2 + %221 = OpVectorShuffle %v3float %137 %108 1 1 1 + %222 = OpFMul %v3float %220 %221 + %223 = OpFAdd %v3float %217 %222 + %224 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_2 + %225 = OpLoad %v4float %224 + %226 = OpVectorShuffle %v3float %225 %225 0 1 2 + %227 = OpVectorShuffle %v3float %137 %108 2 2 2 + %228 = OpFMul %v3float %226 %227 + %229 = OpFAdd %v3float %223 %228 + %230 = OpAccessChain %_ptr_Uniform_v4float %Primitive %int_0 %uint_3 + %231 = OpLoad %v4float %230 + %232 = OpVectorShuffle %v3float %231 %231 0 1 2 + %233 = OpFAdd %v3float %232 %124 + %234 = OpFAdd %v3float %229 %233 + %235 = OpCompositeExtract %float %234 0 + %236 = OpCompositeExtract %float %234 1 + %237 = OpCompositeExtract %float %234 2 + %238 = OpCompositeConstruct %v4float %235 %236 %237 %float_1 + %239 = OpVectorShuffle %v3float %238 %238 0 1 2 + %240 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_10 + %241 = OpLoad %float %240 + %242 = OpCompositeConstruct %v3float %241 %241 %241 + %243 = OpExtInst %v3float %1 FMix %116 %120 %242 + %244 = OpExtInst %v3float %1 FMix %114 %118 %242 + %245 = OpAccessChain %_ptr_Uniform_v4float %EmitterDynamicUniforms %int_3 + %246 = OpLoad %v4float %245 + %247 = OpVectorShuffle %v3float %246 %246 0 1 2 + %248 = OpAccessChain %_ptr_Uniform_float %EmitterDynamicUniforms %int_3 %int_3 + %249 = OpLoad %float %248 + %250 = OpCompositeConstruct %v3float %249 %249 %249 + %251 = OpExtInst %v3float %1 FMix %243 %247 %250 + %252 = OpFNegate %v3float %244 + %253 = OpAccessChain %_ptr_Uniform_v4float %EmitterDynamicUniforms %int_4 + %254 = OpLoad %v4float %253 + %255 = OpVectorShuffle %v3float %254 %254 0 1 2 + %256 = OpAccessChain %_ptr_Uniform_float %EmitterDynamicUniforms %int_4 %int_3 + %257 = OpLoad %float %256 + %258 = OpCompositeConstruct %v3float %257 %257 %257 + %259 = OpExtInst %v3float %1 FMix %252 %255 %258 + %260 = OpFSub %v3float %122 %239 + %261 = OpDot %float %260 %260 + %262 = OpExtInst %float %1 FMax %261 %float_0_00999999978 + %263 = OpExtInst %float %1 Sqrt %262 + %264 = OpCompositeConstruct %v3float %263 %263 %263 + %265 = OpFDiv %v3float %260 %264 + %266 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_9 %int_0 + %267 = OpLoad %float %266 + %268 = OpFOrdGreaterThan %bool %267 %float_0 + OpSelectionMerge %269 DontFlatten + OpBranchConditional %268 %270 %271 + %270 = OpLabel + %272 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_9 %int_1 + %273 = OpLoad %float %272 + %274 = OpFMul %float %261 %273 + %275 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_9 %int_2 + %276 = OpLoad %float %275 + %277 = OpFSub %float %274 %276 + %278 = OpExtInst %float %1 FClamp %277 %float_0 %float_1 + %279 = OpExtInst %v3float %1 Cross %265 %82 + %280 = OpDot %float %279 %279 + %281 = OpExtInst %float %1 FMax %280 %float_0_00999999978 + %282 = OpExtInst %float %1 Sqrt %281 + %283 = OpCompositeConstruct %v3float %282 %282 %282 + %284 = OpFDiv %v3float %279 %283 + %285 = OpExtInst %v3float %1 Cross %265 %284 + %286 = OpCompositeConstruct %v3float %278 %278 %278 + %287 = OpExtInst %v3float %1 FMix %251 %284 %286 + %288 = OpExtInst %v3float %1 Normalize %287 + %289 = OpExtInst %v3float %1 FMix %259 %285 %286 + %290 = OpExtInst %v3float %1 Normalize %289 + OpBranch %269 + %271 = OpLabel + %291 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_8 %int_1 + %292 = OpLoad %float %291 + %293 = OpFOrdGreaterThan %bool %292 %float_0 + OpSelectionMerge %294 Flatten + OpBranchConditional %293 %295 %296 + %295 = OpLabel + %297 = OpExtInst %v3float %1 Cross %265 %160 + %298 = OpDot %float %297 %297 + %299 = OpExtInst %float %1 FMax %298 %float_0_00999999978 + %300 = OpExtInst %float %1 Sqrt %299 + %301 = OpCompositeConstruct %v3float %300 %300 %300 + %302 = OpFDiv %v3float %297 %301 + %303 = OpFNegate %v3float %160 + OpBranch %294 + %296 = OpLabel + %304 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_8 %int_2 + %305 = OpLoad %float %304 + %306 = OpFOrdGreaterThan %bool %305 %float_0 + OpSelectionMerge %307 None + OpBranchConditional %306 %308 %309 + %308 = OpLabel + %310 = OpExtInst %v3float %1 Cross %247 %265 + %311 = OpDot %float %310 %310 + %312 = OpExtInst %float %1 FMax %311 %float_0_00999999978 + %313 = OpExtInst %float %1 Sqrt %312 + %314 = OpCompositeConstruct %v3float %313 %313 %313 + %315 = OpFDiv %v3float %310 %314 + %316 = OpFNegate %v3float %315 + OpBranch %307 + %309 = OpLabel + %317 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_8 %int_3 + %318 = OpLoad %float %317 + %319 = OpFOrdGreaterThan %bool %318 %float_0 + OpSelectionMerge %320 None + OpBranchConditional %319 %321 %320 + %321 = OpLabel + %322 = OpExtInst %v3float %1 Cross %265 %82 + %323 = OpDot %float %322 %322 + %324 = OpExtInst %float %1 FMax %323 %float_0_00999999978 + %325 = OpExtInst %float %1 Sqrt %324 + %326 = OpCompositeConstruct %v3float %325 %325 %325 + %327 = OpFDiv %v3float %322 %326 + %328 = OpExtInst %v3float %1 Cross %265 %327 + OpBranch %320 + %320 = OpLabel + %329 = OpPhi %v3float %251 %309 %327 %321 + %330 = OpPhi %v3float %259 %309 %328 %321 + OpBranch %307 + %307 = OpLabel + %331 = OpPhi %v3float %247 %308 %329 %320 + %332 = OpPhi %v3float %316 %308 %330 %320 + OpBranch %294 + %294 = OpLabel + %333 = OpPhi %v3float %302 %295 %331 %307 + %334 = OpPhi %v3float %303 %295 %332 %307 + OpBranch %269 + %269 = OpLabel + %335 = OpPhi %v3float %288 %270 %333 %294 + %336 = OpPhi %v3float %290 %270 %334 %294 + %337 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_12 + %338 = OpLoad %float %337 + %339 = OpFAdd %float %212 %338 + %340 = OpExtInst %float %1 Sin %339 + %341 = OpExtInst %float %1 Cos %339 + %342 = OpCompositeConstruct %v3float %340 %340 %340 + %343 = OpFMul %v3float %342 %336 + %344 = OpCompositeConstruct %v3float %341 %341 %341 + %345 = OpFMul %v3float %344 %335 + %346 = OpFAdd %v3float %343 %345 + %347 = OpFMul %v3float %344 %336 + %348 = OpFMul %v3float %342 %335 + %349 = OpFSub %v3float %347 %348 + %350 = OpCompositeExtract %float %204 0 + %351 = OpCompositeExtract %float %112 0 + %352 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_15 %int_0 + %353 = OpLoad %float %352 + %354 = OpFAdd %float %351 %353 + %355 = OpFMul %float %350 %354 + %356 = OpCompositeConstruct %v3float %355 %355 %355 + %357 = OpFMul %v3float %356 %346 + %358 = OpCompositeExtract %float %204 1 + %359 = OpCompositeExtract %float %112 1 + %360 = OpAccessChain %_ptr_Uniform_float %EmitterUniforms %int_15 %int_1 + %361 = OpLoad %float %360 + %362 = OpFAdd %float %359 %361 + %363 = OpFMul %float %358 %362 + %364 = OpCompositeConstruct %v3float %363 %363 %363 + %365 = OpFMul %v3float %364 %349 + %366 = OpFAdd %v3float %357 %365 + %367 = OpFAdd %v3float %239 %366 + %368 = OpCompositeExtract %float %367 0 + %369 = OpCompositeExtract %float %367 1 + %370 = OpCompositeExtract %float %367 2 + %371 = OpCompositeConstruct %v4float %368 %369 %370 %float_1 + %372 = OpVectorShuffle %v4float %371 %371 4 5 6 3 + %373 = OpAccessChain %_ptr_Uniform_mat4v4float %MobileShadowDepthPass %int_20 + %374 = OpLoad %mat4v4float %373 + %375 = OpMatrixTimesVector %v4float %374 %372 + %376 = OpAccessChain %_ptr_Uniform_float %MobileShadowDepthPass %int_22 + %377 = OpLoad %float %376 + %378 = OpFOrdGreaterThan %bool %377 %float_0 + %379 = OpCompositeExtract %float %375 2 + %380 = OpFOrdLessThan %bool %379 %float_0 + %381 = OpLogicalAnd %bool %378 %380 + OpSelectionMerge %382 None + OpBranchConditional %381 %383 %382 + %383 = OpLabel + %384 = OpCompositeInsert %v4float %float_9_99999997en07 %375 2 + %385 = OpCompositeInsert %v4float %float_1 %384 3 + OpBranch %382 + %382 = OpLabel + %386 = OpPhi %v4float %375 %269 %385 %383 + %387 = OpAccessChain %_ptr_Uniform_float %MobileShadowDepthPass %int_21 %int_0 + %388 = OpLoad %float %387 + %389 = OpAccessChain %_ptr_Uniform_float %MobileShadowDepthPass %int_21 %int_1 + %390 = OpLoad %float %389 + %391 = OpCompositeExtract %float %386 2 + %392 = OpFMul %float %391 %390 + %393 = OpFAdd %float %392 %388 + %394 = OpCompositeExtract %float %386 3 + %395 = OpFMul %float %393 %394 + %396 = OpCompositeInsert %v4float %395 %386 2 + OpStore %out_var_TEXCOORD6 %float_0 + OpStore %gl_Position %396 + OpReturn + OpFunctionEnd diff --git a/3rdparty/spirv-cross/spirv_common.hpp b/3rdparty/spirv-cross/spirv_common.hpp index c1c6fc812..e6a29a19b 100644 --- a/3rdparty/spirv-cross/spirv_common.hpp +++ b/3rdparty/spirv-cross/spirv_common.hpp @@ -938,11 +938,6 @@ struct SPIRFunction : IVariant // Intentionally not a small vector, this one is rare, and std::function can be large. Vector> fixup_hooks_in; - // On function entry, make sure to copy a constant array into thread addr space to work around - // the case where we are passing a constant array by value to a function on backends which do not - // consider arrays value types. - SmallVector constant_arrays_needed_on_stack; - bool active = false; bool flush_undeclared = true; bool do_combined_parameters = true; diff --git a/3rdparty/spirv-cross/spirv_cross.cpp b/3rdparty/spirv-cross/spirv_cross.cpp index c73ecdf10..d383433dc 100644 --- a/3rdparty/spirv-cross/spirv_cross.cpp +++ b/3rdparty/spirv-cross/spirv_cross.cpp @@ -2729,6 +2729,12 @@ void Compiler::AnalyzeVariableScopeAccessHandler::notify_variable_access(uint32_ if (id == 0) return; + // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. + auto itr = access_chain_children.find(id); + if (itr != end(access_chain_children)) + for (auto child_id : itr->second) + notify_variable_access(child_id, block); + if (id_is_phi_variable(id)) accessed_variables_to_block[id].insert(block); else if (id_is_potential_temporary(id)) @@ -2793,14 +2799,21 @@ bool Compiler::AnalyzeVariableScopeAccessHandler::handle(spv::Op op, const uint3 if (length < 3) return false; + // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. uint32_t ptr = args[2]; auto *var = compiler.maybe_get(ptr); if (var) + { accessed_variables_to_block[var->self].insert(current_block->self); + access_chain_children[args[1]].insert(var->self); + } // args[2] might be another access chain we have to track use of. for (uint32_t i = 2; i < length; i++) + { notify_variable_access(args[i], current_block->self); + access_chain_children[args[1]].insert(args[i]); + } // Also keep track of the access chain pointer itself. // In exceptionally rare cases, we can end up with a case where @@ -3290,6 +3303,7 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry, AnalyzeVariableScopeA DominatorBuilder builder(cfg); bool force_temporary = false; + bool used_in_header_hoisted_continue_block = false; // Figure out which block is dominating all accesses of those temporaries. auto &blocks = var.second; @@ -3304,10 +3318,8 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry, AnalyzeVariableScopeA // This is moot for complex loops however. auto &loop_header_block = get(ir.continue_block_to_loop_header[block]); assert(loop_header_block.merge == SPIRBlock::MergeLoop); - - // Only relevant if the loop is not marked as complex. - if (!loop_header_block.complex_continue) - builder.add_block(loop_header_block.self); + builder.add_block(loop_header_block.self); + used_in_header_hoisted_continue_block = true; } } @@ -3332,11 +3344,22 @@ void Compiler::analyze_variable_scope(SPIRFunction &entry, AnalyzeVariableScopeA { // Exceptionally rare case. // We cannot declare temporaries of access chains (except on MSL perhaps with pointers). - // Rather than do that, we force a complex loop to make sure access chains are created and consumed - // in expected order. - auto &loop_header_block = get(dominating_block); - assert(loop_header_block.merge == SPIRBlock::MergeLoop); - loop_header_block.complex_continue = true; + // Rather than do that, we force the indexing expressions to be declared in the right scope by + // tracking their usage to that end. There is no temporary to hoist. + // However, we still need to observe declaration order of the access chain. + + if (used_in_header_hoisted_continue_block) + { + // For this scenario, we used an access chain inside a continue block where we also registered an access to header block. + // This is a problem as we need to declare an access chain properly first with full definition. + // We cannot use temporaries for these expressions, + // so we must make sure the access chain is declared ahead of time. + // Force a complex for loop to deal with this. + // TODO: Out-of-order declaring for loops where continue blocks are emitted last might be another option. + auto &loop_header_block = get(dominating_block); + assert(loop_header_block.merge == SPIRBlock::MergeLoop); + loop_header_block.complex_continue = true; + } } else { @@ -3773,6 +3796,13 @@ void Compiler::analyze_image_and_sampler_usage() CombinedImageSamplerUsageHandler handler(*this, dref_handler.dref_combined_samplers); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); + + // Need to run this traversal twice. First time, we propagate any comparison sampler usage from leaf functions + // down to main(). + // In the second pass, we can propagate up forced depth state coming from main() up into leaf functions. + handler.dependency_hierarchy.clear(); + traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); + comparison_ids = move(handler.comparison_ids); need_subpass_input = handler.need_subpass_input; @@ -3888,6 +3918,14 @@ bool Compiler::CFGBuilder::follow_function_call(const SPIRFunction &func) return false; } +void Compiler::CombinedImageSamplerUsageHandler::add_dependency(uint32_t dst, uint32_t src) +{ + dependency_hierarchy[dst].insert(src); + // Propagate up any comparison state if we're loading from one such variable. + if (comparison_ids.count(src)) + comparison_ids.insert(dst); +} + bool Compiler::CombinedImageSamplerUsageHandler::begin_function_scope(const uint32_t *args, uint32_t length) { if (length < 3) @@ -3900,7 +3938,7 @@ bool Compiler::CombinedImageSamplerUsageHandler::begin_function_scope(const uint for (uint32_t i = 0; i < length; i++) { auto &argument = func.arguments[i]; - dependency_hierarchy[argument.id].insert(arg[i]); + add_dependency(argument.id, arg[i]); } return true; @@ -3910,6 +3948,7 @@ void Compiler::CombinedImageSamplerUsageHandler::add_hierarchy_to_comparison_ids { // Traverse the variable dependency hierarchy and tag everything in its path with comparison ids. comparison_ids.insert(id); + for (auto &dep_id : dependency_hierarchy[id]) add_hierarchy_to_comparison_ids(dep_id); } @@ -3925,7 +3964,8 @@ bool Compiler::CombinedImageSamplerUsageHandler::handle(Op opcode, const uint32_ { if (length < 3) return false; - dependency_hierarchy[args[1]].insert(args[2]); + + add_dependency(args[1], args[2]); // Ideally defer this to OpImageRead, but then we'd need to track loaded IDs. // If we load an image, we're going to use it and there is little harm in declaring an unused gl_FragCoord. @@ -3947,14 +3987,17 @@ bool Compiler::CombinedImageSamplerUsageHandler::handle(Op opcode, const uint32_ uint32_t result_type = args[0]; uint32_t result_id = args[1]; auto &type = compiler.get(result_type); + + // If the underlying resource has been used for comparison then duplicate loads of that resource must be too. + // This image must be a depth image. + uint32_t image = args[2]; + uint32_t sampler = args[3]; + if (type.image.depth || dref_combined_samplers.count(result_id) != 0) { - // This image must be a depth image. - uint32_t image = args[2]; add_hierarchy_to_comparison_ids(image); // This sampler must be a SamplerComparisonState, and not a regular SamplerState. - uint32_t sampler = args[3]; add_hierarchy_to_comparison_ids(sampler); // Mark the OpSampledImage itself as being comparison state. diff --git a/3rdparty/spirv-cross/spirv_cross.hpp b/3rdparty/spirv-cross/spirv_cross.hpp index 7385a6c33..73d9085c9 100644 --- a/3rdparty/spirv-cross/spirv_cross.hpp +++ b/3rdparty/spirv-cross/spirv_cross.hpp @@ -888,6 +888,7 @@ protected: void add_hierarchy_to_comparison_ids(uint32_t ids); bool need_subpass_input = false; + void add_dependency(uint32_t dst, uint32_t src); }; void build_function_control_flow_graphs_and_analyze(); @@ -925,6 +926,8 @@ protected: std::unordered_map> complete_write_variables_to_block; std::unordered_map> partial_write_variables_to_block; std::unordered_set access_chain_expressions; + // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. + std::unordered_map> access_chain_children; const SPIRBlock *current_block = nullptr; }; diff --git a/3rdparty/spirv-cross/spirv_glsl.cpp b/3rdparty/spirv-cross/spirv_glsl.cpp index bcdcd5f15..97ad0ef1c 100644 --- a/3rdparty/spirv-cross/spirv_glsl.cpp +++ b/3rdparty/spirv-cross/spirv_glsl.cpp @@ -324,6 +324,9 @@ void CompilerGLSL::reset() forwarded_temporaries.clear(); suppressed_usage_tracking.clear(); + // Ensure that we declare phi-variable copies even if the original declaration isn't deferred + flushed_phi_variables.clear(); + reset_name_caches(); ir.for_each_typed_id([&](uint32_t, SPIRFunction &func) { @@ -502,6 +505,7 @@ string CompilerGLSL::compile() backend.allow_precision_qualifiers = true; backend.force_gl_in_out_block = true; backend.supports_extensions = true; + backend.use_array_constructor = true; // Scan the SPIR-V to find trivial uses of extensions. fixup_type_alias(); @@ -3394,11 +3398,19 @@ string CompilerGLSL::constant_expression(const SPIRConstant &c) { // Handles Arrays and structures. string res; + + // Allow Metal to use the array template to make arrays a value type + bool needs_trailing_tracket = false; if (backend.use_initializer_list && backend.use_typed_initializer_list && type.basetype == SPIRType::Struct && type.array.empty()) { res = type_to_glsl_constructor(type) + "{ "; } + else if (backend.use_initializer_list && backend.use_typed_initializer_list && !type.array.empty()) + { + res = type_to_glsl_constructor(type) + "({ "; + needs_trailing_tracket = true; + } else if (backend.use_initializer_list) { res = "{ "; @@ -3421,8 +3433,23 @@ string CompilerGLSL::constant_expression(const SPIRConstant &c) } res += backend.use_initializer_list ? " }" : ")"; + if (needs_trailing_tracket) + res += ")"; + return res; } + else if (type.basetype == SPIRType::Struct && type.member_types.size() == 0) + { + // Metal tessellation likes empty structs which are then constant expressions. + if (backend.supports_empty_struct) + return "{ }"; + else if (backend.use_typed_initializer_list) + return join(type_to_glsl(get(c.constant_type)), "{ 0 }"); + else if (backend.use_initializer_list) + return "{ 0 }"; + else + return join(type_to_glsl(get(c.constant_type)), "(0)"); + } else if (c.columns() == 1) { return constant_expression_vector(c, 0); @@ -6586,6 +6613,36 @@ const char *CompilerGLSL::index_to_swizzle(uint32_t index) } } +void CompilerGLSL::access_chain_internal_append_index(std::string &expr, uint32_t /*base*/, const SPIRType *type, + AccessChainFlags flags, bool & /*access_chain_is_arrayed*/, + uint32_t index) +{ + bool index_is_literal = (flags & ACCESS_CHAIN_INDEX_IS_LITERAL_BIT) != 0; + bool register_expression_read = (flags & ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT) == 0; + + expr += "["; + + // If we are indexing into an array of SSBOs or UBOs, we need to index it with a non-uniform qualifier. + bool nonuniform_index = + has_decoration(index, DecorationNonUniformEXT) && + (has_decoration(type->self, DecorationBlock) || has_decoration(type->self, DecorationBufferBlock)); + if (nonuniform_index) + { + expr += backend.nonuniform_qualifier; + expr += "("; + } + + if (index_is_literal) + expr += convert_to_string(index); + else + expr += to_expression(index, register_expression_read); + + if (nonuniform_index) + expr += ")"; + + expr += "]"; +} + string CompilerGLSL::access_chain_internal(uint32_t base, const uint32_t *indices, uint32_t count, AccessChainFlags flags, AccessChainMeta *meta) { @@ -6637,27 +6694,7 @@ string CompilerGLSL::access_chain_internal(uint32_t base, const uint32_t *indice bool dimension_flatten = false; const auto append_index = [&](uint32_t index) { - expr += "["; - - // If we are indexing into an array of SSBOs or UBOs, we need to index it with a non-uniform qualifier. - bool nonuniform_index = - has_decoration(index, DecorationNonUniformEXT) && - (has_decoration(type->self, DecorationBlock) || has_decoration(type->self, DecorationBufferBlock)); - if (nonuniform_index) - { - expr += backend.nonuniform_qualifier; - expr += "("; - } - - if (index_is_literal) - expr += convert_to_string(index); - else - expr += to_expression(index, register_expression_read); - - if (nonuniform_index) - expr += ")"; - - expr += "]"; + access_chain_internal_append_index(expr, base, type, flags, access_chain_is_arrayed, index); }; for (uint32_t i = 0; i < count; i++) @@ -6780,7 +6817,9 @@ string CompilerGLSL::access_chain_internal(uint32_t base, const uint32_t *indice if (!pending_array_enclose) expr += "]"; } - else + // Some builtins are arrays in SPIR-V but not in other languages, e.g. gl_SampleMask[] is an array in SPIR-V but not in Metal. + // By throwing away the index, we imply the index was 0, which it must be for gl_SampleMask. + else if (!builtin_translates_to_nonarray(BuiltIn(get_decoration(base, DecorationBuiltIn)))) { append_index(index); } @@ -7502,23 +7541,29 @@ string CompilerGLSL::variable_decl_function_local(SPIRVariable &var) void CompilerGLSL::emit_variable_temporary_copies(const SPIRVariable &var) { - if (var.allocate_temporary_copy) + // Ensure that we declare phi-variable copies even if the original declaration isn't deferred + if (var.allocate_temporary_copy && !flushed_phi_variables.count(var.self)) { auto &type = get(var.basetype); auto &flags = get_decoration_bitset(var.self); statement(flags_to_qualifiers_glsl(type, flags), variable_decl(type, join("_", var.self, "_copy")), ";"); + flushed_phi_variables.insert(var.self); } } void CompilerGLSL::flush_variable_declaration(uint32_t id) { + // Ensure that we declare phi-variable copies even if the original declaration isn't deferred auto *var = maybe_get(id); if (var && var->deferred_declaration) { statement(variable_decl_function_local(*var), ";"); - emit_variable_temporary_copies(*var); var->deferred_declaration = false; } + if (var) + { + emit_variable_temporary_copies(*var); + } } bool CompilerGLSL::remove_duplicate_swizzle(string &op) @@ -8293,11 +8338,19 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction) string constructor_op; if (backend.use_initializer_list && composite) { + bool needs_trailing_tracket = false; // Only use this path if we are building composites. // This path cannot be used for arithmetic. if (backend.use_typed_initializer_list && out_type.basetype == SPIRType::Struct && out_type.array.empty()) constructor_op += type_to_glsl_constructor(get(result_type)); + else if (backend.use_typed_initializer_list && !out_type.array.empty()) + { + // MSL path. Array constructor is baked into type here, do not use _constructor variant. + constructor_op += type_to_glsl_constructor(get(result_type)) + "("; + needs_trailing_tracket = true; + } constructor_op += "{ "; + if (type_is_empty(out_type) && !backend.supports_empty_struct) constructor_op += "0"; else if (splat) @@ -8305,6 +8358,8 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction) else constructor_op += build_composite_combiner(result_type, elems, length); constructor_op += " }"; + if (needs_trailing_tracket) + constructor_op += ")"; } else if (swizzle_splat && !composite) { @@ -9650,11 +9705,18 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction) { uint32_t result_type = ops[0]; uint32_t id = ops[1]; - auto &e = set(id, join(to_expression(ops[2]), ", ", to_expression(ops[3])), result_type, true); + + auto coord_expr = to_expression(ops[3]); + auto target_coord_type = expression_type(ops[3]); + target_coord_type.basetype = SPIRType::Int; + coord_expr = bitcast_expression(target_coord_type, expression_type(ops[3]).basetype, coord_expr); + + auto &e = set(id, join(to_expression(ops[2]), ", ", coord_expr), result_type, true); // When using the pointer, we need to know which variable it is actually loaded from. auto *var = maybe_get_backing_variable(ops[2]); e.loaded_from = var ? var->self : ID(0); + inherit_expression_dependencies(id, ops[3]); break; } @@ -10870,7 +10932,7 @@ string CompilerGLSL::image_type_glsl(const SPIRType &type, uint32_t id) string CompilerGLSL::type_to_glsl_constructor(const SPIRType &type) { - if (type.array.size() > 1) + if (backend.use_array_constructor && type.array.size() > 1) { if (options.flatten_multidimensional_arrays) SPIRV_CROSS_THROW("Cannot flatten constructors of multidimensional array constructors, e.g. float[][]()."); @@ -10881,8 +10943,11 @@ string CompilerGLSL::type_to_glsl_constructor(const SPIRType &type) } auto e = type_to_glsl(type); - for (uint32_t i = 0; i < type.array.size(); i++) - e += "[]"; + if (backend.use_array_constructor) + { + for (uint32_t i = 0; i < type.array.size(); i++) + e += "[]"; + } return e; } @@ -11121,6 +11186,11 @@ void CompilerGLSL::flatten_buffer_block(VariableID id) flattened_buffer_blocks.insert(id); } +bool CompilerGLSL::builtin_translates_to_nonarray(spv::BuiltIn /*builtin*/) const +{ + return false; // GLSL itself does not need to translate array builtin types to non-array builtin types +} + bool CompilerGLSL::check_atomic_image(uint32_t id) { auto &type = expression_type(id); @@ -11310,14 +11380,6 @@ void CompilerGLSL::emit_function(SPIRFunction &func, const Bitset &return_flags) current_function = &func; auto &entry_block = get(func.entry_block); - sort(begin(func.constant_arrays_needed_on_stack), end(func.constant_arrays_needed_on_stack)); - for (auto &array : func.constant_arrays_needed_on_stack) - { - auto &c = get(array); - auto &type = get(c.constant_type); - statement(variable_decl(type, join("_", array, "_array_copy")), " = ", constant_expression(c), ";"); - } - for (auto &v : func.local_variables) { auto &var = get(v); diff --git a/3rdparty/spirv-cross/spirv_glsl.hpp b/3rdparty/spirv-cross/spirv_glsl.hpp index 6f59bd82f..709a9abb6 100644 --- a/3rdparty/spirv-cross/spirv_glsl.hpp +++ b/3rdparty/spirv-cross/spirv_glsl.hpp @@ -273,6 +273,8 @@ protected: virtual std::string unpack_expression_type(std::string expr_str, const SPIRType &type, uint32_t physical_type_id, bool packed_type, bool row_major); + virtual bool builtin_translates_to_nonarray(spv::BuiltIn builtin) const; + StringStream<> buffer; template @@ -338,11 +340,12 @@ protected: Options options; - std::string type_to_array_glsl(const SPIRType &type); + virtual std::string type_to_array_glsl( + const SPIRType &type); // Allow Metal to use the array template to make arrays a value type std::string to_array_size(const SPIRType &type, uint32_t index); uint32_t to_array_size_literal(const SPIRType &type, uint32_t index) const; uint32_t to_array_size_literal(const SPIRType &type) const; - std::string variable_decl(const SPIRVariable &variable); + virtual std::string variable_decl(const SPIRVariable &variable); // Threadgroup arrays can't have a wrapper type std::string variable_decl_function_local(SPIRVariable &variable); void add_local_variable_name(uint32_t id); @@ -414,6 +417,7 @@ protected: bool native_pointers = false; bool support_small_type_sampling_result = false; bool support_case_fallthrough = true; + bool use_array_constructor = false; } backend; void emit_struct(SPIRType &type); @@ -488,6 +492,9 @@ protected: SPIRExpression &emit_op(uint32_t result_type, uint32_t result_id, const std::string &rhs, bool forward_rhs, bool suppress_usage_tracking = false); + void access_chain_internal_append_index(std::string &expr, uint32_t base, const SPIRType *type, + AccessChainFlags flags, bool &access_chain_is_arrayed, uint32_t index); + std::string access_chain_internal(uint32_t base, const uint32_t *indices, uint32_t count, AccessChainFlags flags, AccessChainMeta *meta); @@ -586,6 +593,9 @@ protected: std::unordered_set emitted_functions; + // Ensure that we declare phi-variable copies even if the original declaration isn't deferred + std::unordered_set flushed_phi_variables; + std::unordered_set flattened_buffer_blocks; std::unordered_set flattened_structs; diff --git a/3rdparty/spirv-cross/spirv_hlsl.cpp b/3rdparty/spirv-cross/spirv_hlsl.cpp index 4d4e276c5..5045d2ea8 100644 --- a/3rdparty/spirv-cross/spirv_hlsl.cpp +++ b/3rdparty/spirv-cross/spirv_hlsl.cpp @@ -4562,6 +4562,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction) // When using the pointer, we need to know which variable it is actually loaded from. auto *var = maybe_get_backing_variable(ops[2]); e.loaded_from = var ? var->self : ID(0); + inherit_expression_dependencies(id, ops[3]); break; } diff --git a/3rdparty/spirv-cross/spirv_msl.cpp b/3rdparty/spirv-cross/spirv_msl.cpp index 6839a2ba6..bc79e55be 100644 --- a/3rdparty/spirv-cross/spirv_msl.cpp +++ b/3rdparty/spirv-cross/spirv_msl.cpp @@ -27,6 +27,7 @@ using namespace std; static const uint32_t k_unknown_location = ~0u; static const uint32_t k_unknown_component = ~0u; +static const char *force_inline = "static inline __attribute__((always_inline))"; CompilerMSL::CompilerMSL(std::vector spirv_) : CompilerGLSL(move(spirv_)) @@ -121,6 +122,11 @@ void CompilerMSL::set_fragment_output_components(uint32_t location, uint32_t com fragment_output_components[location] = components; } +bool CompilerMSL::builtin_translates_to_nonarray(spv::BuiltIn builtin) const +{ + return (builtin == BuiltInSampleMask); +} + void CompilerMSL::build_implicit_builtins() { bool need_sample_pos = active_input_builtins.get(BuiltInSamplePosition); @@ -157,8 +163,10 @@ void CompilerMSL::build_implicit_builtins() if (var.storage != StorageClassInput || !ir.meta[var.self].decoration.builtin) return; + // Use Metal's native frame-buffer fetch API for subpass inputs. BuiltIn builtin = ir.meta[var.self].decoration.builtin_type; - if (need_subpass_input && builtin == BuiltInFragCoord) + if (need_subpass_input && (!msl_options.is_ios() || !msl_options.ios_use_framebuffer_fetch_subpasses) && + builtin == BuiltInFragCoord) { builtin_frag_coord_id = var.self; has_frag_coord = true; @@ -226,17 +234,19 @@ void CompilerMSL::build_implicit_builtins() if (need_multiview) { - if (builtin == BuiltInInstanceIndex) + switch (builtin) { + case BuiltInInstanceIndex: // The view index here is derived from the instance index. builtin_instance_idx_id = var.self; has_instance_idx = true; - } - - if (builtin == BuiltInViewIndex) - { + break; + case BuiltInViewIndex: builtin_view_idx_id = var.self; has_view_idx = true; + break; + default: + break; } } @@ -248,7 +258,9 @@ void CompilerMSL::build_implicit_builtins() workgroup_id_type = var.basetype; }); - if (!has_frag_coord && need_subpass_input) + // Use Metal's native frame-buffer fetch API for subpass inputs. + if (!has_frag_coord && (!msl_options.is_ios() || !msl_options.ios_use_framebuffer_fetch_subpasses) && + need_subpass_input) { uint32_t offset = ir.increase_bound_by(3); uint32_t type_id = offset; @@ -579,6 +591,35 @@ void CompilerMSL::build_implicit_builtins() } } +// Checks if the specified builtin variable (e.g. gl_InstanceIndex) is marked as active. +// If not, it marks it as active and forces a recompilation. +// This might be used when the optimization of inactive builtins was too optimistic (e.g. when "spvOut" is emitted). +void CompilerMSL::ensure_builtin(spv::StorageClass storage, spv::BuiltIn builtin) +{ + Bitset *active_builtins = nullptr; + switch (storage) + { + case StorageClassInput: + active_builtins = &active_input_builtins; + break; + + case StorageClassOutput: + active_builtins = &active_output_builtins; + break; + + default: + break; + } + + // At this point, the specified builtin variable must have already been declared in the entry point. + // If not, mark as active and force recompile. + if (active_builtins != nullptr && !active_builtins->get(builtin)) + { + active_builtins->set(builtin); + force_recompile(); + } +} + void CompilerMSL::mark_implicit_builtin(StorageClass storage, BuiltIn builtin, uint32_t id) { Bitset *active_builtins = nullptr; @@ -685,6 +726,8 @@ std::string CompilerMSL::get_tess_factor_struct_name() void CompilerMSL::emit_entry_point_declarations() { // FIXME: Get test coverage here ... + // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries + declare_complex_constant_arrays(); // Emit constexpr samplers here. for (auto &samp : constexpr_samplers_by_id) @@ -841,8 +884,10 @@ void CompilerMSL::emit_entry_point_declarations() SPIRV_CROSS_THROW("Runtime arrays with dynamic offsets are not supported yet."); else { + use_builtin_array = true; statement(get_argument_address_space(var), " ", type_to_glsl(type), "* ", to_restrict(var_id), name, type_to_array_glsl(type), " ="); + uint32_t dim = uint32_t(type.array.size()); uint32_t j = 0; for (SmallVector indices(type.array.size()); @@ -870,6 +915,7 @@ void CompilerMSL::emit_entry_point_declarations() } end_scope_decl(); statement_no_indent(""); + use_builtin_array = false; } } else @@ -886,8 +932,10 @@ void CompilerMSL::emit_entry_point_declarations() { const auto &var = get(array_id); const auto &type = get_variable_data_type(var); + const auto &buffer_type = get_variable_element_type(var); string name = to_name(array_id); - statement(get_argument_address_space(var), " ", type_to_glsl(type), "* ", to_restrict(array_id), name, "[] ="); + statement(get_argument_address_space(var), " ", type_to_glsl(buffer_type), "* ", to_restrict(array_id), name, + "[] ="); begin_scope(); for (uint32_t i = 0; i < to_array_size_literal(type); ++i) statement(name, "_", i, ","); @@ -925,13 +973,14 @@ string CompilerMSL::compile() backend.native_row_major_matrix = false; backend.unsized_array_supported = false; backend.can_declare_arrays_inline = false; - backend.can_return_array = false; + backend.can_return_array = true; // <-- Allow Metal to use the array template backend.allow_truncated_access_chain = true; - backend.array_is_value_type = false; + backend.array_is_value_type = true; // <-- Allow Metal to use the array template to make arrays a value type backend.comparison_image_samples_scalar = true; backend.native_pointers = true; backend.nonuniform_qualifier = ""; backend.support_small_type_sampling_result = true; + backend.supports_empty_struct = true; capture_output_to_buffer = msl_options.capture_output_to_buffer; is_rasterization_disabled = msl_options.disable_rasterization || capture_output_to_buffer; @@ -1025,6 +1074,7 @@ string CompilerMSL::compile() buffer.reset(); emit_header(); + emit_custom_templates(); emit_specialization_constants_and_structs(); emit_resources(); emit_custom_functions(); @@ -1153,8 +1203,10 @@ void CompilerMSL::extract_global_variables_from_function(uint32_t func_id, std:: if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); + // Use Metal's native frame-buffer fetch API for subpass inputs. auto &type = get(ops[0]); - if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData) + if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData && + (!msl_options.is_ios() || !msl_options.ios_use_framebuffer_fetch_subpasses)) { // Implicitly reads gl_FragCoord. assert(builtin_frag_coord_id != 0); @@ -1202,6 +1254,20 @@ void CompilerMSL::extract_global_variables_from_function(uint32_t func_id, std:: break; } + // Emulate texture2D atomic operations + case OpImageTexelPointer: + { + // When using the pointer, we need to know which variable it is actually loaded from. + uint32_t base_id = ops[2]; + auto *var = maybe_get_backing_variable(base_id); + if (var && atomic_image_vars.count(var->self)) + { + if (global_var_ids.find(base_id) != global_var_ids.end()) + added_arg_ids.insert(base_id); + } + break; + } + default: break; } @@ -1545,10 +1611,13 @@ void CompilerMSL::add_composite_variable_to_interface_block(StorageClass storage if (is_builtin) set_name(var.self, builtin_to_glsl(builtin, StorageClassFunction)); - entry_func.add_local_variable(var.self); - - // We need to declare the variable early and at entry-point scope. - vars_needing_early_declaration.push_back(var.self); + // Only flatten/unflatten IO composites for non-tessellation cases where arrays are not stripped. + if (!strip_array) + { + entry_func.add_local_variable(var.self); + // We need to declare the variable early and at entry-point scope. + vars_needing_early_declaration.push_back(var.self); + } for (uint32_t i = 0; i < elem_cnt; i++) { @@ -1618,6 +1687,7 @@ void CompilerMSL::add_composite_variable_to_interface_block(StorageClass storage set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceOrigID, var.self); + // Only flatten/unflatten IO composites for non-tessellation cases where arrays are not stripped. if (!strip_array) { switch (storage) @@ -2125,60 +2195,37 @@ void CompilerMSL::add_variable_to_interface_block(StorageClass storage, const st void CompilerMSL::fix_up_interface_member_indices(StorageClass storage, uint32_t ib_type_id) { // Only needed for tessellation shaders. + // Need to redirect interface indices back to variables themselves. + // For structs, each member of the struct need a separate instance. if (get_execution_model() != ExecutionModelTessellationControl && !(get_execution_model() == ExecutionModelTessellationEvaluation && storage == StorageClassInput)) return; - bool in_array = false; - for (uint32_t i = 0; i < ir.meta[ib_type_id].members.size(); i++) + auto mbr_cnt = uint32_t(ir.meta[ib_type_id].members.size()); + for (uint32_t i = 0; i < mbr_cnt; i++) { uint32_t var_id = get_extended_member_decoration(ib_type_id, i, SPIRVCrossDecorationInterfaceOrigID); if (!var_id) continue; auto &var = get(var_id); - // Unfortunately, all this complexity is needed to handle flattened structs and/or - // arrays. - if (storage == StorageClassInput) + auto &type = get_variable_element_type(var); + if (storage == StorageClassInput && type.basetype == SPIRType::Struct) { - auto &type = get_variable_element_type(var); - if (is_array(type) || is_matrix(type)) - { - if (in_array) - continue; - in_array = true; - set_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex, i); - } - else - { - if (type.basetype == SPIRType::Struct) - { - uint32_t mbr_idx = - get_extended_member_decoration(ib_type_id, i, SPIRVCrossDecorationInterfaceMemberIndex); - auto &mbr_type = get(type.member_types[mbr_idx]); + uint32_t mbr_idx = get_extended_member_decoration(ib_type_id, i, SPIRVCrossDecorationInterfaceMemberIndex); - if (is_array(mbr_type) || is_matrix(mbr_type)) - { - if (in_array) - continue; - in_array = true; - set_extended_member_decoration(var_id, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex, i); - } - else - { - in_array = false; - set_extended_member_decoration(var_id, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex, i); - } - } - else - { - in_array = false; - set_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex, i); - } - } + // Only set the lowest InterfaceMemberIndex for each variable member. + // IB struct members will be emitted in-order w.r.t. interface member index. + if (!has_extended_member_decoration(var_id, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex)) + set_extended_member_decoration(var_id, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex, i); } else - set_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex, i); + { + // Only set the lowest InterfaceMemberIndex for each variable. + // IB struct members will be emitted in-order w.r.t. interface member index. + if (!has_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex)) + set_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex, i); + } } } @@ -2314,11 +2361,21 @@ uint32_t CompilerMSL::add_interface_block(StorageClass storage, bool patch) { // The first member of the indirect buffer is always the number of vertices // to draw. - statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", - output_buffer_var_name, "[(", to_expression(builtin_instance_idx_id), " - ", - to_expression(builtin_base_instance_id), ") * spvIndirectParams[0] + ", - to_expression(builtin_vertex_idx_id), " - ", to_expression(builtin_base_vertex_id), - "];"); + // We zero-base the InstanceID & VertexID variables for HLSL emulation elsewhere, so don't do it twice + if (msl_options.enable_base_index_zero) + { + statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, + " = ", output_buffer_var_name, "[", to_expression(builtin_instance_idx_id), + " * spvIndirectParams[0] + ", to_expression(builtin_vertex_idx_id), "];"); + } + else + { + statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, + " = ", output_buffer_var_name, "[(", to_expression(builtin_instance_idx_id), + " - ", to_expression(builtin_base_instance_id), ") * spvIndirectParams[0] + ", + to_expression(builtin_vertex_idx_id), " - ", + to_expression(builtin_base_vertex_id), "];"); + } } }); break; @@ -3108,6 +3165,14 @@ void CompilerMSL::emit_store_statement(uint32_t lhs_expression, uint32_t rhs_exp } } +static bool expression_ends_with(const string &expr_str, const std::string &ending) +{ + if (expr_str.length() >= ending.length()) + return (expr_str.compare(expr_str.length() - ending.length(), ending.length(), ending) == 0); + else + return false; +} + // Converts the format of the current expression from packed to unpacked, // by wrapping the expression in a constructor of the appropriate type. // Also, handle special physical ID remapping scenarios, similar to emit_store_statement(). @@ -3129,7 +3194,8 @@ string CompilerMSL::unpack_expression_type(string expr_str, const SPIRType &type }; // std140 array cases for vectors. - if (physical_type && is_vector(*physical_type) && is_array(*physical_type) && physical_type->vecsize > type.vecsize) + if (physical_type && is_vector(*physical_type) && is_array(*physical_type) && + physical_type->vecsize > type.vecsize && !expression_ends_with(expr_str, swizzle_lut[type.vecsize - 1])) { assert(type.vecsize >= 1 && type.vecsize <= 3); return enclose_expression(expr_str) + swizzle_lut[type.vecsize - 1]; @@ -3172,7 +3238,14 @@ string CompilerMSL::unpack_expression_type(string expr_str, const SPIRType &type return unpack_expr; } else - return join(type_to_glsl(type), "(", expr_str, ")"); + { + // Don't expose "spvUnsafeArray" when unpacking expressions, + // the input "type" will be the unpacked type and might also appear in l-value expressions + use_builtin_array = true; + string unpack_expr = join(type_to_glsl(type), "(", expr_str, ")"); + use_builtin_array = false; + return unpack_expr; + } } // Emits the file header info @@ -3181,6 +3254,11 @@ void CompilerMSL::emit_header() // This particular line can be overridden during compilation, so make it a flag and not a pragma line. if (suppress_missing_prototypes) statement("#pragma clang diagnostic ignored \"-Wmissing-prototypes\""); + + // Disable warning about missing braces for array template to make arrays a value type + if (spv_function_implementations.count(SPVFuncImplUnsafeArray) != 0) + statement("#pragma clang diagnostic ignored \"-Wmissing-braces\""); + for (auto &pragma : pragma_lines) statement(pragma); @@ -3218,7 +3296,63 @@ void CompilerMSL::add_typedef_line(const string &line) force_recompile(); } +// Template struct like spvUnsafeArray<> need to be declared *before* any resources are declared +void CompilerMSL::emit_custom_templates() +{ + for (const auto &spv_func : spv_function_implementations) + { + switch (spv_func) + { + case SPVFuncImplUnsafeArray: + statement("template"); + statement("struct spvUnsafeArray"); + begin_scope(); + statement("T elements[Num ? Num : 1];"); + statement(""); + statement("thread T& operator [] (size_t pos) thread"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + statement("constexpr const thread T& operator [] (size_t pos) const thread"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + statement(""); + statement("device T& operator [] (size_t pos) device"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + statement("constexpr const device T& operator [] (size_t pos) const device"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + statement(""); + statement("constexpr const constant T& operator [] (size_t pos) const constant"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + statement(""); + statement("threadgroup T& operator [] (size_t pos) threadgroup"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + statement("constexpr const threadgroup T& operator [] (size_t pos) const threadgroup"); + begin_scope(); + statement("return elements[pos];"); + end_scope(); + end_scope_decl(); + statement(""); + break; + + default: + break; + } + } +} + // Emits any needed custom function bodies. +// Metal helper functions must be static force-inline, i.e. static inline __attribute__((always_inline)) +// otherwise they will cause problems when linked together in a single Metallib. void CompilerMSL::emit_custom_functions() { for (uint32_t i = SPVFuncImplArrayCopyMultidimMax; i >= 2; i--) @@ -3258,7 +3392,7 @@ void CompilerMSL::emit_custom_functions() spv_function_implementations.insert(SPVFuncImplGetSwizzle); } - for (auto &spv_func : spv_function_implementations) + for (const auto &spv_func : spv_function_implementations) { switch (spv_func) { @@ -3390,32 +3524,159 @@ void CompilerMSL::emit_custom_functions() end_scope(); statement(""); } - break; } + // Support for Metal 2.1's new texture_buffer type. case SPVFuncImplTexelBufferCoords: { - string tex_width_str = convert_to_string(msl_options.texel_buffer_texture_width); - statement("// Returns 2D texture coords corresponding to 1D texel buffer coords"); - statement("inline uint2 spvTexelBufferCoord(uint tc)"); - begin_scope(); - statement(join("return uint2(tc % ", tex_width_str, ", tc / ", tex_width_str, ");")); - end_scope(); + if (msl_options.texel_buffer_texture_width > 0) + { + string tex_width_str = convert_to_string(msl_options.texel_buffer_texture_width); + statement("// Returns 2D texture coords corresponding to 1D texel buffer coords"); + statement(force_inline); + statement("uint2 spvTexelBufferCoord(uint tc)"); + begin_scope(); + statement(join("return uint2(tc % ", tex_width_str, ", tc / ", tex_width_str, ");")); + end_scope(); + statement(""); + } + else + { + statement("// Returns 2D texture coords corresponding to 1D texel buffer coords"); + statement( + "#define spvTexelBufferCoord(tc, tex) uint2((tc) % (tex).get_width(), (tc) / (tex).get_width())"); + statement(""); + } + break; + } + + // Emulate texture2D atomic operations + case SPVFuncImplImage2DAtomicCoords: + { + statement("// Returns buffer coords corresponding to 2D texture coords for emulating 2D texture atomics"); + statement("#define spvImage2DAtomicCoord(tc, tex) (((tex).get_width() * (tc).x) + (tc).y)"); statement(""); break; } + // "fadd" intrinsic support + case SPVFuncImplFAdd: + statement("template"); + statement("T spvFAdd(T l, T r)"); + begin_scope(); + statement("return fma(T(1), l, r);"); + end_scope(); + statement(""); + break; + + // "fmul' intrinsic support + case SPVFuncImplFMul: + statement("template"); + statement("T spvFMul(T l, T r)"); + begin_scope(); + statement("return fma(l, r, T(0));"); + end_scope(); + statement(""); + + statement("template"); + statement("vec spvFMulVectorMatrix(vec v, matrix m)"); + begin_scope(); + statement("vec res = vec(0);"); + statement("for (uint i = Rows; i > 0; --i)"); + begin_scope(); + statement("vec tmp(0);"); + statement("for (uint j = 0; j < Cols; ++j)"); + begin_scope(); + statement("tmp[j] = m[j][i - 1];"); + end_scope(); + statement("res = fma(tmp, vec(v[i - 1]), res);"); + end_scope(); + statement("return res;"); + end_scope(); + statement(""); + + statement("template"); + statement("vec spvFMulMatrixVector(matrix m, vec v)"); + begin_scope(); + statement("vec res = vec(0);"); + statement("for (uint i = Cols; i > 0; --i)"); + begin_scope(); + statement("res = fma(m[i - 1], vec(v[i - 1]), res);"); + end_scope(); + statement("return res;"); + end_scope(); + statement(""); + + statement("template"); + statement( + "matrix spvFMulMatrixMatrix(matrix l, matrix r)"); + begin_scope(); + statement("matrix res;"); + statement("for (uint i = 0; i < RCols; i++)"); + begin_scope(); + statement("vec tmp(0);"); + statement("for (uint j = 0; j < LCols; j++)"); + begin_scope(); + statement("tmp = fma(vec(r[i][j]), l[j], tmp);"); + end_scope(); + statement("res[i] = tmp;"); + end_scope(); + statement("return res;"); + end_scope(); + statement(""); + break; + + // Emulate texturecube_array with texture2d_array for iOS where this type is not available + case SPVFuncImplCubemapTo2DArrayFace: + statement(force_inline); + statement("float3 spvCubemapTo2DArrayFace(float3 P)"); + begin_scope(); + statement("float3 Coords = abs(P.xyz);"); + statement("float CubeFace = 0;"); + statement("float ProjectionAxis = 0;"); + statement("float u = 0;"); + statement("float v = 0;"); + statement("if (Coords.x >= Coords.y && Coords.x >= Coords.z)"); + begin_scope(); + statement("CubeFace = P.x >= 0 ? 0 : 1;"); + statement("ProjectionAxis = Coords.x;"); + statement("u = P.x >= 0 ? -P.z : P.z;"); + statement("v = -P.y;"); + end_scope(); + statement("else if (Coords.y >= Coords.x && Coords.y >= Coords.z)"); + begin_scope(); + statement("CubeFace = P.y >= 0 ? 2 : 3;"); + statement("ProjectionAxis = Coords.y;"); + statement("u = P.x;"); + statement("v = P.y >= 0 ? P.z : -P.z;"); + end_scope(); + statement("else"); + begin_scope(); + statement("CubeFace = P.z >= 0 ? 4 : 5;"); + statement("ProjectionAxis = Coords.z;"); + statement("u = P.z >= 0 ? P.x : -P.x;"); + statement("v = -P.y;"); + end_scope(); + statement("u = 0.5 * (u/ProjectionAxis + 1);"); + statement("v = 0.5 * (v/ProjectionAxis + 1);"); + statement("return float3(u, v, CubeFace);"); + end_scope(); + statement(""); + break; + case SPVFuncImplInverse4x4: statement("// Returns the determinant of a 2x2 matrix."); - statement("inline float spvDet2x2(float a1, float a2, float b1, float b2)"); + statement(force_inline); + statement("float spvDet2x2(float a1, float a2, float b1, float b2)"); begin_scope(); statement("return a1 * b2 - b1 * a2;"); end_scope(); statement(""); statement("// Returns the determinant of a 3x3 matrix."); - statement("inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, " + statement(force_inline); + statement("float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, " "float c2, float c3)"); begin_scope(); statement("return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, " @@ -3424,7 +3685,8 @@ void CompilerMSL::emit_custom_functions() statement(""); statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); - statement("inline float4x4 spvInverse4x4(float4x4 m)"); + statement(force_inline); + statement("float4x4 spvInverse4x4(float4x4 m)"); begin_scope(); statement("float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); @@ -3480,7 +3742,8 @@ void CompilerMSL::emit_custom_functions() if (spv_function_implementations.count(SPVFuncImplInverse4x4) == 0) { statement("// Returns the determinant of a 2x2 matrix."); - statement("inline float spvDet2x2(float a1, float a2, float b1, float b2)"); + statement(force_inline); + statement("float spvDet2x2(float a1, float a2, float b1, float b2)"); begin_scope(); statement("return a1 * b2 - b1 * a2;"); end_scope(); @@ -3489,7 +3752,8 @@ void CompilerMSL::emit_custom_functions() statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); - statement("inline float3x3 spvInverse3x3(float3x3 m)"); + statement(force_inline); + statement("float3x3 spvInverse3x3(float3x3 m)"); begin_scope(); statement("float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); @@ -3519,7 +3783,8 @@ void CompilerMSL::emit_custom_functions() case SPVFuncImplInverse2x2: statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); - statement("inline float2x2 spvInverse2x2(float2x2 m)"); + statement(force_inline); + statement("float2x2 spvInverse2x2(float2x2 m)"); begin_scope(); statement("float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); @@ -4530,6 +4795,8 @@ void CompilerMSL::declare_undefined_values() void CompilerMSL::declare_constant_arrays() { + bool fully_inlined = ir.ids_for_type[TypeFunction].size() == 1; + // MSL cannot declare arrays inline (except when declaring a variable), so we must move them out to // global constants directly, so we are able to use constants as variable expressions. bool emitted = false; @@ -4539,7 +4806,11 @@ void CompilerMSL::declare_constant_arrays() return; auto &type = this->get(c.constant_type); - if (!type.array.empty()) + // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries. + // FIXME: However, hoisting constants to main() means we need to pass down constant arrays to leaf functions if they are used there. + // If there are multiple functions in the module, drop this case to avoid breaking use cases which do not need to + // link into Metal libraries. This is hacky. + if (!type.array.empty() && (!fully_inlined || is_scalar(type) || is_vector(type))) { auto name = to_name(c.self); statement("constant ", variable_decl(type, name), " = ", constant_expression(c), ";"); @@ -4551,6 +4822,36 @@ void CompilerMSL::declare_constant_arrays() statement(""); } +// Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries +void CompilerMSL::declare_complex_constant_arrays() +{ + // If we do not have a fully inlined module, we did not opt in to + // declaring constant arrays of complex types. See CompilerMSL::declare_constant_arrays(). + bool fully_inlined = ir.ids_for_type[TypeFunction].size() == 1; + if (!fully_inlined) + return; + + // MSL cannot declare arrays inline (except when declaring a variable), so we must move them out to + // global constants directly, so we are able to use constants as variable expressions. + bool emitted = false; + + ir.for_each_typed_id([&](uint32_t, SPIRConstant &c) { + if (c.specialization) + return; + + auto &type = this->get(c.constant_type); + if (!type.array.empty() && !(is_scalar(type) || is_vector(type))) + { + auto name = to_name(c.self); + statement("", variable_decl(type, name), " = ", constant_expression(c), ";"); + emitted = true; + } + }); + + if (emitted) + statement(""); +} + void CompilerMSL::emit_resources() { declare_constant_arrays(); @@ -4716,15 +5017,301 @@ void CompilerMSL::emit_binary_unord_op(uint32_t result_type, uint32_t result_id, inherit_expression_dependencies(result_id, op1); } +bool CompilerMSL::emit_tessellation_io_load(uint32_t result_type_id, uint32_t id, uint32_t ptr) +{ + auto &ptr_type = expression_type(ptr); + auto &result_type = get(result_type_id); + if (ptr_type.storage != StorageClassInput && ptr_type.storage != StorageClassOutput) + return false; + if (ptr_type.storage == StorageClassOutput && get_execution_model() == ExecutionModelTessellationEvaluation) + return false; + + bool flat_data_type = is_matrix(result_type) || is_array(result_type) || result_type.basetype == SPIRType::Struct; + if (!flat_data_type) + return false; + + if (has_decoration(ptr, DecorationPatch)) + return false; + + // Now, we must unflatten a composite type and take care of interleaving array access with gl_in/gl_out. + // Lots of painful code duplication since we *really* should not unroll these kinds of loads in entry point fixup + // unless we're forced to do this when the code is emitting inoptimal OpLoads. + string expr; + + uint32_t interface_index = get_extended_decoration(ptr, SPIRVCrossDecorationInterfaceMemberIndex); + auto *var = maybe_get_backing_variable(ptr); + bool ptr_is_io_variable = ir.ids[ptr].get_type() == TypeVariable; + + const auto &iface_type = expression_type(stage_in_ptr_var_id); + + if (result_type.array.size() > 2) + { + SPIRV_CROSS_THROW("Cannot load tessellation IO variables with more than 2 dimensions."); + } + else if (result_type.array.size() == 2) + { + if (!ptr_is_io_variable) + SPIRV_CROSS_THROW("Loading an array-of-array must be loaded directly from an IO variable."); + if (interface_index == uint32_t(-1)) + SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); + if (result_type.basetype == SPIRType::Struct || is_matrix(result_type)) + SPIRV_CROSS_THROW("Cannot load array-of-array of composite type in tessellation IO."); + + expr += type_to_glsl(result_type) + "({ "; + uint32_t num_control_points = to_array_size_literal(result_type, 1); + uint32_t base_interface_index = interface_index; + + auto &sub_type = get(result_type.parent_type); + + for (uint32_t i = 0; i < num_control_points; i++) + { + expr += type_to_glsl(sub_type) + "({ "; + interface_index = base_interface_index; + uint32_t array_size = to_array_size_literal(result_type, 0); + for (uint32_t j = 0; j < array_size; j++, interface_index++) + { + const uint32_t indices[2] = { i, interface_index }; + + AccessChainMeta meta; + expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, + ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); + + if (j + 1 < array_size) + expr += ", "; + } + expr += " })"; + if (i + 1 < num_control_points) + expr += ", "; + } + expr += " })"; + } + else if (result_type.basetype == SPIRType::Struct) + { + bool is_array_of_struct = is_array(result_type); + if (is_array_of_struct && !ptr_is_io_variable) + SPIRV_CROSS_THROW("Loading array of struct from IO variable must come directly from IO variable."); + + uint32_t num_control_points = 1; + if (is_array_of_struct) + { + num_control_points = to_array_size_literal(result_type, 0); + expr += type_to_glsl(result_type) + "({ "; + } + + auto &struct_type = is_array_of_struct ? get(result_type.parent_type) : result_type; + assert(struct_type.array.empty()); + + for (uint32_t i = 0; i < num_control_points; i++) + { + expr += type_to_glsl(struct_type) + "{ "; + for (uint32_t j = 0; j < uint32_t(struct_type.member_types.size()); j++) + { + // The base interface index is stored per variable for structs. + if (var) + { + interface_index = + get_extended_member_decoration(var->self, j, SPIRVCrossDecorationInterfaceMemberIndex); + } + + if (interface_index == uint32_t(-1)) + SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); + + const auto &mbr_type = get(struct_type.member_types[j]); + if (is_matrix(mbr_type)) + { + expr += type_to_glsl(mbr_type) + "("; + for (uint32_t k = 0; k < mbr_type.columns; k++, interface_index++) + { + if (is_array_of_struct) + { + const uint32_t indices[2] = { i, interface_index }; + AccessChainMeta meta; + expr += access_chain_internal( + stage_in_ptr_var_id, indices, 2, + ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); + } + else + expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); + + if (k + 1 < mbr_type.columns) + expr += ", "; + } + expr += ")"; + } + else if (is_array(mbr_type)) + { + expr += type_to_glsl(mbr_type) + "({ "; + uint32_t array_size = to_array_size_literal(mbr_type, 0); + for (uint32_t k = 0; k < array_size; k++, interface_index++) + { + if (is_array_of_struct) + { + const uint32_t indices[2] = { i, interface_index }; + AccessChainMeta meta; + expr += access_chain_internal( + stage_in_ptr_var_id, indices, 2, + ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); + } + else + expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); + + if (k + 1 < array_size) + expr += ", "; + } + expr += " })"; + } + else + { + if (is_array_of_struct) + { + const uint32_t indices[2] = { i, interface_index }; + AccessChainMeta meta; + expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, + ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, + &meta); + } + else + expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); + } + + if (j + 1 < struct_type.member_types.size()) + expr += ", "; + } + expr += " }"; + if (i + 1 < num_control_points) + expr += ", "; + } + if (is_array_of_struct) + expr += " })"; + } + else if (is_matrix(result_type)) + { + bool is_array_of_matrix = is_array(result_type); + if (is_array_of_matrix && !ptr_is_io_variable) + SPIRV_CROSS_THROW("Loading array of matrix from IO variable must come directly from IO variable."); + if (interface_index == uint32_t(-1)) + SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); + + if (is_array_of_matrix) + { + // Loading a matrix from each control point. + uint32_t base_interface_index = interface_index; + uint32_t num_control_points = to_array_size_literal(result_type, 0); + expr += type_to_glsl(result_type) + "({ "; + + auto &matrix_type = get_variable_element_type(get(ptr)); + + for (uint32_t i = 0; i < num_control_points; i++) + { + interface_index = base_interface_index; + expr += type_to_glsl(matrix_type) + "("; + for (uint32_t j = 0; j < result_type.columns; j++, interface_index++) + { + const uint32_t indices[2] = { i, interface_index }; + + AccessChainMeta meta; + expr += + access_chain_internal(stage_in_ptr_var_id, indices, 2, + ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); + if (j + 1 < result_type.columns) + expr += ", "; + } + expr += ")"; + if (i + 1 < num_control_points) + expr += ", "; + } + + expr += " })"; + } + else + { + expr += type_to_glsl(result_type) + "("; + for (uint32_t i = 0; i < result_type.columns; i++, interface_index++) + { + expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); + if (i + 1 < result_type.columns) + expr += ", "; + } + expr += ")"; + } + } + else if (ptr_is_io_variable) + { + assert(is_array(result_type)); + assert(result_type.array.size() == 1); + if (interface_index == uint32_t(-1)) + SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); + + // We're loading an array directly from a global variable. + // This means we're loading one member from each control point. + expr += type_to_glsl(result_type) + "({ "; + uint32_t num_control_points = to_array_size_literal(result_type, 0); + + for (uint32_t i = 0; i < num_control_points; i++) + { + const uint32_t indices[2] = { i, interface_index }; + + AccessChainMeta meta; + expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, + ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); + + if (i + 1 < num_control_points) + expr += ", "; + } + expr += " })"; + } + else + { + // We're loading an array from a concrete control point. + assert(is_array(result_type)); + assert(result_type.array.size() == 1); + if (interface_index == uint32_t(-1)) + SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); + + expr += type_to_glsl(result_type) + "({ "; + uint32_t array_size = to_array_size_literal(result_type, 0); + for (uint32_t i = 0; i < array_size; i++, interface_index++) + { + expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); + if (i + 1 < array_size) + expr += ", "; + } + expr += " })"; + } + + emit_op(result_type_id, id, expr, false); + register_read(id, ptr, false); + return true; +} + bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t length) { // If this is a per-vertex output, remap it to the I/O array buffer. - auto *var = maybe_get(ops[2]); + + // Any object which did not go through IO flattening shenanigans will go there instead. + // We will unflatten on-demand instead as needed, but not all possible cases can be supported, especially with arrays. + + auto *var = maybe_get_backing_variable(ops[2]); + bool patch = false; + bool flat_data = false; + bool ptr_is_chain = false; + + if (var) + { + patch = has_decoration(ops[2], DecorationPatch) || is_patch_block(get_variable_data_type(*var)); + + // Should match strip_array in add_interface_block. + flat_data = var->storage == StorageClassInput || + (var->storage == StorageClassOutput && get_execution_model() == ExecutionModelTessellationControl); + + // We might have a chained access chain, where + // we first take the access chain to the control point, and then we chain into a member or something similar. + // In this case, we need to skip gl_in/gl_out remapping. + ptr_is_chain = var->self != ID(ops[2]); + } + BuiltIn bi_type = BuiltIn(get_decoration(ops[2], DecorationBuiltIn)); - if (var && - (var->storage == StorageClassInput || - (get_execution_model() == ExecutionModelTessellationControl && var->storage == StorageClassOutput)) && - !(has_decoration(ops[2], DecorationPatch) || is_patch_block(get_variable_data_type(*var))) && + if (var && flat_data && !patch && (!is_builtin_variable(*var) || bi_type == BuiltInPosition || bi_type == BuiltInPointSize || bi_type == BuiltInClipDistance || bi_type == BuiltInCullDistance || get_variable_data_type(*var).basetype == SPIRType::Struct)) @@ -4740,26 +5327,35 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l new_uint_type.width = 32; set(type_id, new_uint_type); - indices.push_back(ops[3]); + uint32_t first_non_array_index = ptr_is_chain ? 3 : 4; + VariableID stage_var_id = var->storage == StorageClassInput ? stage_in_ptr_var_id : stage_out_ptr_var_id; + VariableID ptr = ptr_is_chain ? VariableID(ops[2]) : stage_var_id; + if (!ptr_is_chain) + { + // Index into gl_in/gl_out with first array index. + indices.push_back(ops[3]); + } + + auto &result_ptr_type = get(ops[0]); uint32_t const_mbr_id = next_id++; - uint32_t index = get_extended_decoration(ops[2], SPIRVCrossDecorationInterfaceMemberIndex); - uint32_t ptr = var->storage == StorageClassInput ? stage_in_ptr_var_id : stage_out_ptr_var_id; + uint32_t index = get_extended_decoration(var->self, SPIRVCrossDecorationInterfaceMemberIndex); if (var->storage == StorageClassInput || has_decoration(get_variable_element_type(*var).self, DecorationBlock)) { - uint32_t i = 4; + uint32_t i = first_non_array_index; auto *type = &get_variable_element_type(*var); - if (index == uint32_t(-1) && length >= 5) + if (index == uint32_t(-1) && length >= (first_non_array_index + 1)) { // Maybe this is a struct type in the input class, in which case // we put it as a decoration on the corresponding member. - index = get_extended_member_decoration(ops[2], get_constant(ops[4]).scalar(), + index = get_extended_member_decoration(var->self, get_constant(ops[first_non_array_index]).scalar(), SPIRVCrossDecorationInterfaceMemberIndex); assert(index != uint32_t(-1)); i++; - type = &get(type->member_types[get_constant(ops[4]).scalar()]); + type = &get(type->member_types[get_constant(ops[first_non_array_index]).scalar()]); } - // In this case, we flattened structures and arrays, so now we have to + + // In this case, we're poking into flattened structures and arrays, so now we have to // combine the following indices. If we encounter a non-constant index, // we're hosed. for (; i < length; ++i) @@ -4767,92 +5363,35 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l if (!is_array(*type) && !is_matrix(*type) && type->basetype != SPIRType::Struct) break; - auto &c = get_constant(ops[i]); - index += c.scalar(); + auto *c = maybe_get(ops[i]); + if (!c || c->specialization) + SPIRV_CROSS_THROW("Trying to dynamically index into an array interface variable in tessellation. " + "This is currently unsupported."); + + // We're in flattened space, so just increment the member index into IO block. + // We can only do this once in the current implementation, so either: + // Struct, Matrix or 1-dimensional array for a control point. + index += c->scalar(); + if (type->parent_type) type = &get(type->parent_type); else if (type->basetype == SPIRType::Struct) - type = &get(type->member_types[c.scalar()]); + type = &get(type->member_types[c->scalar()]); } - // If the access chain terminates at a composite type, the composite - // itself might be copied. In that case, we must unflatten it. - if (is_matrix(*type) || is_array(*type) || type->basetype == SPIRType::Struct) - { - std::string temp_name = join(to_name(var->self), "_", ops[1]); - statement(variable_decl(*type, temp_name, var->self), ";"); - // Set up the initializer for this temporary variable. - indices.push_back(const_mbr_id); - if (type->basetype == SPIRType::Struct) - { - for (uint32_t j = 0; j < type->member_types.size(); j++) - { - index = get_extended_member_decoration(ops[2], j, SPIRVCrossDecorationInterfaceMemberIndex); - const auto &mbr_type = get(type->member_types[j]); - if (is_matrix(mbr_type)) - { - for (uint32_t k = 0; k < mbr_type.columns; k++, index++) - { - set(const_mbr_id, type_id, index, false); - auto e = access_chain(ptr, indices.data(), uint32_t(indices.size()), mbr_type, nullptr, - true); - statement(temp_name, ".", to_member_name(*type, j), "[", k, "] = ", e, ";"); - } - } - else if (is_array(mbr_type)) - { - for (uint32_t k = 0; k < to_array_size_literal(mbr_type, 0); k++, index++) - { - set(const_mbr_id, type_id, index, false); - auto e = access_chain(ptr, indices.data(), uint32_t(indices.size()), mbr_type, nullptr, - true); - statement(temp_name, ".", to_member_name(*type, j), "[", k, "] = ", e, ";"); - } - } - else - { - set(const_mbr_id, type_id, index, false); - auto e = - access_chain(ptr, indices.data(), uint32_t(indices.size()), mbr_type, nullptr, true); - statement(temp_name, ".", to_member_name(*type, j), " = ", e, ";"); - } - } - } - else if (is_matrix(*type)) - { - for (uint32_t j = 0; j < type->columns; j++, index++) - { - set(const_mbr_id, type_id, index, false); - auto e = access_chain(ptr, indices.data(), uint32_t(indices.size()), *type, nullptr, true); - statement(temp_name, "[", j, "] = ", e, ";"); - } - } - else // Must be an array - { - assert(is_array(*type)); - for (uint32_t j = 0; j < to_array_size_literal(*type, 0); j++, index++) - { - set(const_mbr_id, type_id, index, false); - auto e = access_chain(ptr, indices.data(), uint32_t(indices.size()), *type, nullptr, true); - statement(temp_name, "[", j, "] = ", e, ";"); - } - } - // This needs to be a variable instead of an expression so we don't - // try to dereference this as a variable pointer. - set(ops[1], ops[0], var->storage); - ir.meta[ops[1]] = ir.meta[ops[2]]; - set_name(ops[1], temp_name); - if (has_decoration(var->self, DecorationInvariant)) - set_decoration(ops[1], DecorationInvariant); - for (uint32_t j = 2; j < length; j++) - inherit_expression_dependencies(ops[1], ops[j]); - return true; + if (is_matrix(result_ptr_type) || is_array(result_ptr_type) || result_ptr_type.basetype == SPIRType::Struct) + { + // We're not going to emit the actual member name, we let any further OpLoad take care of that. + // Tag the access chain with the member index we're referencing. + set_extended_decoration(ops[1], SPIRVCrossDecorationInterfaceMemberIndex, index); } else { + // Access the appropriate member of gl_in/gl_out. set(const_mbr_id, type_id, index, false); indices.push_back(const_mbr_id); + // Append any straggling access chain indices. if (i < length) indices.insert(indices.end(), ops + i, ops + length); } @@ -4868,7 +5407,39 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l // We use the pointer to the base of the input/output array here, // so this is always a pointer chain. - auto e = access_chain(ptr, indices.data(), uint32_t(indices.size()), get(ops[0]), &meta, true); + string e; + + if (!ptr_is_chain) + { + // This is the start of an access chain, use ptr_chain to index into control point array. + e = access_chain(ptr, indices.data(), uint32_t(indices.size()), result_ptr_type, &meta, true); + } + else + { + // If we're accessing a struct, we need to use member indices which are based on the IO block, + // not actual struct type, so we have to use a split access chain here where + // first path resolves the control point index, i.e. gl_in[index], and second half deals with + // looking up flattened member name. + + // However, it is possible that we partially accessed a struct, + // by taking pointer to member inside the control-point array. + // For this case, we fall back to a natural access chain since we have already dealt with remapping struct members. + // One way to check this here is if we have 2 implied read expressions. + // First one is the gl_in/gl_out struct itself, then an index into that array. + // If we have traversed further, we use a normal access chain formulation. + auto *ptr_expr = maybe_get(ptr); + if (ptr_expr && ptr_expr->implied_read_expressions.size() == 2) + { + e = join(to_expression(ptr), + access_chain_internal(stage_var_id, indices.data(), uint32_t(indices.size()), + ACCESS_CHAIN_CHAIN_ONLY_BIT, &meta)); + } + else + { + e = access_chain_internal(ptr, indices.data(), uint32_t(indices.size()), 0, &meta); + } + } + auto &expr = set(ops[1], move(e), ops[0], should_forward(ops[2])); expr.loaded_from = var->self; expr.need_transpose = meta.need_transpose; @@ -4882,12 +5453,24 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l if (meta.storage_is_invariant) set_decoration(ops[1], DecorationInvariant); + // If we have some expression dependencies in our access chain, this access chain is technically a forwarded + // temporary which could be subject to invalidation. + // Need to assume we're forwarded while calling inherit_expression_depdendencies. + forwarded_temporaries.insert(ops[1]); + // The access chain itself is never forced to a temporary, but its dependencies might. + suppressed_usage_tracking.insert(ops[1]); + for (uint32_t i = 2; i < length; i++) { inherit_expression_dependencies(ops[1], ops[i]); add_implied_read_expression(expr, ops[i]); } + // If we have no dependencies after all, i.e., all indices in the access chain are immutable temporaries, + // we're not forwarded after all. + if (expr.expression_dependencies.empty()) + forwarded_temporaries.erase(ops[1]); + return true; } @@ -4966,6 +5549,24 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) switch (opcode) { + case OpLoad: + { + uint32_t id = ops[1]; + uint32_t ptr = ops[2]; + if (is_tessellation_shader()) + { + if (!emit_tessellation_io_load(ops[0], id, ptr)) + CompilerGLSL::emit_instruction(instruction); + } + else + { + // Sample mask input for Metal is not an array + if (BuiltIn(get_decoration(ptr, DecorationBuiltIn)) == BuiltInSampleMask) + set_decoration(id, DecorationBuiltIn, BuiltInSampleMask); + CompilerGLSL::emit_instruction(instruction); + } + break; + } // Comparisons case OpIEqual: @@ -5117,6 +5718,20 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) MSL_BFOP(fmod); break; + case OpFMul: + if (msl_options.invariant_float_math) + MSL_BFOP(spvFMul); + else + MSL_BOP(*); + break; + + case OpFAdd: + if (msl_options.invariant_float_math) + MSL_BFOP(spvFAdd); + else + MSL_BOP(+); + break; + // Atomics case OpAtomicExchange: { @@ -5242,6 +5857,41 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) break; } + // Emulate texture2D atomic operations + case OpImageTexelPointer: + { + // When using the pointer, we need to know which variable it is actually loaded from. + auto *var = maybe_get_backing_variable(ops[2]); + if (var && atomic_image_vars.count(var->self)) + { + uint32_t result_type = ops[0]; + uint32_t id = ops[1]; + + std::string coord = to_expression(ops[3]); + auto &type = expression_type(ops[2]); + if (type.image.dim == Dim2D) + { + coord = join("spvImage2DAtomicCoord(", coord, ", ", to_expression(ops[2]), ")"); + } + + auto &e = set(id, join(to_expression(ops[2]), "_atomic[", coord, "]"), result_type, true); + e.loaded_from = var ? var->self : ID(0); + inherit_expression_dependencies(id, ops[3]); + } + else + { + uint32_t result_type = ops[0]; + uint32_t id = ops[1]; + auto &e = + set(id, join(to_expression(ops[2]), ", ", to_expression(ops[3])), result_type, true); + + // When using the pointer, we need to know which variable it is actually loaded from. + e.loaded_from = var ? var->self : ID(0); + inherit_expression_dependencies(id, ops[3]); + } + break; + } + case OpImageWrite: { uint32_t img_id = ops[0]; @@ -5337,7 +5987,11 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) expr += ", " + img_exp + ".get_depth(" + lod + ")"; if (img_is_array) + { expr += ", " + img_exp + ".get_array_size()"; + if (img_dim == DimCube && msl_options.emulate_cube_array) + expr += " / 6"; + } expr += ")"; @@ -5419,9 +6073,6 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) break; } - case OpImageTexelPointer: - SPIRV_CROSS_THROW("MSL does not support atomic operations on images or texel buffers."); - // Casting case OpQuantizeToF16: { @@ -5514,6 +6165,85 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) break; } + case OpVectorTimesMatrix: + case OpMatrixTimesVector: + { + if (!msl_options.invariant_float_math) + { + CompilerGLSL::emit_instruction(instruction); + break; + } + + // If the matrix needs transpose, just flip the multiply order. + auto *e = maybe_get(ops[opcode == OpMatrixTimesVector ? 2 : 3]); + if (e && e->need_transpose) + { + e->need_transpose = false; + string expr; + + if (opcode == OpMatrixTimesVector) + { + expr = join("spvFMulVectorMatrix(", to_enclosed_unpacked_expression(ops[3]), ", ", + to_unpacked_row_major_matrix_expression(ops[2]), ")"); + } + else + { + expr = join("spvFMulMatrixVector(", to_unpacked_row_major_matrix_expression(ops[3]), ", ", + to_enclosed_unpacked_expression(ops[2]), ")"); + } + + bool forward = should_forward(ops[2]) && should_forward(ops[3]); + emit_op(ops[0], ops[1], expr, forward); + e->need_transpose = true; + inherit_expression_dependencies(ops[1], ops[2]); + inherit_expression_dependencies(ops[1], ops[3]); + } + else + { + if (opcode == OpMatrixTimesVector) + MSL_BFOP(spvFMulMatrixVector); + else + MSL_BFOP(spvFMulVectorMatrix); + } + break; + } + + case OpMatrixTimesMatrix: + { + if (!msl_options.invariant_float_math) + { + CompilerGLSL::emit_instruction(instruction); + break; + } + + auto *a = maybe_get(ops[2]); + auto *b = maybe_get(ops[3]); + + // If both matrices need transpose, we can multiply in flipped order and tag the expression as transposed. + // a^T * b^T = (b * a)^T. + if (a && b && a->need_transpose && b->need_transpose) + { + a->need_transpose = false; + b->need_transpose = false; + + auto expr = + join("spvFMulMatrixMatrix(", enclose_expression(to_unpacked_row_major_matrix_expression(ops[3])), ", ", + enclose_expression(to_unpacked_row_major_matrix_expression(ops[2])), ")"); + + bool forward = should_forward(ops[2]) && should_forward(ops[3]); + auto &e = emit_op(ops[0], ops[1], expr, forward); + e.need_transpose = true; + a->need_transpose = true; + b->need_transpose = true; + inherit_expression_dependencies(ops[1], ops[2]); + inherit_expression_dependencies(ops[1], ops[3]); + } + else + MSL_BFOP(spvFMulMatrixMatrix); + + break; + } + case OpIAddCarry: case OpISubBorrow: { @@ -5654,6 +6384,34 @@ void CompilerMSL::emit_instruction(const Instruction &instruction) previous_instruction_opcode = opcode; } +void CompilerMSL::emit_texture_op(const Instruction &i) +{ + if (msl_options.is_ios() && msl_options.ios_use_framebuffer_fetch_subpasses) + { + auto *ops = stream(i); + + uint32_t result_type_id = ops[0]; + uint32_t id = ops[1]; + uint32_t img = ops[2]; + + auto &type = expression_type(img); + auto &imgtype = get(type.self); + + // Use Metal's native frame-buffer fetch API for subpass inputs. + if (imgtype.image.dim == DimSubpassData) + { + // Subpass inputs cannot be invalidated, + // so just forward the expression directly. + string expr = to_expression(img); + emit_op(result_type_id, id, expr, true); + return; + } + } + + // Fallback to default implementation + CompilerGLSL::emit_texture_op(i); +} + void CompilerMSL::emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uint32_t id_mem_sem) { if (get_execution_model() != ExecutionModelGLCompute && get_execution_model() != ExecutionModelTessellationControl) @@ -5682,8 +6440,11 @@ void CompilerMSL::emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uin if (get_execution_model() == ExecutionModelTessellationControl || (mem_sem & (MemorySemanticsUniformMemoryMask | MemorySemanticsCrossWorkgroupMemoryMask))) mem_flags += "mem_flags::mem_device"; - if (mem_sem & (MemorySemanticsSubgroupMemoryMask | MemorySemanticsWorkgroupMemoryMask | - MemorySemanticsAtomicCounterMemoryMask)) + + // Fix tessellation patch function processing + if (get_execution_model() == ExecutionModelTessellationControl || + (mem_sem & (MemorySemanticsSubgroupMemoryMask | MemorySemanticsWorkgroupMemoryMask | + MemorySemanticsAtomicCounterMemoryMask))) { if (!mem_flags.empty()) mem_flags += " | "; @@ -5753,59 +6514,76 @@ void CompilerMSL::emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uin void CompilerMSL::emit_array_copy(const string &lhs, uint32_t rhs_id, StorageClass lhs_storage, StorageClass rhs_storage) { - // Assignment from an array initializer is fine. - auto &type = expression_type(rhs_id); - auto *var = maybe_get_backing_variable(rhs_id); + // Allow Metal to use the array template to make arrays a value type. + // This, however, cannot be used for threadgroup address specifiers, so consider the custom array copy as fallback. + bool lhs_thread = (lhs_storage == StorageClassOutput || lhs_storage == StorageClassFunction || + lhs_storage == StorageClassGeneric || lhs_storage == StorageClassPrivate); + bool rhs_thread = (rhs_storage == StorageClassInput || rhs_storage == StorageClassFunction || + rhs_storage == StorageClassGeneric || rhs_storage == StorageClassPrivate); - // Unfortunately, we cannot template on address space in MSL, - // so explicit address space redirection it is ... - bool is_constant = false; - if (ir.ids[rhs_id].get_type() == TypeConstant) + // If threadgroup storage qualifiers are *not* used: + // Avoid spvCopy* wrapper functions; Otherwise, spvUnsafeArray<> template cannot be used with that storage qualifier. + if (lhs_thread && rhs_thread && !use_builtin_array) { - is_constant = true; - } - else if (var && var->remapped_variable && var->statically_assigned && - ir.ids[var->static_expression].get_type() == TypeConstant) - { - is_constant = true; - } - - // For the case where we have OpLoad triggering an array copy, - // we cannot easily detect this case ahead of time since it's - // context dependent. We might have to force a recompile here - // if this is the only use of array copies in our shader. - if (type.array.size() > 1) - { - if (type.array.size() > SPVFuncImplArrayCopyMultidimMax) - SPIRV_CROSS_THROW("Cannot support this many dimensions for arrays of arrays."); - auto func = static_cast(SPVFuncImplArrayCopyMultidimBase + type.array.size()); - add_spv_func_and_recompile(func); + statement(lhs, " = ", to_expression(rhs_id), ";"); } else - add_spv_func_and_recompile(SPVFuncImplArrayCopy); + { + // Assignment from an array initializer is fine. + auto &type = expression_type(rhs_id); + auto *var = maybe_get_backing_variable(rhs_id); - bool lhs_thread = lhs_storage == StorageClassOutput || lhs_storage == StorageClassFunction || - lhs_storage == StorageClassGeneric || lhs_storage == StorageClassPrivate; - bool rhs_thread = rhs_storage == StorageClassInput || rhs_storage == StorageClassFunction || - rhs_storage == StorageClassGeneric || rhs_storage == StorageClassPrivate; + // Unfortunately, we cannot template on address space in MSL, + // so explicit address space redirection it is ... + bool is_constant = false; + if (ir.ids[rhs_id].get_type() == TypeConstant) + { + is_constant = true; + } + else if (var && var->remapped_variable && var->statically_assigned && + ir.ids[var->static_expression].get_type() == TypeConstant) + { + is_constant = true; + } - const char *tag = nullptr; - if (lhs_thread && is_constant) - tag = "FromConstantToStack"; - else if (lhs_storage == StorageClassWorkgroup && is_constant) - tag = "FromConstantToThreadGroup"; - else if (lhs_thread && rhs_thread) - tag = "FromStackToStack"; - else if (lhs_storage == StorageClassWorkgroup && rhs_thread) - tag = "FromStackToThreadGroup"; - else if (lhs_thread && rhs_storage == StorageClassWorkgroup) - tag = "FromThreadGroupToStack"; - else if (lhs_storage == StorageClassWorkgroup && rhs_storage == StorageClassWorkgroup) - tag = "FromThreadGroupToThreadGroup"; - else - SPIRV_CROSS_THROW("Unknown storage class used for copying arrays."); + // For the case where we have OpLoad triggering an array copy, + // we cannot easily detect this case ahead of time since it's + // context dependent. We might have to force a recompile here + // if this is the only use of array copies in our shader. + if (type.array.size() > 1) + { + if (type.array.size() > SPVFuncImplArrayCopyMultidimMax) + SPIRV_CROSS_THROW("Cannot support this many dimensions for arrays of arrays."); + auto func = static_cast(SPVFuncImplArrayCopyMultidimBase + type.array.size()); + add_spv_func_and_recompile(func); + } + else + add_spv_func_and_recompile(SPVFuncImplArrayCopy); - statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ");"); + const char *tag = nullptr; + if (lhs_thread && is_constant) + tag = "FromConstantToStack"; + else if (lhs_storage == StorageClassWorkgroup && is_constant) + tag = "FromConstantToThreadGroup"; + else if (lhs_thread && rhs_thread) + tag = "FromStackToStack"; + else if (lhs_storage == StorageClassWorkgroup && rhs_thread) + tag = "FromStackToThreadGroup"; + else if (lhs_thread && rhs_storage == StorageClassWorkgroup) + tag = "FromThreadGroupToStack"; + else if (lhs_storage == StorageClassWorkgroup && rhs_storage == StorageClassWorkgroup) + tag = "FromThreadGroupToThreadGroup"; + else + SPIRV_CROSS_THROW("Unknown storage class used for copying arrays."); + + // Pass internal array of spvUnsafeArray<> into wrapper functions + if (lhs_thread) + statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ".elements, ", to_expression(rhs_id), ");"); + else if (rhs_thread) + statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ".elements);"); + else + statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ");"); + } } // Since MSL does not allow arrays to be copied via simple variable assignment, @@ -5860,7 +6638,18 @@ void CompilerMSL::emit_atomic_func_op(uint32_t result_type, uint32_t result_id, auto *var = maybe_get_backing_variable(obj); if (!var) SPIRV_CROSS_THROW("No backing variable for atomic operation."); - exp += get_argument_address_space(*var); + + // Emulate texture2D atomic operations + const auto &res_type = get(var->basetype); + if (res_type.storage == StorageClassUniformConstant && res_type.basetype == SPIRType::Image) + { + exp += "device"; + } + else + { + exp += get_argument_address_space(*var); + } + exp += " atomic_"; exp += type_to_glsl(type); exp += "*)"; @@ -6230,38 +7019,21 @@ void CompilerMSL::emit_function_prototype(SPIRFunction &func, const Bitset &) add_function_overload(func); local_variable_names = resource_names; + string decl; processing_entry_point = func.self == ir.default_entry_point; - string decl = processing_entry_point ? "" : "inline "; + // Metal helper functions must be static force-inline otherwise they will cause problems when linked together in a single Metallib. + if (!processing_entry_point) + statement(force_inline); auto &type = get(func.return_type); - if (type.array.empty()) - { - decl += func_type_decl(type); - } - else - { - // We cannot return arrays in MSL, so "return" through an out variable. - decl += "void"; - } - + decl += func_type_decl(type); decl += " "; decl += to_name(func.self); decl += "("; - if (!type.array.empty()) - { - // Fake arrays returns by writing to an out array instead. - decl += "thread "; - decl += type_to_glsl(type); - decl += " (&SPIRV_Cross_return_value)"; - decl += type_to_array_glsl(type); - if (!func.arguments.empty()) - decl += ", "; - } - if (processing_entry_point) { if (msl_options.argument_buffers) @@ -6618,14 +7390,27 @@ string CompilerMSL::to_function_args(VariableID img, const SPIRType &imgtype, bo else { // Metal texel buffer textures are 2D, so convert 1D coord to 2D. + // Support for Metal 2.1's new texture_buffer type. if (is_fetch) - tex_coords = "spvTexelBufferCoord(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; + { + if (msl_options.texel_buffer_texture_width > 0) + { + tex_coords = "spvTexelBufferCoord(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; + } + else + { + tex_coords = "spvTexelBufferCoord(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ", " + + to_expression(img) + ")"; + } + } } alt_coord_component = 1; break; case DimSubpassData: + // If we're using Metal's native frame-buffer fetch API for subpass inputs, + // this path will not be hit. if (imgtype.image.ms) tex_coords = "uint2(gl_FragCoord.xy)"; else @@ -6711,28 +7496,46 @@ string CompilerMSL::to_function_args(VariableID img, const SPIRType &imgtype, bo if (!farg_str.empty()) farg_str += ", "; - farg_str += tex_coords; - // If fetch from cube, add face explicitly - if (is_cube_fetch) + if (imgtype.image.dim == DimCube && imgtype.image.arrayed && msl_options.emulate_cube_array) { - // Special case for cube arrays, face and layer are packed in one dimension. - if (imgtype.image.arrayed) - farg_str += ", uint(" + to_extract_component_expression(coord, 2) + ") % 6u"; - else - farg_str += ", uint(" + round_fp_tex_coords(to_extract_component_expression(coord, 2), coord_is_fp) + ")"; - } + farg_str += "spvCubemapTo2DArrayFace(" + tex_coords + ").xy"; - // If array, use alt coord - if (imgtype.image.arrayed) - { - // Special case for cube arrays, face and layer are packed in one dimension. - if (imgtype.image.dim == DimCube && is_fetch) - farg_str += ", uint(" + to_extract_component_expression(coord, 2) + ") / 6u"; + if (is_cube_fetch) + farg_str += ", uint(" + to_extract_component_expression(coord, 2) + ")"; else - farg_str += ", uint(" + + farg_str += ", uint(spvCubemapTo2DArrayFace(" + tex_coords + ").z) + (uint(" + round_fp_tex_coords(to_extract_component_expression(coord, alt_coord_component), coord_is_fp) + - ")"; + ") * 6u)"; + + add_spv_func_and_recompile(SPVFuncImplCubemapTo2DArrayFace); + } + else + { + farg_str += tex_coords; + + // If fetch from cube, add face explicitly + if (is_cube_fetch) + { + // Special case for cube arrays, face and layer are packed in one dimension. + if (imgtype.image.arrayed) + farg_str += ", uint(" + to_extract_component_expression(coord, 2) + ") % 6u"; + else + farg_str += + ", uint(" + round_fp_tex_coords(to_extract_component_expression(coord, 2), coord_is_fp) + ")"; + } + + // If array, use alt coord + if (imgtype.image.arrayed) + { + // Special case for cube arrays, face and layer are packed in one dimension. + if (imgtype.image.dim == DimCube && is_fetch) + farg_str += ", uint(" + to_extract_component_expression(coord, 2) + ") / 6u"; + else + farg_str += + ", uint(" + + round_fp_tex_coords(to_extract_component_expression(coord, alt_coord_component), coord_is_fp) + ")"; + } } // Depth compare reference value @@ -6837,7 +7640,10 @@ string CompilerMSL::to_function_args(VariableID img, const SPIRType &imgtype, bo grad_opt = "3d"; break; case DimCube: - grad_opt = "cube"; + if (imgtype.image.arrayed && msl_options.emulate_cube_array) + grad_opt = "2d"; + else + grad_opt = "cube"; break; default: grad_opt = "unsupported_gradient_dimension"; @@ -7172,38 +7978,16 @@ string CompilerMSL::to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_ if (is_dynamic_img_sampler && !arg_is_dynamic_img_sampler) arg_str = join("spvDynamicImageSampler<", type_to_glsl(get(type.image.type)), ">("); - auto *c = maybe_get(id); - if (c && !get(c->constant_type).array.empty()) - { - // If we are passing a constant array directly to a function for some reason, - // the callee will expect an argument in thread const address space - // (since we can only bind to arrays with references in MSL). - // To resolve this, we must emit a copy in this address space. - // This kind of code gen should be rare enough that performance is not a real concern. - // Inline the SPIR-V to avoid this kind of suboptimal codegen. - // - // We risk calling this inside a continue block (invalid code), - // so just create a thread local copy in the current function. - arg_str = join("_", id, "_array_copy"); - auto &constants = current_function->constant_arrays_needed_on_stack; - auto itr = find(begin(constants), end(constants), ID(id)); - if (itr == end(constants)) - { - force_recompile(); - constants.push_back(id); - } - } - else - arg_str += CompilerGLSL::to_func_call_arg(arg, id); + arg_str += CompilerGLSL::to_func_call_arg(arg, id); + + // Need to check the base variable in case we need to apply a qualified alias. + uint32_t var_id = 0; + auto *var = maybe_get(id); + if (var) + var_id = var->basevariable; if (!arg_is_dynamic_img_sampler) { - // Need to check the base variable in case we need to apply a qualified alias. - uint32_t var_id = 0; - auto *var = maybe_get(id); - if (var) - var_id = var->basevariable; - auto *constexpr_sampler = find_constexpr_sampler(var_id ? var_id : id); if (type.basetype == SPIRType::SampledImage) { @@ -7295,6 +8079,13 @@ string CompilerMSL::to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_ arg_str += ")"; } + // Emulate texture2D atomic operations + auto *backing_var = maybe_get_backing_variable(var_id); + if (backing_var && atomic_image_vars.count(backing_var->self)) + { + arg_str += ", " + to_expression(var_id) + "_atomic"; + } + return arg_str; } @@ -7443,6 +8234,7 @@ string CompilerMSL::to_struct_member(const SPIRType &type, uint32_t member_type_ // If this member is packed, mark it as so. string pack_pfx; + // Allow Metal to use the array template to make arrays a value type uint32_t orig_id = 0; if (has_extended_member_decoration(type.self, index, SPIRVCrossDecorationInterfaceOrigID)) orig_id = get_extended_member_decoration(type.self, index, SPIRVCrossDecorationInterfaceOrigID); @@ -7454,6 +8246,17 @@ string CompilerMSL::to_struct_member(const SPIRType &type, uint32_t member_type_ SPIRType row_major_physical_type; const SPIRType *declared_type = &physical_type; + // If a struct is being declared with physical layout, + // do not use array wrappers. + // This avoids a lot of complicated cases with packed vectors and matrices, + // and generally we cannot copy full arrays in and out of buffers into Function + // address space. + // Array of resources should also be declared as builtin arrays. + if (has_member_decoration(type.self, index, DecorationOffset)) + use_builtin_array = true; + else if (has_extended_member_decoration(type.self, index, SPIRVCrossDecorationResourceIndexPrimary)) + use_builtin_array = true; + if (member_is_packed_physical_type(type, index)) { // If we're packing a matrix, output an appropriate typedef @@ -7506,11 +8309,17 @@ string CompilerMSL::to_struct_member(const SPIRType &type, uint32_t member_type_ if (physical_type.basetype != SPIRType::Image && physical_type.basetype != SPIRType::Sampler && physical_type.basetype != SPIRType::SampledImage) { + BuiltIn builtin = BuiltInMax; + if (is_member_builtin(type, index, &builtin)) + use_builtin_array = true; array_type = type_to_array_glsl(physical_type); } - return join(pack_pfx, type_to_glsl(*declared_type, orig_id), " ", qualifier, to_member_name(type, index), - member_attribute_qualifier(type, index), array_type, ";"); + auto result = join(pack_pfx, type_to_glsl(*declared_type, orig_id), " ", qualifier, to_member_name(type, index), + member_attribute_qualifier(type, index), array_type, ";"); + + use_builtin_array = false; + return result; } // Emit a structure member, padding and packing to maintain the correct memeber alignments. @@ -7524,7 +8333,10 @@ void CompilerMSL::emit_struct_member(const SPIRType &type, uint32_t member_type_ statement("char _m", index, "_pad", "[", pad_len, "];"); } + // Handle HLSL-style 0-based vertex/instance index. + builtin_declaration = true; statement(to_struct_member(type, member_type_id, index, qualifier)); + builtin_declaration = false; } void CompilerMSL::emit_struct_padding_target(const SPIRType &type) @@ -8079,6 +8891,8 @@ void CompilerMSL::entry_point_args_builtin(string &ep_args) if (!ep_args.empty()) ep_args += ", "; + // Handle HLSL-style 0-based vertex/instance index. + builtin_declaration = true; ep_args += builtin_type_decl(bi_type, var_id) + " " + to_expression(var_id); ep_args += " [[" + builtin_qualifier(bi_type); if (bi_type == BuiltInSampleMask && get_entry_point().flags.get(ExecutionModePostDepthCoverage)) @@ -8090,6 +8904,7 @@ void CompilerMSL::entry_point_args_builtin(string &ep_args) ep_args += ", post_depth_coverage"; } ep_args += "]]"; + builtin_declaration = false; } } @@ -8113,12 +8928,12 @@ void CompilerMSL::entry_point_args_builtin(string &ep_args) for (auto &var : active_builtins) var.first->basetype = ensure_correct_builtin_type(var.first->basetype, var.second); - // Vertex and instance index built-ins - if (needs_vertex_idx_arg) - ep_args += built_in_func_arg(BuiltInVertexIndex, !ep_args.empty()); + // Handle HLSL-style 0-based vertex/instance index. + if (needs_base_vertex_arg == TriState::Yes) + ep_args += built_in_func_arg(BuiltInBaseVertex, !ep_args.empty()); - if (needs_instance_idx_arg) - ep_args += built_in_func_arg(BuiltInInstanceIndex, !ep_args.empty()); + if (needs_base_instance_arg == TriState::Yes) + ep_args += built_in_func_arg(BuiltInBaseInstance, !ep_args.empty()); if (capture_output_to_buffer) { @@ -8263,6 +9078,7 @@ void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) SPIRType::BaseType basetype; uint32_t index; uint32_t plane; + uint32_t secondary_index; }; SmallVector resources; @@ -8297,6 +9113,13 @@ void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) } } + // Emulate texture2D atomic operations + uint32_t secondary_index = 0; + if (atomic_image_vars.count(var.self)) + { + secondary_index = get_metal_resource_index(var, SPIRType::AtomicCounter, 0); + } + if (type.basetype == SPIRType::SampledImage) { add_resource_name(var_id); @@ -8307,20 +9130,20 @@ void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) for (uint32_t i = 0; i < plane_count; i++) resources.push_back({ &var, to_name(var_id), SPIRType::Image, - get_metal_resource_index(var, SPIRType::Image, i), i }); + get_metal_resource_index(var, SPIRType::Image, i), i, secondary_index }); if (type.image.dim != DimBuffer && !constexpr_sampler) { resources.push_back({ &var, to_sampler_expression(var_id), SPIRType::Sampler, - get_metal_resource_index(var, SPIRType::Sampler), 0 }); + get_metal_resource_index(var, SPIRType::Sampler), 0, 0 }); } } else if (!constexpr_sampler) { // constexpr samplers are not declared as resources. add_resource_name(var_id); - resources.push_back( - { &var, to_name(var_id), type.basetype, get_metal_resource_index(var, type.basetype), 0 }); + resources.push_back({ &var, to_name(var_id), type.basetype, + get_metal_resource_index(var, type.basetype), 0, secondary_index }); } } }); @@ -8356,6 +9179,8 @@ void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) if (array_size == 0) SPIRV_CROSS_THROW("Unsized arrays of buffers are not supported in MSL."); + // Allow Metal to use the array template to make arrays a value type + use_builtin_array = true; buffer_arrays.push_back(var_id); for (uint32_t i = 0; i < array_size; ++i) { @@ -8368,6 +9193,7 @@ void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } + use_builtin_array = false; } else { @@ -8389,16 +9215,38 @@ void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) ep_args += " [[sampler(" + convert_to_string(r.index) + ")]]"; break; case SPIRType::Image: + { if (!ep_args.empty()) ep_args += ", "; - ep_args += image_type_glsl(type, var_id) + " " + r.name; - if (r.plane > 0) - ep_args += join(plane_name_suffix, r.plane); - ep_args += " [[texture(" + convert_to_string(r.index) + ")"; - if (interlocked_resources.count(var_id)) - ep_args += ", raster_order_group(0)"; - ep_args += "]]"; + + // Use Metal's native frame-buffer fetch API for subpass inputs. + const auto &basetype = get(var.basetype); + if (basetype.image.dim != DimSubpassData || !msl_options.is_ios() || + !msl_options.ios_use_framebuffer_fetch_subpasses) + { + ep_args += image_type_glsl(type, var_id) + " " + r.name; + if (r.plane > 0) + ep_args += join(plane_name_suffix, r.plane); + ep_args += " [[texture(" + convert_to_string(r.index) + ")"; + if (interlocked_resources.count(var_id)) + ep_args += ", raster_order_group(0)"; + ep_args += "]]"; + } + else + { + ep_args += image_type_glsl(type, var_id) + "4 " + r.name; + ep_args += " [[color(" + convert_to_string(r.index) + ")]]"; + } + + // Emulate texture2D atomic operations + if (atomic_image_vars.count(var.self)) + { + ep_args += ", device atomic_" + type_to_glsl(get(basetype.image.type), 0); + ep_args += "* " + r.name + "_atomic"; + ep_args += " [[buffer(" + convert_to_string(r.secondary_index) + ")]]"; + } break; + } default: if (!ep_args.empty()) ep_args += ", "; @@ -8807,6 +9655,19 @@ uint32_t CompilerMSL::get_metal_resource_index(SPIRVariable &var, SPIRType::Base if (has_extended_decoration(var.self, resource_decoration)) return get_extended_decoration(var.self, resource_decoration); + // Allow user to enable decoration binding + if (msl_options.enable_decoration_binding) + { + // If there is no explicit mapping of bindings to MSL, use the declared binding. + if (has_decoration(var.self, DecorationBinding)) + { + var_binding = get_decoration(var.self, DecorationBinding); + // Avoid emitting sentinel bindings. + if (var_binding < 0x80000000u) + return var_binding; + } + } + // If we did not explicitly remap, allocate bindings on demand. // We cannot reliably use Binding decorations since SPIR-V and MSL's binding models are very different. @@ -8895,13 +9756,22 @@ string CompilerMSL::argument_decl(const SPIRFunction::Parameter &arg) type.image.dim == Dim2D && type_is_floating_point(get(type.image.type)) && spv_function_implementations.count(SPVFuncImplDynamicImageSampler); + // Allow Metal to use the array template to make arrays a value type + string address_space = get_argument_address_space(var); bool builtin = is_builtin_variable(var); + use_builtin_array = builtin; + if (address_space == "threadgroup") + use_builtin_array = true; + if (var.basevariable && (var.basevariable == stage_in_ptr_var_id || var.basevariable == stage_out_ptr_var_id)) decl += type_to_glsl(type, arg.id); else if (builtin) decl += builtin_type_decl(static_cast(get_decoration(arg.id, DecorationBuiltIn)), arg.id); else if ((storage == StorageClassUniform || storage == StorageClassStorageBuffer) && is_array(type)) + { + use_builtin_array = true; decl += join(type_to_glsl(type, arg.id), "*"); + } else if (is_dynamic_img_sampler) { decl += join("spvDynamicImageSampler<", type_to_glsl(get(type.image.type)), ">"); @@ -8913,40 +9783,14 @@ string CompilerMSL::argument_decl(const SPIRFunction::Parameter &arg) bool opaque_handle = storage == StorageClassUniformConstant; - string address_space = get_argument_address_space(var); - if (!builtin && !opaque_handle && !is_pointer && (storage == StorageClassFunction || storage == StorageClassGeneric)) { // If the argument is a pure value and not an opaque type, we will pass by value. - if (is_array(type)) - { - // We are receiving an array by value. This is problematic. - // We cannot be sure of the target address space since we are supposed to receive a copy, - // but this is not possible with MSL without some extra work. - // We will have to assume we're getting a reference in thread address space. - // If we happen to get a reference in constant address space, the caller must emit a copy and pass that. - // Thread const therefore becomes the only logical choice, since we cannot "create" a constant array from - // non-constant arrays, but we can create thread const from constant. - decl = string("thread const ") + decl; - decl += " (&"; - const char *restrict_kw = to_restrict(name_id); - if (*restrict_kw) - { - decl += " "; - decl += restrict_kw; - } - decl += to_expression(name_id); - decl += ")"; - decl += type_to_array_glsl(type); - } - else - { - if (!address_space.empty()) - decl = join(address_space, " ", decl); - decl += " "; - decl += to_expression(name_id); - } + if (!address_space.empty()) + decl = join(address_space, " ", decl); + decl += " "; + decl += to_expression(name_id); } else if (is_array(type) && !type_is_image) { @@ -9014,6 +9858,16 @@ string CompilerMSL::argument_decl(const SPIRFunction::Parameter &arg) decl += to_expression(name_id); } + // Emulate texture2D atomic operations + auto *backing_var = maybe_get_backing_variable(name_id); + if (backing_var && atomic_image_vars.count(backing_var->self)) + { + decl += ", device atomic_" + type_to_glsl(get(var_type.image.type), 0); + decl += "* " + to_expression(name_id) + "_atomic"; + } + + use_builtin_array = false; + return decl; } @@ -9384,6 +10238,7 @@ string CompilerMSL::type_to_glsl(const SPIRType &type, uint32_t id) { const char *restrict_kw; type_name = join(get_type_address_space(type, id), " ", type_to_glsl(get(type.parent_type), id)); + switch (type.basetype) { case SPIRType::Image: @@ -9409,7 +10264,9 @@ string CompilerMSL::type_to_glsl(const SPIRType &type, uint32_t id) { case SPIRType::Struct: // Need OpName lookup here to get a "sensible" name for a struct. - return to_name(type.self); + // Allow Metal to use the array template to make arrays a value type + type_name = to_name(type.self); + break; case SPIRType::Image: case SPIRType::SampledImage: @@ -9482,7 +10339,69 @@ string CompilerMSL::type_to_glsl(const SPIRType &type, uint32_t id) if (type.vecsize > 1) type_name += to_string(type.vecsize); - return type_name; + if (type.array.empty() || use_builtin_array) + { + return type_name; + } + else + { + // Allow Metal to use the array template to make arrays a value type + add_spv_func_and_recompile(SPVFuncImplUnsafeArray); + string res; + string sizes; + + for (uint32_t i = 0; i < uint32_t(type.array.size()); i++) + { + res += "spvUnsafeArray<"; + sizes += ", "; + sizes += to_array_size(type, i); + sizes += ">"; + } + + res += type_name + sizes; + return res; + } +} + +string CompilerMSL::type_to_array_glsl(const SPIRType &type) +{ + // Allow Metal to use the array template to make arrays a value type + switch (type.basetype) + { + case SPIRType::AtomicCounter: + case SPIRType::ControlPointArray: + { + return CompilerGLSL::type_to_array_glsl(type); + } + default: + { + if (use_builtin_array) + return CompilerGLSL::type_to_array_glsl(type); + else + return ""; + } + } +} + +// Threadgroup arrays can't have a wrapper type +std::string CompilerMSL::variable_decl(const SPIRVariable &variable) +{ + if (variable.storage == StorageClassWorkgroup) + { + use_builtin_array = true; + } + std::string expr = CompilerGLSL::variable_decl(variable); + if (variable.storage == StorageClassWorkgroup) + { + use_builtin_array = false; + } + return expr; +} + +// GCC workaround of lambdas calling protected funcs +std::string CompilerMSL::variable_decl(const SPIRType &type, const std::string &name, uint32_t id) +{ + return CompilerGLSL::variable_decl(type, name, id); } std::string CompilerMSL::sampler_type(const SPIRType &type) @@ -9555,14 +10474,14 @@ string CompilerMSL::image_type_glsl(const SPIRType &type, uint32_t id) switch (img_type.dim) { case Dim1D: - if (!msl_options.texture_1D_as_2D) + case Dim2D: + if (img_type.dim == Dim1D && !msl_options.texture_1D_as_2D) { // Use a native Metal 1D texture img_type_name += "depth1d_unsupported_by_metal"; break; } - // else fall through and use 2D - case Dim2D: + if (img_type.ms && img_type.arrayed) { if (!msl_options.supports_msl_version(2, 1)) @@ -9580,7 +10499,10 @@ string CompilerMSL::image_type_glsl(const SPIRType &type, uint32_t id) img_type_name += "depth3d_unsupported_by_metal"; break; case DimCube: - img_type_name += (img_type.arrayed ? "depthcube_array" : "depthcube"); + if (!msl_options.emulate_cube_array) + img_type_name += (img_type.arrayed ? "depthcube_array" : "depthcube"); + else + img_type_name += (img_type.arrayed ? "depth2d_array" : "depthcube"); break; default: img_type_name += "unknown_depth_texture_type"; @@ -9605,15 +10527,21 @@ string CompilerMSL::image_type_glsl(const SPIRType &type, uint32_t id) img_type_name += "texture2d"; break; case Dim1D: - if (!msl_options.texture_1D_as_2D) + case Dim2D: + case DimSubpassData: + if (img_type.dim == Dim1D && !msl_options.texture_1D_as_2D) { // Use a native Metal 1D texture img_type_name += (img_type.arrayed ? "texture1d_array" : "texture1d"); break; } - // else fall through and use 2D - case Dim2D: - case DimSubpassData: + + // Use Metal's native frame-buffer fetch API for subpass inputs. + if (img_type.dim == DimSubpassData && msl_options.is_ios() && + msl_options.ios_use_framebuffer_fetch_subpasses) + { + return type_to_glsl(get(img_type.type)); + } if (img_type.ms && img_type.arrayed) { if (!msl_options.supports_msl_version(2, 1)) @@ -9631,7 +10559,10 @@ string CompilerMSL::image_type_glsl(const SPIRType &type, uint32_t id) img_type_name += "texture3d"; break; case DimCube: - img_type_name += (img_type.arrayed ? "texturecube_array" : "texturecube"); + if (!msl_options.emulate_cube_array) + img_type_name += (img_type.arrayed ? "texturecube_array" : "texturecube"); + else + img_type_name += (img_type.arrayed ? "texture2d_array" : "texturecube"); break; default: img_type_name += "unknown_texture_type"; @@ -9944,19 +10875,114 @@ string CompilerMSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage) switch (builtin) { + // Handle HLSL-style 0-based vertex/instance index. // Override GLSL compiler strictness case BuiltInVertexId: - return "gl_VertexID"; + ensure_builtin(StorageClassInput, BuiltInVertexId); + if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && + (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) + { + if (builtin_declaration) + { + if (needs_base_vertex_arg != TriState::No) + needs_base_vertex_arg = TriState::Yes; + return "gl_VertexID"; + } + else + { + ensure_builtin(StorageClassInput, BuiltInBaseVertex); + return "(gl_VertexID - gl_BaseVertex)"; + } + } + else + { + return "gl_VertexID"; + } case BuiltInInstanceId: - return "gl_InstanceID"; + ensure_builtin(StorageClassInput, BuiltInInstanceId); + if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && + (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) + { + if (builtin_declaration) + { + if (needs_base_instance_arg != TriState::No) + needs_base_instance_arg = TriState::Yes; + return "gl_InstanceID"; + } + else + { + ensure_builtin(StorageClassInput, BuiltInBaseInstance); + return "(gl_InstanceID - gl_BaseInstance)"; + } + } + else + { + return "gl_InstanceID"; + } case BuiltInVertexIndex: - return "gl_VertexIndex"; + ensure_builtin(StorageClassInput, BuiltInVertexIndex); + if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && + (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) + { + if (builtin_declaration) + { + if (needs_base_vertex_arg != TriState::No) + needs_base_vertex_arg = TriState::Yes; + return "gl_VertexIndex"; + } + else + { + ensure_builtin(StorageClassInput, BuiltInBaseVertex); + return "(gl_VertexIndex - gl_BaseVertex)"; + } + } + else + { + return "gl_VertexIndex"; + } case BuiltInInstanceIndex: - return "gl_InstanceIndex"; + ensure_builtin(StorageClassInput, BuiltInInstanceIndex); + if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && + (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) + { + if (builtin_declaration) + { + if (needs_base_instance_arg != TriState::No) + needs_base_instance_arg = TriState::Yes; + return "gl_InstanceIndex"; + } + else + { + ensure_builtin(StorageClassInput, BuiltInBaseInstance); + return "(gl_InstanceIndex - gl_BaseInstance)"; + } + } + else + { + return "gl_InstanceIndex"; + } case BuiltInBaseVertex: - return "gl_BaseVertex"; + if (msl_options.supports_msl_version(1, 1) && + (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) + { + needs_base_vertex_arg = TriState::No; + return "gl_BaseVertex"; + } + else + { + SPIRV_CROSS_THROW("BaseVertex requires Metal 1.1 and Mac or Apple A9+ hardware."); + } case BuiltInBaseInstance: - return "gl_BaseInstance"; + if (msl_options.supports_msl_version(1, 1) && + (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) + { + needs_base_instance_arg = TriState::No; + return "gl_BaseInstance"; + } + else + { + SPIRV_CROSS_THROW("BaseInstance requires Metal 1.1 and Mac or Apple A9+ hardware."); + } case BuiltInDrawIndex: SPIRV_CROSS_THROW("DrawIndex is not supported in MSL."); @@ -10339,9 +11365,12 @@ string CompilerMSL::built_in_func_arg(BuiltIn builtin, bool prefix_comma) if (prefix_comma) bi_arg += ", "; + // Handle HLSL-style 0-based vertex/instance index. + builtin_declaration = true; bi_arg += builtin_type_decl(builtin); bi_arg += " " + builtin_to_glsl(builtin, StorageClassInput); bi_arg += " [[" + builtin_qualifier(builtin) + "]]"; + builtin_declaration = false; return bi_arg; } @@ -10635,6 +11664,14 @@ bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, ui suppress_missing_prototypes = true; break; + // Emulate texture2D atomic operations + case OpImageTexelPointer: + { + auto *var = compiler.maybe_get_backing_variable(args[2]); + image_pointers[args[1]] = var ? var->self : ID(0); + break; + } + case OpImageWrite: uses_resource_write = true; break; @@ -10643,6 +11680,7 @@ bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, ui check_resource_write(args[0]); break; + // Emulate texture2D atomic operations case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicCompareExchangeWeak: @@ -10657,13 +11695,39 @@ bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, ui case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: + { uses_atomics = true; + auto it = image_pointers.find(args[2]); + if (it != image_pointers.end()) + { + compiler.atomic_image_vars.insert(it->second); + } check_resource_write(args[2]); break; + } + + case OpAtomicStore: + { + uses_atomics = true; + auto it = image_pointers.find(args[0]); + if (it != image_pointers.end()) + { + compiler.atomic_image_vars.insert(it->second); + } + check_resource_write(args[0]); + break; + } case OpAtomicLoad: + { uses_atomics = true; + auto it = image_pointers.find(args[2]); + if (it != image_pointers.end()) + { + compiler.atomic_image_vars.insert(it->second); + } break; + } case OpGroupNonUniformInverseBallot: needs_subgroup_invocation_id = true; @@ -10690,6 +11754,7 @@ bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, ui uint32_t result_type = args[0]; uint32_t id = args[1]; uint32_t ptr = args[2]; + compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); compiler.ir.ids[id].set_allow_type_rewrite(); @@ -10725,60 +11790,55 @@ CompilerMSL::SPVFuncImpl CompilerMSL::OpCodePreprocessor::get_spv_func_impl(Op o case OpFMod: return SPVFuncImplMod; - case OpFunctionCall: - { - auto &return_type = compiler.get(args[0]); - if (return_type.array.size() > 1) + case OpFAdd: + if (compiler.msl_options.invariant_float_math) { - if (return_type.array.size() > SPVFuncImplArrayCopyMultidimMax) - SPIRV_CROSS_THROW("Cannot support this many dimensions for arrays of arrays."); - return static_cast(SPVFuncImplArrayCopyMultidimBase + return_type.array.size()); + return SPVFuncImplFAdd; } - else if (return_type.array.size() > 0) - return SPVFuncImplArrayCopy; - break; + + case OpFMul: + case OpOuterProduct: + case OpMatrixTimesVector: + case OpVectorTimesMatrix: + case OpMatrixTimesMatrix: + if (compiler.msl_options.invariant_float_math) + { + return SPVFuncImplFMul; + } + break; + + case OpTypeArray: + { + // Allow Metal to use the array template to make arrays a value type + return SPVFuncImplUnsafeArray; } - case OpStore: + // Emulate texture2D atomic operations + case OpAtomicExchange: + case OpAtomicCompareExchange: + case OpAtomicCompareExchangeWeak: + case OpAtomicIIncrement: + case OpAtomicIDecrement: + case OpAtomicIAdd: + case OpAtomicISub: + case OpAtomicSMin: + case OpAtomicUMin: + case OpAtomicSMax: + case OpAtomicUMax: + case OpAtomicAnd: + case OpAtomicOr: + case OpAtomicXor: + case OpAtomicLoad: + case OpAtomicStore: { - // Get the result type of the RHS. Since this is run as a pre-processing stage, - // we must extract the result type directly from the Instruction, rather than the ID. - uint32_t id_lhs = args[0]; - uint32_t id_rhs = args[1]; - - const SPIRType *type = nullptr; - if (compiler.ir.ids[id_rhs].get_type() != TypeNone) + auto it = image_pointers.find(args[opcode == OpAtomicStore ? 0 : 2]); + if (it != image_pointers.end()) { - // Could be a constant, or similar. - type = &compiler.expression_type(id_rhs); + uint32_t tid = compiler.get(it->second).basetype; + if (tid && compiler.get(tid).image.dim == Dim2D) + return SPVFuncImplImage2DAtomicCoords; } - else - { - // Or ... an expression. - uint32_t tid = result_types[id_rhs]; - if (tid) - type = &compiler.get(tid); - } - - auto *var = compiler.maybe_get(id_lhs); - - // Are we simply assigning to a statically assigned variable which takes a constant? - // Don't bother emitting this function. - bool static_expression_lhs = - var && var->storage == StorageClassFunction && var->statically_assigned && var->remapped_variable; - if (type && compiler.is_array(*type) && !static_expression_lhs) - { - if (type->array.size() > 1) - { - if (type->array.size() > SPVFuncImplArrayCopyMultidimMax) - SPIRV_CROSS_THROW("Cannot support this many dimensions for arrays of arrays."); - return static_cast(SPVFuncImplArrayCopyMultidimBase + type->array.size()); - } - else - return SPVFuncImplArrayCopy; - } - break; } diff --git a/3rdparty/spirv-cross/spirv_msl.hpp b/3rdparty/spirv-cross/spirv_msl.hpp index 139cc9f50..31fcc2c94 100644 --- a/3rdparty/spirv-cross/spirv_msl.hpp +++ b/3rdparty/spirv-cross/spirv_msl.hpp @@ -280,10 +280,28 @@ public: // MSL 2.0 must also be enabled. bool argument_buffers = false; + // Ensures vertex and instance indices start at zero. This reflects the behavior of HLSL with SV_VertexID and SV_InstanceID. + bool enable_base_index_zero = false; + // Fragment output in MSL must have at least as many components as the render pass. // Add support to explicit pad out components. bool pad_fragment_output_components = false; + // Specifies whether the iOS target version supports the [[base_vertex]] and [[base_instance]] attributes. + bool ios_support_base_vertex_instance = false; + + // Use Metal's native frame-buffer fetch API for subpass inputs. + bool ios_use_framebuffer_fetch_subpasses = false; + + // Enables use of "fma" intrinsic for invariant float math + bool invariant_float_math = false; + + // Emulate texturecube_array with texture2d_array for iOS where this type is not available + bool emulate_cube_array = false; + + // Allow user to enable decoration binding + bool enable_decoration_binding = false; + // Requires MSL 2.1, use the native support for texel buffers. bool texture_buffer_native = false; @@ -488,6 +506,11 @@ protected: SPVFuncImplArrayOfArrayCopy5Dim = SPVFuncImplArrayCopyMultidimBase + 5, SPVFuncImplArrayOfArrayCopy6Dim = SPVFuncImplArrayCopyMultidimBase + 6, SPVFuncImplTexelBufferCoords, + SPVFuncImplImage2DAtomicCoords, // Emulate texture2D atomic operations + SPVFuncImplFMul, + SPVFuncImplFAdd, + SPVFuncImplCubemapTo2DArrayFace, + SPVFuncImplUnsafeArray, // Allow Metal to use the array template to make arrays a value type SPVFuncImplInverse4x4, SPVFuncImplInverse3x3, SPVFuncImplInverse2x2, @@ -532,6 +555,9 @@ protected: SPVFuncImplArrayCopyMultidimMax = 6 }; + // If the underlying resource has been used for comparison then duplicate loads of that resource must be too + // Use Metal's native frame-buffer fetch API for subpass inputs. + void emit_texture_op(const Instruction &i) override; void emit_binary_unord_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); void emit_instruction(const Instruction &instr) override; void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, @@ -551,6 +577,16 @@ protected: const std::string &qualifier = "", uint32_t base_offset = 0) override; void emit_struct_padding_target(const SPIRType &type) override; std::string type_to_glsl(const SPIRType &type, uint32_t id = 0) override; + + // Allow Metal to use the array template to make arrays a value type + std::string type_to_array_glsl(const SPIRType &type) override; + + // Threadgroup arrays can't have a wrapper type + std::string variable_decl(const SPIRVariable &variable) override; + + // GCC workaround of lambdas calling protected functions (for older GCC versions) + std::string variable_decl(const SPIRType &type, const std::string &name, uint32_t id = 0) override; + std::string image_type_glsl(const SPIRType &type, uint32_t id = 0) override; std::string sampler_type(const SPIRType &type); std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage) override; @@ -564,9 +600,13 @@ protected: uint32_t grad_y, uint32_t lod, uint32_t coffset, uint32_t offset, uint32_t bias, uint32_t comp, uint32_t sample, uint32_t minlod, bool *p_forward) override; std::string to_initializer_expression(const SPIRVariable &var) override; + std::string unpack_expression_type(std::string expr_str, const SPIRType &type, uint32_t physical_type_id, bool is_packed, bool row_major) override; + // Returns true for BuiltInSampleMask because gl_SampleMask[] is an array in SPIR-V, but [[sample_mask]] is a scalar in Metal. + bool builtin_translates_to_nonarray(spv::BuiltIn builtin) const override; + std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override; bool skip_argument(uint32_t id) const override; std::string to_member_reference(uint32_t base, const SPIRType &type, uint32_t index, bool ptr_chain) override; @@ -574,6 +614,10 @@ protected: void replace_illegal_names() override; void declare_undefined_values() override; void declare_constant_arrays(); + + // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries + void declare_complex_constant_arrays(); + bool is_patch_block(const SPIRType &type); bool is_non_native_row_major_matrix(uint32_t id) override; bool member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index) override; @@ -614,6 +658,7 @@ protected: uint32_t ensure_correct_builtin_type(uint32_t type_id, spv::BuiltIn builtin); uint32_t ensure_correct_attribute_type(uint32_t type_id, uint32_t location); + void emit_custom_templates(); void emit_custom_functions(); void emit_resources(); void emit_specialization_constants_and_structs(); @@ -711,8 +756,11 @@ protected: void analyze_sampled_image_usage(); bool emit_tessellation_access_chain(const uint32_t *ops, uint32_t length); + bool emit_tessellation_io_load(uint32_t result_type, uint32_t id, uint32_t ptr); bool is_out_of_bounds_tessellation_level(uint32_t id_lhs); + void ensure_builtin(spv::StorageClass storage, spv::BuiltIn builtin); + void mark_implicit_builtin(spv::StorageClass storage, spv::BuiltIn builtin, uint32_t id); std::string convert_to_f32(const std::string &expr, uint32_t components); @@ -763,9 +811,20 @@ protected: VariableID patch_stage_out_var_id = 0; VariableID stage_in_ptr_var_id = 0; VariableID stage_out_ptr_var_id = 0; + + // Handle HLSL-style 0-based vertex/instance index. + enum class TriState + { + Neutral, + No, + Yes + }; + TriState needs_base_vertex_arg = TriState::Neutral; + TriState needs_base_instance_arg = TriState::Neutral; + bool has_sampled_images = false; - bool needs_vertex_idx_arg = false; - bool needs_instance_idx_arg = false; + bool builtin_declaration = false; // Handle HLSL-style 0-based vertex/instance index. + bool use_builtin_array = false; // Force the use of C style array declaration. bool is_rasterization_disabled = false; bool capture_output_to_buffer = false; bool needs_swizzle_buffer_def = false; @@ -794,6 +853,7 @@ protected: std::unordered_set buffers_requiring_array_length; SmallVector buffer_arrays; + std::unordered_set atomic_image_vars; // Emulate texture2D atomic operations // Must be ordered since array is in a specific order. std::map> buffers_requiring_dynamic_offset; @@ -826,6 +886,7 @@ protected: CompilerMSL &compiler; std::unordered_map result_types; + std::unordered_map image_pointers; // Emulate texture2D atomic operations bool suppress_missing_prototypes = false; bool uses_atomics = false; bool uses_resource_write = false; diff --git a/3rdparty/spirv-cross/test_shaders.py b/3rdparty/spirv-cross/test_shaders.py index 175e5b550..73187b36e 100755 --- a/3rdparty/spirv-cross/test_shaders.py +++ b/3rdparty/spirv-cross/test_shaders.py @@ -174,7 +174,10 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths): subprocess.check_call([paths.glslang, '--amb' ,'--target-env', 'vulkan1.1', '-V', '-o', spirv_path, shader]) if opt: - subprocess.check_call([paths.spirv_opt, '--skip-validation', '-O', '-o', spirv_path, spirv_path]) + if '.graphics-robust-access.' in shader: + subprocess.check_call([paths.spirv_opt, '--skip-validation', '-O', '--graphics-robust-access', '-o', spirv_path, spirv_path]) + else: + subprocess.check_call([paths.spirv_opt, '--skip-validation', '-O', '-o', spirv_path, spirv_path]) spirv_cross_path = paths.spirv_cross @@ -195,6 +198,12 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths): msl_args.append('--msl-argument-buffers') if '.texture-buffer-native.' in shader: msl_args.append('--msl-texture-buffer-native') + if '.framebuffer-fetch.' in shader: + msl_args.append('--msl-framebuffer-fetch') + if '.invariant-float-math.' in shader: + msl_args.append('--msl-invariant-float-math') + if '.emulate-cube-array.' in shader: + msl_args.append('--msl-emulate-cube-array') if '.discrete.' in shader: # Arbitrary for testing purposes. msl_args.append('--msl-discrete-descriptor-set') diff --git a/3rdparty/spirv-cross/test_shaders.sh b/3rdparty/spirv-cross/test_shaders.sh index 4498ac3f0..ee47ec64c 100755 --- a/3rdparty/spirv-cross/test_shaders.sh +++ b/3rdparty/spirv-cross/test_shaders.sh @@ -21,4 +21,6 @@ echo "Using SPIRV-Cross in: \"$SPIRV_CROSS_PATH\"." ./test_shaders.py shaders-hlsl --hlsl --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 ./test_shaders.py shaders-hlsl-no-opt --hlsl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 ./test_shaders.py shaders-reflection --reflect --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 +./test_shaders.py shaders-ue4 --msl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 +./test_shaders.py shaders-ue4 --msl --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 diff --git a/3rdparty/spirv-cross/update_test_shaders.sh b/3rdparty/spirv-cross/update_test_shaders.sh index c33afc5ca..7366e0bc9 100755 --- a/3rdparty/spirv-cross/update_test_shaders.sh +++ b/3rdparty/spirv-cross/update_test_shaders.sh @@ -21,5 +21,7 @@ echo "Using SPIRV-Cross in: \"$SPIRV_CROSS_PATH\"." ./test_shaders.py shaders-hlsl --update --hlsl --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 ./test_shaders.py shaders-hlsl-no-opt --update --hlsl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 ./test_shaders.py shaders-reflection --reflect --update --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 +./test_shaders.py shaders-ue4 --update --msl --spirv-cross "$SPIRV_CROSS_PATH" || exit 1 +./test_shaders.py shaders-ue4 --update --msl --opt --spirv-cross "$SPIRV_CROSS_PATH" || exit 1