MSL: Rewrite tessellation_access_chain.

To support loading array of array properly in tessellation, we need a
rewrite of how tessellation access chains are handled.

The major change is to remove the implicit unflatten step inside
access_chain which does not take into account the case where you load
directly from a control point array variable.

We defer unflatten step until OpLoad time instead.
This fixes cases where we load array of {array,matrix,struct}.

Removes the hacky path for MSL access chain index workaround.
This commit is contained in:
Hans-Kristian Arntzen 2019-10-25 16:41:02 +02:00
parent bac2c34590
commit 27d6d45671
38 changed files with 1344 additions and 311 deletions

View File

@ -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 = { 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);

View File

@ -0,0 +1,73 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<float4x4, 32> _16 = { 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<float4x4, 32> tmp;
tmp = _16;
gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID];
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,70 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<float4, 32> _15 = { 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<float4, 32> tmp;
tmp = _15;
gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID];
}

View File

@ -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 = { patchIn.gl_in[0].Foo_a, patchIn.gl_in[0].Foo_b };
out.gl_Position += _203.a;
out.gl_Position += _203.b;
Foo _217 = { patchIn.gl_in[1].Foo_a, patchIn.gl_in[1].Foo_b };
out.gl_Position += _217.a;
out.gl_Position += _217.b;
return out;
}

View File

@ -0,0 +1,85 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<main0_in> gl_in;
};
[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]])
{
main0_out out = {};
spvUnsafeArray<float4, 4> 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;
}

View File

@ -0,0 +1,78 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<main0_in> gl_in;
};
[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]])
{
main0_out out = {};
spvUnsafeArray<float4, 4> 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;
}

View File

@ -308,7 +308,15 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FBasePassVSToDS, 12> _282 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid, gl_in[0].in_var_COLOR0, { gl_in[0].in_var_TEXCOORD0_0 }, gl_in[0].in_var_TEXCOORD4, gl_in[0].in_var_PRIMITIVE_ID, gl_in[0].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[0].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[1].in_var_COLOR0, { gl_in[1].in_var_TEXCOORD0_0 }, gl_in[1].in_var_TEXCOORD4, gl_in[1].in_var_PRIMITIVE_ID, gl_in[1].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[1].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[2].in_var_COLOR0, { gl_in[2].in_var_TEXCOORD0_0 }, gl_in[2].in_var_TEXCOORD4, gl_in[2].in_var_PRIMITIVE_ID, gl_in[2].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[2].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[3].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[3].in_var_COLOR0, { gl_in[3].in_var_TEXCOORD0_0 }, gl_in[3].in_var_TEXCOORD4, gl_in[3].in_var_PRIMITIVE_ID, gl_in[3].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[3].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[4].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[4].in_var_COLOR0, { gl_in[4].in_var_TEXCOORD0_0 }, gl_in[4].in_var_TEXCOORD4, gl_in[4].in_var_PRIMITIVE_ID, gl_in[4].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[4].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[5].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[5].in_var_COLOR0, { gl_in[5].in_var_TEXCOORD0_0 }, gl_in[5].in_var_TEXCOORD4, gl_in[5].in_var_PRIMITIVE_ID, gl_in[5].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[5].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[6].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[6].in_var_COLOR0, { gl_in[6].in_var_TEXCOORD0_0 }, gl_in[6].in_var_TEXCOORD4, gl_in[6].in_var_PRIMITIVE_ID, gl_in[6].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[6].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[7].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[7].in_var_COLOR0, { gl_in[7].in_var_TEXCOORD0_0 }, gl_in[7].in_var_TEXCOORD4, gl_in[7].in_var_PRIMITIVE_ID, gl_in[7].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[7].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[8].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[8].in_var_COLOR0, { gl_in[8].in_var_TEXCOORD0_0 }, gl_in[8].in_var_TEXCOORD4, gl_in[8].in_var_PRIMITIVE_ID, gl_in[8].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[8].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[9].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[9].in_var_COLOR0, { gl_in[9].in_var_TEXCOORD0_0 }, gl_in[9].in_var_TEXCOORD4, gl_in[9].in_var_PRIMITIVE_ID, gl_in[9].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[9].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[10].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[10].in_var_COLOR0, { gl_in[10].in_var_TEXCOORD0_0 }, gl_in[10].in_var_TEXCOORD4, gl_in[10].in_var_PRIMITIVE_ID, gl_in[10].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[10].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[11].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD11_centroid, gl_in[11].in_var_COLOR0, { gl_in[11].in_var_TEXCOORD0_0 }, gl_in[11].in_var_TEXCOORD4, gl_in[11].in_var_PRIMITIVE_ID, gl_in[11].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[11].in_var_VS_To_DS_Position } };
spvUnsafeArray<float4, 12> _142 = { 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<float4, 12> _143 = { 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<float4, 12> _144 = { 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<spvUnsafeArray<float4, 12>, 1> _145 = { { gl_in[0].in_var_TEXCOORD0_0 }, { gl_in[1].in_var_TEXCOORD0_0 }, { gl_in[2].in_var_TEXCOORD0_0 }, { gl_in[3].in_var_TEXCOORD0_0 }, { gl_in[4].in_var_TEXCOORD0_0 }, { gl_in[5].in_var_TEXCOORD0_0 }, { gl_in[6].in_var_TEXCOORD0_0 }, { gl_in[7].in_var_TEXCOORD0_0 }, { gl_in[8].in_var_TEXCOORD0_0 }, { gl_in[9].in_var_TEXCOORD0_0 }, { gl_in[10].in_var_TEXCOORD0_0 }, { gl_in[11].in_var_TEXCOORD0_0 } };
spvUnsafeArray<float4, 12> _146 = { 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<uint, 12> _147 = { 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<uint, 12> _148 = { 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<float4, 12> _257 = { 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<FBasePassVSToDS, 12> _282 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0], _144[0], _145[0], _146[0], _147[0], _148[0] } }, FBasePassInterpolantsVSToDS{ { } }, _257[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1], _144[1], _145[1], _146[1], _147[1], _148[1] } }, FBasePassInterpolantsVSToDS{ { } }, _257[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2], _144[2], _145[2], _146[2], _147[2], _148[2] } }, FBasePassInterpolantsVSToDS{ { } }, _257[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3], _144[3], _145[3], _146[3], _147[3], _148[3] } }, FBasePassInterpolantsVSToDS{ { } }, _257[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4], _144[4], _145[4], _146[4], _147[4], _148[4] } }, FBasePassInterpolantsVSToDS{ { } }, _257[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5], _144[5], _145[5], _146[5], _147[5], _148[5] } }, FBasePassInterpolantsVSToDS{ { } }, _257[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6], _144[6], _145[6], _146[6], _147[6], _148[6] } }, FBasePassInterpolantsVSToDS{ { } }, _257[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7], _144[7], _145[7], _146[7], _147[7], _148[7] } }, FBasePassInterpolantsVSToDS{ { } }, _257[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8], _144[8], _145[8], _146[8], _147[8], _148[8] } }, FBasePassInterpolantsVSToDS{ { } }, _257[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9], _144[9], _145[9], _146[9], _147[9], _148[9] } }, FBasePassInterpolantsVSToDS{ { } }, _257[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10], _144[10], _145[10], _146[10], _147[10], _148[10] } }, FBasePassInterpolantsVSToDS{ { } }, _257[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11], _144[11], _145[11], _146[11], _147[11], _148[11] } }, FBasePassInterpolantsVSToDS{ { } }, _257[11] } };
spvUnsafeArray<FBasePassVSToDS, 12> param_var_I;
param_var_I = _282;
float4 _299 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0);

View File

@ -350,7 +350,11 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid } }, gl_in[0].in_var_VS_To_DS_Position, gl_in[0].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid } }, gl_in[1].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid } }, gl_in[2].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[3].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD11_centroid } }, gl_in[3].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[4].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD11_centroid } }, gl_in[4].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[5].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD11_centroid } }, gl_in[5].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[6].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD11_centroid } }, gl_in[6].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[7].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD11_centroid } }, gl_in[7].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[8].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD11_centroid } }, gl_in[8].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[9].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD11_centroid } }, gl_in[9].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[10].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD11_centroid } }, gl_in[10].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[11].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD11_centroid } }, gl_in[11].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_VertexID } };
spvUnsafeArray<float4, 12> _138 = { 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<float4, 12> _139 = { 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<float4, 12> _188 = { 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<uint, 12> _189 = { 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<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[0], _139[0] } }, _188[0], _189[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[1], _139[1] } }, _188[1], _189[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[2], _139[2] } }, _188[2], _189[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[3], _139[3] } }, _188[3], _189[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[4], _139[4] } }, _188[4], _189[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[5], _139[5] } }, _188[5], _189[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[6], _139[6] } }, _188[6], _189[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[7], _139[7] } }, _188[7], _189[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[8], _139[8] } }, _188[8], _189[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[9], _139[9] } }, _188[9], _189[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[10], _139[10] } }, _188[10], _189[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[11], _139[11] } }, _188[11], _189[11] } };
spvUnsafeArray<FHitProxyVSToDS, 12> param_var_I;
param_var_I = _226;
float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0);

View File

@ -326,7 +326,12 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid, gl_in[0].in_var_COLOR0, { gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 } } }, gl_in[0].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[1].in_var_COLOR0, { gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 } } }, gl_in[1].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[2].in_var_COLOR0, { gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 } } }, gl_in[2].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[3].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[3].in_var_COLOR0, { gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 } } }, gl_in[3].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[4].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[4].in_var_COLOR0, { gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 } } }, gl_in[4].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[5].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[5].in_var_COLOR0, { gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 } } }, gl_in[5].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[6].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[6].in_var_COLOR0, { gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 } } }, gl_in[6].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[7].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[7].in_var_COLOR0, { gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 } } }, gl_in[7].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[8].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[8].in_var_COLOR0, { gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 } } }, gl_in[8].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[9].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[9].in_var_COLOR0, { gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 } } }, gl_in[9].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[10].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[10].in_var_COLOR0, { gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 } } }, gl_in[10].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[11].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD11_centroid, gl_in[11].in_var_COLOR0, { gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 } } }, gl_in[11].in_var_VS_To_DS_Position } };
spvUnsafeArray<float4, 12> _125 = { 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<float4, 12> _126 = { 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<float4, 12> _127 = { 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<spvUnsafeArray<float2, 12>, 2> _128 = { { gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }, { gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }, { gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }, { gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }, { gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }, { gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }, { gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }, { gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }, { gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }, { gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }, { gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }, { gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 } };
spvUnsafeArray<float4, 12> _201 = { 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<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[0], _126[0], _127[0], _128[0] } }, _201[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[1], _126[1], _127[1], _128[1] } }, _201[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[2], _126[2], _127[2], _128[2] } }, _201[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[3], _126[3], _127[3], _128[3] } }, _201[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[4], _126[4], _127[4], _128[4] } }, _201[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[5], _126[5], _127[5], _128[5] } }, _201[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[6], _126[6], _127[6], _128[6] } }, _201[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[7], _126[7], _127[7], _128[7] } }, _201[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[8], _126[8], _127[8], _128[8] } }, _201[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[9], _126[9], _127[9], _128[9] } }, _201[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[10], _126[10], _127[10], _128[10] } }, _201[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[11], _126[11], _127[11], _128[11] } }, _201[11] } };
spvUnsafeArray<FHitProxyVSToDS, 12> param_var_I;
param_var_I = _226;
float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0);

View File

@ -143,7 +143,10 @@ kernel void main0(main0_in in [[stage_in]], constant type_Primitive& Primitive [
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FBasePassVSToDS, 3> _108 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[0].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[1].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[2].in_var_VS_To_DS_Position } };
spvUnsafeArray<float4, 3> _87 = { gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid };
spvUnsafeArray<float4, 3> _88 = { gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid };
spvUnsafeArray<float4, 3> _101 = { 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<FBasePassVSToDS, 3> _108 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[0], _88[0] } }, FBasePassInterpolantsVSToDS{ { } }, _101[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[1], _88[1] } }, FBasePassInterpolantsVSToDS{ { } }, _101[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[2], _88[2] } }, FBasePassInterpolantsVSToDS{ { } }, _101[2] } };
spvUnsafeArray<FBasePassVSToDS, 3> param_var_I;
param_var_I = _108;
float3 _125 = 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);

View File

@ -366,6 +366,12 @@ struct main0_patchIn
{
main0_out out = {};
spvUnsafeArray<float4, 1> out_var_TEXCOORD0 = {};
spvUnsafeArray<float4, 3> _117 = { 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<float4, 3> _118 = { 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<float4, 3> _119 = { patchIn.gl_in[0].in_var_COLOR0, patchIn.gl_in[1].in_var_COLOR0, patchIn.gl_in[2].in_var_COLOR0 };
spvUnsafeArray<spvUnsafeArray<float4, 3>, 1> _120 = { { patchIn.gl_in[0].in_var_TEXCOORD0_0 }, { patchIn.gl_in[1].in_var_TEXCOORD0_0 }, { patchIn.gl_in[2].in_var_TEXCOORD0_0 } };
spvUnsafeArray<spvUnsafeArray<float4, 3>, 3> _135 = { { 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 }, { 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 }, { 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<float, 3> _136 = { 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;
@ -375,14 +381,14 @@ struct main0_patchIn
float4 _177 = float4(_157 * 3.0);
float4 _181 = float4(_158 * 3.0);
float4 _188 = float4(_159 * 3.0);
float4 _202 = (((((((((((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_157)) * _165) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_158)) * _169)) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_159)) * _174)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _177) * _169)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _181) * _165)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _181) * _174)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _188) * _169)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _188) * _165)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _177) * _174)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _174) * _165) * _169);
float3 _226 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.x)) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.y))).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.z));
float4 _229 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _165) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _169)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _174);
float4 _231 = ((patchIn.gl_in[0].in_var_COLOR0 * _165) + (patchIn.gl_in[1].in_var_COLOR0 * _169)) + (patchIn.gl_in[2].in_var_COLOR0 * _174);
float4 _233 = (((spvUnsafeArray<float4, 1>({ patchIn.gl_in[0].in_var_TEXCOORD0_0 })[0]) * _165) + ((spvUnsafeArray<float4, 1>({ patchIn.gl_in[1].in_var_TEXCOORD0_0 })[0]) * _169)) + ((spvUnsafeArray<float4, 1>({ patchIn.gl_in[2].in_var_TEXCOORD0_0 })[0]) * _174);
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<float4, 1> _234 = { _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(((patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.x) + (patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.y)) + (patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.z)));
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))

View File

@ -277,6 +277,18 @@ struct main0_patchIn
[[ 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<float> View_GlobalDistanceFieldTexture0 [[texture(0)]], texture3d<float> View_GlobalDistanceFieldTexture1 [[texture(1)]], texture3d<float> View_GlobalDistanceFieldTexture2 [[texture(2)]], texture3d<float> View_GlobalDistanceFieldTexture3 [[texture(3)]], sampler View_GlobalDistanceFieldSampler0 [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]])
{
main0_out out = {};
spvUnsafeArray<float4, 3> _120 = { patchIn.gl_in[0].in_var_TEXCOORD6, patchIn.gl_in[1].in_var_TEXCOORD6, patchIn.gl_in[2].in_var_TEXCOORD6 };
spvUnsafeArray<float4, 3> _121 = { patchIn.gl_in[0].in_var_TEXCOORD8, patchIn.gl_in[1].in_var_TEXCOORD8, patchIn.gl_in[2].in_var_TEXCOORD8 };
spvUnsafeArray<float4, 3> _128 = { 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<float4, 3> _129 = { 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<spvUnsafeArray<float4, 3>, 3> _136 = { { 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 }, { 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 }, { 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<float, 3> _137 = { 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<float4, 3> _138 = { 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<float3, 3> _139 = { 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<float4, 3> _146 = { 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<float4, 3> _147 = { 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<float3, 3> _148 = { 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<float3, 3> _149 = { 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;
@ -286,12 +298,12 @@ struct main0_patchIn
float4 _210 = float4(_190 * 3.0);
float4 _214 = float4(_191 * 3.0);
float4 _221 = float4(_192 * 3.0);
float4 _235 = (((((((((((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_190)) * _198) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_191)) * _202)) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_192)) * _207)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _210) * _202)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _214) * _198)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _214) * _207)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _221) * _202)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _221) * _198)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _210) * _207)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _207) * _198) * _202);
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 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * _237) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * _240)).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * _254);
float4 _259 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _198) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _202)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _207);
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;
@ -308,8 +320,8 @@ struct main0_patchIn
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) * patchIn.gl_in[0].in_var_PN_DominantVertex1) + (float4(_367) * patchIn.gl_in[1].in_var_PN_DominantVertex1)) + (float4(_370) * patchIn.gl_in[2].in_var_PN_DominantVertex1);
_388 = ((float3(_363) * patchIn.gl_in[0].in_var_PN_DominantVertex2) + (float3(_367) * patchIn.gl_in[1].in_var_PN_DominantVertex2)) + (float3(_370) * patchIn.gl_in[2].in_var_PN_DominantVertex2);
_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
{
@ -320,13 +332,13 @@ struct main0_patchIn
float4 _304 = float4(_279);
float4 _306 = float4(_282);
float4 _309 = float4(_285);
float4 _311 = ((_304 * patchIn.gl_in[0].in_var_PN_DominantEdge2) + (_306 * patchIn.gl_in[1].in_var_PN_DominantEdge2)) + (_309 * patchIn.gl_in[2].in_var_PN_DominantEdge2);
float4 _316 = ((_304 * patchIn.gl_in[0].in_var_PN_DominantEdge3) + (_306 * patchIn.gl_in[1].in_var_PN_DominantEdge3)) + (_309 * patchIn.gl_in[2].in_var_PN_DominantEdge3);
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 * patchIn.gl_in[0].in_var_PN_DominantEdge4) + (_333 * patchIn.gl_in[1].in_var_PN_DominantEdge4)) + (_336 * patchIn.gl_in[2].in_var_PN_DominantEdge4);
float3 _343 = ((_331 * patchIn.gl_in[0].in_var_PN_DominantEdge5) + (_333 * patchIn.gl_in[1].in_var_PN_DominantEdge5)) + (_336 * patchIn.gl_in[2].in_var_PN_DominantEdge5);
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)));
}
@ -388,13 +400,13 @@ struct main0_patchIn
}
_547 = _535;
}
float3 _565 = _264 + ((_398[2] * float3(fast::min(_547 + Material.Material_ScalarExpressions[0].z, 0.0) * Material.Material_ScalarExpressions[0].w)) * float3(((patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.x) + (patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.y)) + (patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.z)));
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 = ((patchIn.gl_in[0].in_var_TEXCOORD6 * _198) + (patchIn.gl_in[1].in_var_TEXCOORD6 * _202)) + (patchIn.gl_in[2].in_var_TEXCOORD6 * _207);
out.out_var_TEXCOORD7 = ((patchIn.gl_in[0].in_var_TEXCOORD8 * _198) + (patchIn.gl_in[1].in_var_TEXCOORD8 * _202)) + (patchIn.gl_in[2].in_var_TEXCOORD8 * _207);
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));

View File

@ -174,6 +174,9 @@ struct main0_patchIn
[[ 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<float4, 3> _93 = { 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<float4, 3> _94 = { 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<spvUnsafeArray<float4, 3>, 3> _101 = { { 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 }, { 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 }, { 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;
@ -183,9 +186,9 @@ struct main0_patchIn
float4 _139 = float4(_119 * 3.0);
float4 _143 = float4(_120 * 3.0);
float4 _150 = float4(_121 * 3.0);
float4 _164 = (((((((((((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_119)) * _127) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_120)) * _131)) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_121)) * _136)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _139) * _131)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _143) * _127)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _143) * _136)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _150) * _131)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _150) * _127)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _139) * _136)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _136) * _127) * _131);
float3 _179 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.x)) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.y))).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.z));
float4 _182 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _127) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _131)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _136);
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))

View File

@ -266,14 +266,21 @@ struct main0_patchIn
{
main0_out out = {};
spvUnsafeArray<float4, 1> out_var_TEXCOORD0 = {};
spvUnsafeArray<float4, 3> _77 = { 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<float4, 3> _78 = { 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<spvUnsafeArray<float4, 3>, 1> _79 = { { patchIn.gl_in[0].in_var_TEXCOORD0_0 }, { patchIn.gl_in[1].in_var_TEXCOORD0_0 }, { patchIn.gl_in[2].in_var_TEXCOORD0_0 } };
spvUnsafeArray<float4, 3> _80 = { patchIn.gl_in[0].in_var_COLOR1, patchIn.gl_in[1].in_var_COLOR1, patchIn.gl_in[2].in_var_COLOR1 };
spvUnsafeArray<float4, 3> _81 = { patchIn.gl_in[0].in_var_COLOR2, patchIn.gl_in[1].in_var_COLOR2, patchIn.gl_in[2].in_var_COLOR2 };
spvUnsafeArray<float4, 3> _97 = { 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<float3, 3> _98 = { 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 = ((patchIn.gl_in[0].in_var_VS_To_DS_Position * _111) + (patchIn.gl_in[1].in_var_VS_To_DS_Position * _113)) + (patchIn.gl_in[2].in_var_VS_To_DS_Position * _116);
float4 _118 = ((_97[0] * _111) + (_97[1] * _113)) + (_97[2] * _116);
spvUnsafeArray<float4, 1> _72;
_72 = { patchIn.gl_in[0].in_var_TEXCOORD0_0 };
_72 = _79[0];
spvUnsafeArray<float4, 1> _71;
_71 = { patchIn.gl_in[1].in_var_TEXCOORD0_0 };
_71 = _79[1];
float3 _120 = float3(gl_TessCoord.x);
float3 _123 = float3(gl_TessCoord.y);
spvUnsafeArray<float4, 1> _73;
@ -286,9 +293,9 @@ struct main0_patchIn
spvUnsafeArray<float4, 1> _75;
_75 = _73;
spvUnsafeArray<float4, 1> _74;
_74 = { patchIn.gl_in[2].in_var_TEXCOORD0_0 };
_74 = _79[2];
float3 _155 = float3(gl_TessCoord.z);
float3 _157 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * _120) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * _123)).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * _155);
float3 _157 = ((_77[0].xyz * _120) + (_77[1].xyz * _123)).xyz + (_77[2].xyz * _155);
spvUnsafeArray<float4, 1> _76;
for (int _164 = 0; _164 < 1; )
{
@ -298,12 +305,12 @@ struct main0_patchIn
}
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 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _111) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _113)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _116);
out.out_var_TEXCOORD11_centroid = ((_78[0] * _111) + (_78[1] * _113)) + (_78[2] * _116);
out_var_TEXCOORD0 = _76;
out.out_var_COLOR1 = ((patchIn.gl_in[0].in_var_COLOR1 * _111) + (patchIn.gl_in[1].in_var_COLOR1 * _113)) + (patchIn.gl_in[2].in_var_COLOR1 * _116);
out.out_var_COLOR2 = ((patchIn.gl_in[0].in_var_COLOR2 * _111) + (patchIn.gl_in[1].in_var_COLOR2 * _113)) + (patchIn.gl_in[2].in_var_COLOR2 * _116);
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 = ((patchIn.gl_in[0].in_var_TEXCOORD7 * _120) + (patchIn.gl_in[1].in_var_TEXCOORD7 * _123)) + (patchIn.gl_in[2].in_var_TEXCOORD7 * _155);
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;

View File

@ -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 = { 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);

View File

@ -0,0 +1,73 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<float4x4, 32> _16 = { 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<float4x4, 32> tmp;
tmp = _16;
gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID];
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,70 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<float4, 32> _15 = { 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<float4, 32> tmp;
tmp = _15;
gl_out[gl_InvocationID].vOutputs = tmp[gl_InvocationID];
}

View File

@ -62,16 +62,12 @@ void set_from_function(thread float4& gl_Position, thread patch_control_point<ma
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 = { 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 = { gl_in[1].Foo_a, gl_in[1].Foo_b };
foo = _120;
gl_Position += foo.a;
gl_Position += foo.b;
}

View File

@ -0,0 +1,84 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<main0_in> gl_in;
};
[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]])
{
main0_out out = {};
spvUnsafeArray<float4, 4> vBoo = {};
vBoo[0] = patchIn.vBoo_0;
vBoo[1] = patchIn.vBoo_1;
vBoo[2] = patchIn.vBoo_2;
vBoo[3] = patchIn.vBoo_3;
spvUnsafeArray<float4x4, 32> _16 = { 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<float4x4, 32> tmp;
tmp = _16;
out.gl_Position = (tmp[0][patchIn.vIndex] + tmp[1][patchIn.vIndex]) + vBoo[patchIn.vIndex];
return out;
}

View File

@ -0,0 +1,81 @@
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wmissing-braces"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
template<typename T, size_t Num>
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<main0_in> gl_in;
};
[[ patch(quad, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]])
{
main0_out out = {};
spvUnsafeArray<float4, 4> vBoo = {};
vBoo[0] = patchIn.vBoo_0;
vBoo[1] = patchIn.vBoo_1;
vBoo[2] = patchIn.vBoo_2;
vBoo[3] = patchIn.vBoo_3;
spvUnsafeArray<float4, 32> _15 = { 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<float4, 32> tmp;
tmp = _15;
out.gl_Position = (tmp[0] + tmp[1]) + vBoo[patchIn.vIndex];
return out;
}

View File

@ -308,7 +308,15 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FBasePassVSToDS, 12> _282 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid, gl_in[0].in_var_COLOR0, { gl_in[0].in_var_TEXCOORD0_0 }, gl_in[0].in_var_TEXCOORD4, gl_in[0].in_var_PRIMITIVE_ID, gl_in[0].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[0].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[1].in_var_COLOR0, { gl_in[1].in_var_TEXCOORD0_0 }, gl_in[1].in_var_TEXCOORD4, gl_in[1].in_var_PRIMITIVE_ID, gl_in[1].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[1].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[2].in_var_COLOR0, { gl_in[2].in_var_TEXCOORD0_0 }, gl_in[2].in_var_TEXCOORD4, gl_in[2].in_var_PRIMITIVE_ID, gl_in[2].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[2].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[3].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[3].in_var_COLOR0, { gl_in[3].in_var_TEXCOORD0_0 }, gl_in[3].in_var_TEXCOORD4, gl_in[3].in_var_PRIMITIVE_ID, gl_in[3].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[3].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[4].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[4].in_var_COLOR0, { gl_in[4].in_var_TEXCOORD0_0 }, gl_in[4].in_var_TEXCOORD4, gl_in[4].in_var_PRIMITIVE_ID, gl_in[4].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[4].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[5].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[5].in_var_COLOR0, { gl_in[5].in_var_TEXCOORD0_0 }, gl_in[5].in_var_TEXCOORD4, gl_in[5].in_var_PRIMITIVE_ID, gl_in[5].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[5].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[6].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[6].in_var_COLOR0, { gl_in[6].in_var_TEXCOORD0_0 }, gl_in[6].in_var_TEXCOORD4, gl_in[6].in_var_PRIMITIVE_ID, gl_in[6].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[6].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[7].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[7].in_var_COLOR0, { gl_in[7].in_var_TEXCOORD0_0 }, gl_in[7].in_var_TEXCOORD4, gl_in[7].in_var_PRIMITIVE_ID, gl_in[7].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[7].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[8].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[8].in_var_COLOR0, { gl_in[8].in_var_TEXCOORD0_0 }, gl_in[8].in_var_TEXCOORD4, gl_in[8].in_var_PRIMITIVE_ID, gl_in[8].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[8].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[9].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[9].in_var_COLOR0, { gl_in[9].in_var_TEXCOORD0_0 }, gl_in[9].in_var_TEXCOORD4, gl_in[9].in_var_PRIMITIVE_ID, gl_in[9].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[9].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[10].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[10].in_var_COLOR0, { gl_in[10].in_var_TEXCOORD0_0 }, gl_in[10].in_var_TEXCOORD4, gl_in[10].in_var_PRIMITIVE_ID, gl_in[10].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[10].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[11].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD11_centroid, gl_in[11].in_var_COLOR0, { gl_in[11].in_var_TEXCOORD0_0 }, gl_in[11].in_var_TEXCOORD4, gl_in[11].in_var_PRIMITIVE_ID, gl_in[11].in_var_LIGHTMAP_ID } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[11].in_var_VS_To_DS_Position } };
spvUnsafeArray<float4, 12> _142 = { 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<float4, 12> _143 = { 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<float4, 12> _144 = { 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<spvUnsafeArray<float4, 12>, 1> _145 = { { gl_in[0].in_var_TEXCOORD0_0 }, { gl_in[1].in_var_TEXCOORD0_0 }, { gl_in[2].in_var_TEXCOORD0_0 }, { gl_in[3].in_var_TEXCOORD0_0 }, { gl_in[4].in_var_TEXCOORD0_0 }, { gl_in[5].in_var_TEXCOORD0_0 }, { gl_in[6].in_var_TEXCOORD0_0 }, { gl_in[7].in_var_TEXCOORD0_0 }, { gl_in[8].in_var_TEXCOORD0_0 }, { gl_in[9].in_var_TEXCOORD0_0 }, { gl_in[10].in_var_TEXCOORD0_0 }, { gl_in[11].in_var_TEXCOORD0_0 } };
spvUnsafeArray<float4, 12> _146 = { 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<uint, 12> _147 = { 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<uint, 12> _148 = { 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<float4, 12> _257 = { 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<FBasePassVSToDS, 12> _282 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0], _144[0], _145[0], _146[0], _147[0], _148[0] } }, FBasePassInterpolantsVSToDS{ { } }, _257[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1], _144[1], _145[1], _146[1], _147[1], _148[1] } }, FBasePassInterpolantsVSToDS{ { } }, _257[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2], _144[2], _145[2], _146[2], _147[2], _148[2] } }, FBasePassInterpolantsVSToDS{ { } }, _257[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3], _144[3], _145[3], _146[3], _147[3], _148[3] } }, FBasePassInterpolantsVSToDS{ { } }, _257[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4], _144[4], _145[4], _146[4], _147[4], _148[4] } }, FBasePassInterpolantsVSToDS{ { } }, _257[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5], _144[5], _145[5], _146[5], _147[5], _148[5] } }, FBasePassInterpolantsVSToDS{ { } }, _257[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6], _144[6], _145[6], _146[6], _147[6], _148[6] } }, FBasePassInterpolantsVSToDS{ { } }, _257[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7], _144[7], _145[7], _146[7], _147[7], _148[7] } }, FBasePassInterpolantsVSToDS{ { } }, _257[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8], _144[8], _145[8], _146[8], _147[8], _148[8] } }, FBasePassInterpolantsVSToDS{ { } }, _257[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9], _144[9], _145[9], _146[9], _147[9], _148[9] } }, FBasePassInterpolantsVSToDS{ { } }, _257[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10], _144[10], _145[10], _146[10], _147[10], _148[10] } }, FBasePassInterpolantsVSToDS{ { } }, _257[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11], _144[11], _145[11], _146[11], _147[11], _148[11] } }, FBasePassInterpolantsVSToDS{ { } }, _257[11] } };
spvUnsafeArray<FBasePassVSToDS, 12> param_var_I;
param_var_I = _282;
float4 _299 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0);

View File

@ -350,7 +350,11 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid } }, gl_in[0].in_var_VS_To_DS_Position, gl_in[0].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid } }, gl_in[1].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid } }, gl_in[2].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[3].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD11_centroid } }, gl_in[3].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[4].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD11_centroid } }, gl_in[4].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[5].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD11_centroid } }, gl_in[5].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[6].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD11_centroid } }, gl_in[6].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[7].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD11_centroid } }, gl_in[7].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[8].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD11_centroid } }, gl_in[8].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[9].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD11_centroid } }, gl_in[9].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[10].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD11_centroid } }, gl_in[10].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_VertexID }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[11].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD11_centroid } }, gl_in[11].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_VertexID } };
spvUnsafeArray<float4, 12> _138 = { 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<float4, 12> _139 = { 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<float4, 12> _188 = { 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<uint, 12> _189 = { 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<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[0], _139[0] } }, _188[0], _189[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[1], _139[1] } }, _188[1], _189[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[2], _139[2] } }, _188[2], _189[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[3], _139[3] } }, _188[3], _189[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[4], _139[4] } }, _188[4], _189[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[5], _139[5] } }, _188[5], _189[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[6], _139[6] } }, _188[6], _189[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[7], _139[7] } }, _188[7], _189[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[8], _139[8] } }, _188[8], _189[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[9], _139[9] } }, _188[9], _189[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[10], _139[10] } }, _188[10], _189[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[11], _139[11] } }, _188[11], _189[11] } };
spvUnsafeArray<FHitProxyVSToDS, 12> param_var_I;
param_var_I = _226;
float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0);

View File

@ -326,7 +326,12 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid, gl_in[0].in_var_COLOR0, { gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 } } }, gl_in[0].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[1].in_var_COLOR0, { gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 } } }, gl_in[1].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[2].in_var_COLOR0, { gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 } } }, gl_in[2].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[3].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[3].in_var_COLOR0, { gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 } } }, gl_in[3].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[4].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[4].in_var_COLOR0, { gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 } } }, gl_in[4].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[5].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[5].in_var_COLOR0, { gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 } } }, gl_in[5].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[6].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[6].in_var_COLOR0, { gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 } } }, gl_in[6].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[7].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[7].in_var_COLOR0, { gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 } } }, gl_in[7].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[8].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[8].in_var_COLOR0, { gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 } } }, gl_in[8].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[9].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[9].in_var_COLOR0, { gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 } } }, gl_in[9].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[10].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[10].in_var_COLOR0, { gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 } } }, gl_in[10].in_var_VS_To_DS_Position }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[11].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD11_centroid, gl_in[11].in_var_COLOR0, { gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 } } }, gl_in[11].in_var_VS_To_DS_Position } };
spvUnsafeArray<float4, 12> _125 = { 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<float4, 12> _126 = { 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<float4, 12> _127 = { 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<spvUnsafeArray<float2, 12>, 2> _128 = { { gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }, { gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }, { gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }, { gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }, { gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }, { gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }, { gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }, { gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }, { gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }, { gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }, { gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }, { gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 } };
spvUnsafeArray<float4, 12> _201 = { 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<FHitProxyVSToDS, 12> _226 = { FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[0], _126[0], _127[0], _128[0] } }, _201[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[1], _126[1], _127[1], _128[1] } }, _201[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[2], _126[2], _127[2], _128[2] } }, _201[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[3], _126[3], _127[3], _128[3] } }, _201[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[4], _126[4], _127[4], _128[4] } }, _201[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[5], _126[5], _127[5], _128[5] } }, _201[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[6], _126[6], _127[6], _128[6] } }, _201[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[7], _126[7], _127[7], _128[7] } }, _201[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[8], _126[8], _127[8], _128[8] } }, _201[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[9], _126[9], _127[9], _128[9] } }, _201[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[10], _126[10], _127[10], _128[10] } }, _201[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[11], _126[11], _127[11], _128[11] } }, _201[11] } };
spvUnsafeArray<FHitProxyVSToDS, 12> param_var_I;
param_var_I = _226;
float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0);

View File

@ -143,7 +143,10 @@ kernel void main0(main0_in in [[stage_in]], constant type_Primitive& Primitive [
threadgroup_barrier(mem_flags::mem_threadgroup);
if (gl_InvocationID >= 3)
return;
spvUnsafeArray<FBasePassVSToDS, 3> _108 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[0].in_var_TEXCOORD11_centroid } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[0].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[1].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD11_centroid } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[1].in_var_VS_To_DS_Position }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ gl_in[2].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD11_centroid } }, FBasePassInterpolantsVSToDS{ { } }, gl_in[2].in_var_VS_To_DS_Position } };
spvUnsafeArray<float4, 3> _87 = { gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid };
spvUnsafeArray<float4, 3> _88 = { gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid };
spvUnsafeArray<float4, 3> _101 = { 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<FBasePassVSToDS, 3> _108 = { FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[0], _88[0] } }, FBasePassInterpolantsVSToDS{ { } }, _101[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[1], _88[1] } }, FBasePassInterpolantsVSToDS{ { } }, _101[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[2], _88[2] } }, FBasePassInterpolantsVSToDS{ { } }, _101[2] } };
spvUnsafeArray<FBasePassVSToDS, 3> param_var_I;
param_var_I = _108;
float3 _125 = 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);

View File

@ -366,6 +366,12 @@ struct main0_patchIn
{
main0_out out = {};
spvUnsafeArray<float4, 1> out_var_TEXCOORD0 = {};
spvUnsafeArray<float4, 3> _117 = { 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<float4, 3> _118 = { 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<float4, 3> _119 = { patchIn.gl_in[0].in_var_COLOR0, patchIn.gl_in[1].in_var_COLOR0, patchIn.gl_in[2].in_var_COLOR0 };
spvUnsafeArray<spvUnsafeArray<float4, 3>, 1> _120 = { { patchIn.gl_in[0].in_var_TEXCOORD0_0 }, { patchIn.gl_in[1].in_var_TEXCOORD0_0 }, { patchIn.gl_in[2].in_var_TEXCOORD0_0 } };
spvUnsafeArray<spvUnsafeArray<float4, 3>, 3> _135 = { { 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 }, { 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 }, { 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<float, 3> _136 = { 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;
@ -375,14 +381,14 @@ struct main0_patchIn
float4 _177 = float4(_157 * 3.0);
float4 _181 = float4(_158 * 3.0);
float4 _188 = float4(_159 * 3.0);
float4 _202 = (((((((((((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_157)) * _165) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_158)) * _169)) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_159)) * _174)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _177) * _169)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _181) * _165)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _181) * _174)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _188) * _169)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _188) * _165)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _177) * _174)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _174) * _165) * _169);
float3 _226 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.x)) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.y))).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.z));
float4 _229 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _165) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _169)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _174);
float4 _231 = ((patchIn.gl_in[0].in_var_COLOR0 * _165) + (patchIn.gl_in[1].in_var_COLOR0 * _169)) + (patchIn.gl_in[2].in_var_COLOR0 * _174);
float4 _233 = (((spvUnsafeArray<float4, 1>({ patchIn.gl_in[0].in_var_TEXCOORD0_0 })[0]) * _165) + ((spvUnsafeArray<float4, 1>({ patchIn.gl_in[1].in_var_TEXCOORD0_0 })[0]) * _169)) + ((spvUnsafeArray<float4, 1>({ patchIn.gl_in[2].in_var_TEXCOORD0_0 })[0]) * _174);
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<float4, 1> _234 = { _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(((patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.x) + (patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.y)) + (patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.z)));
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;

View File

@ -277,6 +277,18 @@ struct main0_patchIn
[[ 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<float> View_GlobalDistanceFieldTexture0 [[texture(0)]], texture3d<float> View_GlobalDistanceFieldTexture1 [[texture(1)]], texture3d<float> View_GlobalDistanceFieldTexture2 [[texture(2)]], texture3d<float> View_GlobalDistanceFieldTexture3 [[texture(3)]], sampler View_GlobalDistanceFieldSampler0 [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]])
{
main0_out out = {};
spvUnsafeArray<float4, 3> _120 = { patchIn.gl_in[0].in_var_TEXCOORD6, patchIn.gl_in[1].in_var_TEXCOORD6, patchIn.gl_in[2].in_var_TEXCOORD6 };
spvUnsafeArray<float4, 3> _121 = { patchIn.gl_in[0].in_var_TEXCOORD8, patchIn.gl_in[1].in_var_TEXCOORD8, patchIn.gl_in[2].in_var_TEXCOORD8 };
spvUnsafeArray<float4, 3> _128 = { 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<float4, 3> _129 = { 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<spvUnsafeArray<float4, 3>, 3> _136 = { { 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 }, { 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 }, { 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<float, 3> _137 = { 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<float4, 3> _138 = { 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<float3, 3> _139 = { 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<float4, 3> _146 = { 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<float4, 3> _147 = { 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<float3, 3> _148 = { 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<float3, 3> _149 = { 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;
@ -286,12 +298,12 @@ struct main0_patchIn
float4 _210 = float4(_190 * 3.0);
float4 _214 = float4(_191 * 3.0);
float4 _221 = float4(_192 * 3.0);
float4 _235 = (((((((((((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_190)) * _198) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_191)) * _202)) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_192)) * _207)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _210) * _202)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _214) * _198)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _214) * _207)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _221) * _202)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _221) * _198)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _210) * _207)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _207) * _198) * _202);
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 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * _237) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * _240)).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * _254);
float4 _259 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _198) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _202)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _207);
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;
@ -308,8 +320,8 @@ struct main0_patchIn
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) * patchIn.gl_in[0].in_var_PN_DominantVertex1) + (float4(_367) * patchIn.gl_in[1].in_var_PN_DominantVertex1)) + (float4(_370) * patchIn.gl_in[2].in_var_PN_DominantVertex1);
_388 = ((float3(_363) * patchIn.gl_in[0].in_var_PN_DominantVertex2) + (float3(_367) * patchIn.gl_in[1].in_var_PN_DominantVertex2)) + (float3(_370) * patchIn.gl_in[2].in_var_PN_DominantVertex2);
_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
{
@ -320,13 +332,13 @@ struct main0_patchIn
float4 _304 = float4(_279);
float4 _306 = float4(_282);
float4 _309 = float4(_285);
float4 _311 = ((_304 * patchIn.gl_in[0].in_var_PN_DominantEdge2) + (_306 * patchIn.gl_in[1].in_var_PN_DominantEdge2)) + (_309 * patchIn.gl_in[2].in_var_PN_DominantEdge2);
float4 _316 = ((_304 * patchIn.gl_in[0].in_var_PN_DominantEdge3) + (_306 * patchIn.gl_in[1].in_var_PN_DominantEdge3)) + (_309 * patchIn.gl_in[2].in_var_PN_DominantEdge3);
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 * patchIn.gl_in[0].in_var_PN_DominantEdge4) + (_333 * patchIn.gl_in[1].in_var_PN_DominantEdge4)) + (_336 * patchIn.gl_in[2].in_var_PN_DominantEdge4);
float3 _343 = ((_331 * patchIn.gl_in[0].in_var_PN_DominantEdge5) + (_333 * patchIn.gl_in[1].in_var_PN_DominantEdge5)) + (_336 * patchIn.gl_in[2].in_var_PN_DominantEdge5);
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)));
}
@ -388,13 +400,13 @@ struct main0_patchIn
}
_547 = _535;
}
float3 _565 = _264 + ((_398[2] * float3(fast::min(_547 + Material.Material_ScalarExpressions[0].z, 0.0) * Material.Material_ScalarExpressions[0].w)) * float3(((patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.x) + (patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.y)) + (patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier * gl_TessCoord.z)));
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 = ((patchIn.gl_in[0].in_var_TEXCOORD6 * _198) + (patchIn.gl_in[1].in_var_TEXCOORD6 * _202)) + (patchIn.gl_in[2].in_var_TEXCOORD6 * _207);
out.out_var_TEXCOORD7 = ((patchIn.gl_in[0].in_var_TEXCOORD8 * _198) + (patchIn.gl_in[1].in_var_TEXCOORD8 * _202)) + (patchIn.gl_in[2].in_var_TEXCOORD8 * _207);
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));

View File

@ -174,6 +174,9 @@ struct main0_patchIn
[[ 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<float4, 3> _93 = { 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<float4, 3> _94 = { 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<spvUnsafeArray<float4, 3>, 3> _101 = { { 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 }, { 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 }, { 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;
@ -183,9 +186,9 @@ struct main0_patchIn
float4 _139 = float4(_119 * 3.0);
float4 _143 = float4(_120 * 3.0);
float4 _150 = float4(_121 * 3.0);
float4 _164 = (((((((((((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_119)) * _127) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_120)) * _131)) + (((spvUnsafeArray<float4, 3>({ 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 })[0]) * float4(_121)) * _136)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _139) * _131)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _143) * _127)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _143) * _136)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _150) * _131)) + (((spvUnsafeArray<float4, 3>({ 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 })[1]) * _150) * _127)) + (((spvUnsafeArray<float4, 3>({ 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 })[2]) * _139) * _136)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _136) * _127) * _131);
float3 _179 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.x)) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.y))).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * float3(gl_TessCoord.z));
float4 _182 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _127) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _131)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _136);
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;

View File

@ -266,14 +266,21 @@ struct main0_patchIn
{
main0_out out = {};
spvUnsafeArray<float4, 1> out_var_TEXCOORD0 = {};
spvUnsafeArray<float4, 3> _77 = { 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<float4, 3> _78 = { 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<spvUnsafeArray<float4, 3>, 1> _79 = { { patchIn.gl_in[0].in_var_TEXCOORD0_0 }, { patchIn.gl_in[1].in_var_TEXCOORD0_0 }, { patchIn.gl_in[2].in_var_TEXCOORD0_0 } };
spvUnsafeArray<float4, 3> _80 = { patchIn.gl_in[0].in_var_COLOR1, patchIn.gl_in[1].in_var_COLOR1, patchIn.gl_in[2].in_var_COLOR1 };
spvUnsafeArray<float4, 3> _81 = { patchIn.gl_in[0].in_var_COLOR2, patchIn.gl_in[1].in_var_COLOR2, patchIn.gl_in[2].in_var_COLOR2 };
spvUnsafeArray<float4, 3> _97 = { 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<float3, 3> _98 = { 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 = ((patchIn.gl_in[0].in_var_VS_To_DS_Position * _111) + (patchIn.gl_in[1].in_var_VS_To_DS_Position * _113)) + (patchIn.gl_in[2].in_var_VS_To_DS_Position * _116);
float4 _118 = ((_97[0] * _111) + (_97[1] * _113)) + (_97[2] * _116);
spvUnsafeArray<float4, 1> _72;
_72 = { patchIn.gl_in[0].in_var_TEXCOORD0_0 };
_72 = _79[0];
spvUnsafeArray<float4, 1> _71;
_71 = { patchIn.gl_in[1].in_var_TEXCOORD0_0 };
_71 = _79[1];
float3 _120 = float3(gl_TessCoord.x);
float3 _123 = float3(gl_TessCoord.y);
spvUnsafeArray<float4, 1> _73;
@ -286,9 +293,9 @@ struct main0_patchIn
spvUnsafeArray<float4, 1> _75;
_75 = _73;
spvUnsafeArray<float4, 1> _74;
_74 = { patchIn.gl_in[2].in_var_TEXCOORD0_0 };
_74 = _79[2];
float3 _155 = float3(gl_TessCoord.z);
float3 _157 = ((patchIn.gl_in[0].in_var_TEXCOORD10_centroid.xyz * _120) + (patchIn.gl_in[1].in_var_TEXCOORD10_centroid.xyz * _123)).xyz + (patchIn.gl_in[2].in_var_TEXCOORD10_centroid.xyz * _155);
float3 _157 = ((_77[0].xyz * _120) + (_77[1].xyz * _123)).xyz + (_77[2].xyz * _155);
spvUnsafeArray<float4, 1> _76;
for (int _164 = 0; _164 < 1; )
{
@ -298,12 +305,12 @@ struct main0_patchIn
}
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 = ((patchIn.gl_in[0].in_var_TEXCOORD11_centroid * _111) + (patchIn.gl_in[1].in_var_TEXCOORD11_centroid * _113)) + (patchIn.gl_in[2].in_var_TEXCOORD11_centroid * _116);
out.out_var_TEXCOORD11_centroid = ((_78[0] * _111) + (_78[1] * _113)) + (_78[2] * _116);
out_var_TEXCOORD0 = _76;
out.out_var_COLOR1 = ((patchIn.gl_in[0].in_var_COLOR1 * _111) + (patchIn.gl_in[1].in_var_COLOR1 * _113)) + (patchIn.gl_in[2].in_var_COLOR1 * _116);
out.out_var_COLOR2 = ((patchIn.gl_in[0].in_var_COLOR2 * _111) + (patchIn.gl_in[1].in_var_COLOR2 * _113)) + (patchIn.gl_in[2].in_var_COLOR2 * _116);
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 = ((patchIn.gl_in[0].in_var_TEXCOORD7 * _120) + (patchIn.gl_in[1].in_var_TEXCOORD7 * _123)) + (patchIn.gl_in[2].in_var_TEXCOORD7 * _155);
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;

View File

@ -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];
}

View File

@ -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;
}

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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];
}

View File

@ -491,9 +491,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);
virtual 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);
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);

View File

@ -2194,60 +2194,38 @@ 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++)
uint32_t mbr_cnt = 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<SPIRVariable>(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<SPIRType>(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);
}
}
}
@ -5039,6 +5017,267 @@ 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<SPIRType>(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 += "{ ";
uint32_t num_control_points = to_array_size_literal(result_type, 1);
uint32_t base_interface_index = interface_index;
for (uint32_t i = 0; i < num_control_points; i++)
{
expr += "{ ";
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 += "{ ";
}
auto &struct_type = is_array_of_struct ? get<SPIRType>(result_type.parent_type) : result_type;
assert(struct_type.array.empty());
for (uint32_t i = 0; i < num_control_points; i++)
{
expr += "{ ";
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<SPIRType>(struct_type.member_types[j]);
if (is_matrix(mbr_type))
{
expr += type_to_glsl_constructor(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 += "{ ";
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 += "{ ";
auto &matrix_type = get_variable_element_type(get<SPIRVariable>(ptr));
for (uint32_t i = 0; i < num_control_points; i++)
{
interface_index = base_interface_index;
expr += type_to_glsl_constructor(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_constructor(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 += "{ ";
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 += "{ ";
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.
@ -5077,11 +5316,14 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l
new_uint_type.width = 32;
set<SPIRType>(type_id, new_uint_type);
// Index into gl_in/gl_out with first array index.
uint32_t ptr = var->storage == StorageClassInput ? stage_in_ptr_var_id : stage_out_ptr_var_id;
indices.push_back(ops[3]);
auto &result_ptr_type = get<SPIRType>(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;
if (var->storage == StorageClassInput || has_decoration(get_variable_element_type(*var).self, DecorationBlock))
{
uint32_t i = 4;
@ -5097,7 +5339,7 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l
type = &get<SPIRType>(type->member_types[get_constant(ops[4]).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)
@ -5108,6 +5350,10 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l
auto *c = maybe_get<SPIRConstant>(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)
@ -5116,85 +5362,19 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l
type = &get<SPIRType>(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)
if (is_matrix(result_ptr_type) || is_array(result_ptr_type) || result_ptr_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<SPIRType>(type->member_types[j]);
if (is_matrix(mbr_type))
{
for (uint32_t k = 0; k < mbr_type.columns; k++, index++)
{
set<SPIRConstant>(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<SPIRConstant>(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<SPIRConstant>(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<SPIRConstant>(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<SPIRConstant>(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<SPIRVariable>(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;
// 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<SPIRConstant>(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);
}
@ -5210,7 +5390,8 @@ 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<SPIRType>(ops[0]), &meta, true);
auto e = access_chain(ptr, indices.data(), uint32_t(indices.size()), result_ptr_type, &meta, true);
auto &expr = set<SPIRExpression>(ops[1], move(e), ops[0], should_forward(ops[2]));
expr.loaded_from = var->self;
expr.need_transpose = meta.need_transpose;
@ -5308,14 +5489,22 @@ void CompilerMSL::emit_instruction(const Instruction &instruction)
switch (opcode)
{
// Sample mask input for Metal is not an array
case OpLoad:
{
uint32_t id = ops[1];
uint32_t ptr = ops[2];
if (BuiltIn(get_decoration(ptr, DecorationBuiltIn)) == BuiltInSampleMask)
set_decoration(id, DecorationBuiltIn, BuiltInSampleMask);
CompilerGLSL::emit_instruction(instruction);
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;
}
@ -11620,97 +11809,6 @@ void CompilerMSL::OpCodePreprocessor::check_resource_write(uint32_t var_id)
uses_resource_write = true;
}
void CompilerMSL::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;
// Workaround SPIRV losing an array indirection in tessellation shaders - not the best solution but enough to keep things progressing.
auto *tess_var = maybe_get_backing_variable(base);
bool tess_control_input = (get_execution_model() == ExecutionModelTessellationControl && tess_var &&
tess_var->storage == StorageClassInput);
bool tess_eval_input = (get_execution_model() == ExecutionModelTessellationEvaluation && tess_var &&
tess_var->storage == StorageClassInput && expr.find("gl_in") == string::npos) &&
expr != "gl_TessLevelInner" && expr != "gl_TessLevelOuter";
bool tess_eval_input_array = (get_execution_model() == ExecutionModelTessellationEvaluation &&
access_chain_is_arrayed && expr.find("gl_in[") != string::npos);
bool tess_control_input_array = ((get_execution_model() == ExecutionModelTessellationControl ||
get_execution_model() == ExecutionModelTessellationEvaluation) &&
type->array.size() == 2 && type->array[0] >= 1);
uint32_t tess_control_input_array_num = type->array[0];
bool tess_eval_input_array_deref = type && tess_eval_input_array && expr.find("({") == 0;
if (tess_eval_input_array_deref)
{
expr = type_to_glsl(*type) + expr;
}
std::string name;
if (tess_control_input)
{
name = expr;
expr = "gl_in";
}
else if (tess_eval_input && !tess_eval_input_array)
{
name = expr;
expr = to_expression(patch_stage_in_var_id) + ".gl_in";
}
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 += "]";
if (tess_eval_input_array)
{
tess_eval_input_array = false;
}
if (tess_control_input || tess_eval_input)
{
expr += ".";
expr += name;
tess_control_input = false;
tess_eval_input = false;
if (tess_control_input_array)
{
name = expr;
expr = "{ ";
for (uint32_t i = 0; i < tess_control_input_array_num; i++)
{
if (i > 0)
expr += ", ";
expr += name;
expr += "_";
expr += convert_to_string(i);
}
expr += " }";
}
}
}
// Returns an enumeration of a SPIR-V function that needs to be output for certain Op codes.
CompilerMSL::SPVFuncImpl CompilerMSL::OpCodePreprocessor::get_spv_func_impl(Op opcode, const uint32_t *args)
{

View File

@ -623,10 +623,6 @@ protected:
std::string convert_row_major_matrix(std::string exp_str, const SPIRType &exp_type, uint32_t physical_type_id,
bool is_packed) override;
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) override;
void preprocess_op_codes();
void localize_global_variables();
void extract_global_variables_from_functions();
@ -759,6 +755,7 @@ 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);