[External] Updated external libraries

Related work item: Github #38
This commit is contained in:
Minmin Gong 2019-02-22 20:09:55 -08:00
Родитель 1c5402e5c2
Коммит 744b9cd517
7 изменённых файлов: 52 добавлений и 106 удалений

8
External/CMakeLists.txt поставляемый
Просмотреть файл

@ -8,10 +8,10 @@ endif()
set(cxxopts_REV "3f2d70530219e09fe7e563f86126b0d3b228a60d")
set(googletest_REV "440527a61e1c91188195f7de212c63c77e8f0a45")
set(SPIRV_Headers_REV "bbf63435c37aafac5d1cdfc287401d87cd3ca364")
set(SPIRV_Tools_REV "c512c6864080ff617afb422a3d04dd902809a6cf")
set(DirectXShaderCompiler_REV "ac18ec5819a79966b0061794f7ae6bdf4556e728")
set(SPIRV_Cross_REV "f734d78c1536b9c786bd54ab6a30caa4f8cb0bff")
set(SPIRV_Headers_REV "8bea0a266ac9b718aa0818d9e3a47c0b77c2cb23")
set(SPIRV_Tools_REV "e2279da7148d19bd21c6d47ffc96ee4176f43dba")
set(DirectXShaderCompiler_REV "7eceecf02b5d97eea4fca842b52ade400876b78c")
set(SPIRV_Cross_REV "5dde82654c8e851eacee6c35483606b85a12b467")
function(UpdateExternalLib name url rev)
set(need_checkout FALSE)

Просмотреть файл

@ -20,36 +20,18 @@ struct VS_OUTPUT_HS_INPUT
struct main0_out
{
float3 out_var_LIGHTVECTORTS_0;
float3 out_var_NORMAL_0;
float3 out_var_LIGHTVECTORTS_1;
float3 out_var_NORMAL_1;
float2 out_var_TEXCOORD0_0;
float3 out_var_LIGHTVECTORTS_2;
float3 out_var_WORLDPOS_0;
float3 out_var_NORMAL_2;
float2 out_var_TEXCOORD0_1;
float3 out_var_WORLDPOS_1;
float2 out_var_TEXCOORD0_2;
float3 out_var_WORLDPOS_2;
float gl_TessLevelOuter[4];
float gl_TessLevelInner[2];
float3 out_var_LIGHTVECTORTS;
float3 out_var_NORMAL;
float2 out_var_TEXCOORD0;
float3 out_var_WORLDPOS;
};
struct main0_in
{
float3 in_var_WORLDPOS_0;
float3 in_var_WORLDPOS_1;
float3 in_var_NORMAL_0;
float3 in_var_WORLDPOS_2;
float3 in_var_NORMAL_1;
float2 in_var_TEXCOORD0_0;
float3 in_var_NORMAL_2;
float2 in_var_TEXCOORD0_1;
float3 in_var_LIGHTVECTORTS_0;
float2 in_var_TEXCOORD0_2;
float3 in_var_LIGHTVECTORTS_1;
float3 in_var_LIGHTVECTORTS_2;
float3 in_var_WORLDPOS [[attribute(0)]];
float3 in_var_NORMAL [[attribute(1)]];
float2 in_var_TEXCOORD0 [[attribute(2)]];
float3 in_var_LIGHTVECTORTS [[attribute(3)]];
};
// Implementation of an array copy function to cover GLSL's ability to copy an array via assignment.
@ -65,55 +47,26 @@ void spvArrayCopyFromConstant1(thread T (&dst)[N], constant T (&src)[N])
for (uint i = 0; i < N; dst[i] = src[i], i++);
}
unknown main0_out main0(main0_in in [[stage_in]], constant type_cbMain& cbMain [[buffer(0)]], unsupported-built-in-type gl_InvocationID [[unsupported-built-in]], unsupported-built-in-type gl_PrimitiveID [[unsupported-built-in]])
kernel void main0(main0_in in [[stage_in]], constant type_cbMain& cbMain [[buffer(0)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], device uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]])
{
main0_out out = {};
float3 out_var_WORLDPOS[3] = {};
float3 out_var_NORMAL[3] = {};
float2 out_var_TEXCOORD0[3] = {};
float3 out_var_LIGHTVECTORTS[3] = {};
float3 in_var_WORLDPOS[] = {};
float3 in_var_NORMAL[] = {};
float2 in_var_TEXCOORD0[] = {};
float3 in_var_LIGHTVECTORTS[] = {};
in_var_WORLDPOS[0] = in.in_var_WORLDPOS_0;
in_var_WORLDPOS[1] = in.in_var_WORLDPOS_1;
in_var_WORLDPOS[2] = in.in_var_WORLDPOS_2;
in_var_NORMAL[0] = in.in_var_NORMAL_0;
in_var_NORMAL[1] = in.in_var_NORMAL_1;
in_var_NORMAL[2] = in.in_var_NORMAL_2;
in_var_TEXCOORD0[0] = in.in_var_TEXCOORD0_0;
in_var_TEXCOORD0[1] = in.in_var_TEXCOORD0_1;
in_var_TEXCOORD0[2] = in.in_var_TEXCOORD0_2;
in_var_LIGHTVECTORTS[0] = in.in_var_LIGHTVECTORTS_0;
in_var_LIGHTVECTORTS[1] = in.in_var_LIGHTVECTORTS_1;
in_var_LIGHTVECTORTS[2] = in.in_var_LIGHTVECTORTS_2;
device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3];
if (gl_InvocationID < spvIndirectParams[0])
gl_in[gl_InvocationID] = in;
threadgroup_barrier(mem_flags::mem_threadgroup);
VS_OUTPUT_HS_INPUT _77[3] = { VS_OUTPUT_HS_INPUT{ in_var_WORLDPOS[0], in_var_NORMAL[0], in_var_TEXCOORD0[0], in_var_LIGHTVECTORTS[0] }, VS_OUTPUT_HS_INPUT{ in_var_WORLDPOS[1], in_var_NORMAL[1], in_var_TEXCOORD0[1], in_var_LIGHTVECTORTS[1] }, VS_OUTPUT_HS_INPUT{ in_var_WORLDPOS[2], in_var_NORMAL[2], in_var_TEXCOORD0[2], in_var_LIGHTVECTORTS[2] } };
VS_OUTPUT_HS_INPUT param_var_inputPatch[3];
spvArrayCopyFromStack1(param_var_inputPatch, _77);
out_var_WORLDPOS[gl_InvocationID] = param_var_inputPatch[gl_InvocationID].worldPos;
out_var_NORMAL[gl_InvocationID] = param_var_inputPatch[gl_InvocationID].normal;
out_var_TEXCOORD0[gl_InvocationID] = param_var_inputPatch[gl_InvocationID].texCoord;
out_var_LIGHTVECTORTS[gl_InvocationID] = param_var_inputPatch[gl_InvocationID].lightTS;
gl_out[gl_InvocationID].out_var_WORLDPOS = param_var_inputPatch[gl_InvocationID].worldPos;
gl_out[gl_InvocationID].out_var_NORMAL = param_var_inputPatch[gl_InvocationID].normal;
gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_inputPatch[gl_InvocationID].texCoord;
gl_out[gl_InvocationID].out_var_LIGHTVECTORTS = param_var_inputPatch[gl_InvocationID].lightTS;
threadgroup_barrier(mem_flags::mem_device);
if (gl_InvocationID == 0u)
{
gl_TessLevelOuter[0u] = cbMain.tessellationFactor.x;
gl_TessLevelOuter[1u] = cbMain.tessellationFactor.y;
gl_TessLevelOuter[2u] = cbMain.tessellationFactor.z;
gl_TessLevelInner[0u] = cbMain.tessellationFactor.w;
spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(cbMain.tessellationFactor.x);
spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(cbMain.tessellationFactor.y);
spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(cbMain.tessellationFactor.z);
spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(cbMain.tessellationFactor.w);
}
out.out_var_WORLDPOS_0 = out_var_WORLDPOS[0];
out.out_var_WORLDPOS_1 = out_var_WORLDPOS[1];
out.out_var_WORLDPOS_2 = out_var_WORLDPOS[2];
out.out_var_NORMAL_0 = out_var_NORMAL[0];
out.out_var_NORMAL_1 = out_var_NORMAL[1];
out.out_var_NORMAL_2 = out_var_NORMAL[2];
out.out_var_TEXCOORD0_0 = out_var_TEXCOORD0[0];
out.out_var_TEXCOORD0_1 = out_var_TEXCOORD0[1];
out.out_var_TEXCOORD0_2 = out_var_TEXCOORD0[2];
out.out_var_LIGHTVECTORTS_0 = out_var_LIGHTVECTORTS[0];
out.out_var_LIGHTVECTORTS_1 = out_var_LIGHTVECTORTS[1];
out.out_var_LIGHTVECTORTS_2 = out_var_LIGHTVECTORTS[2];
return out;
}

Просмотреть файл

@ -15,8 +15,8 @@ patch in vec3 in_var_POSITION6;
patch in vec3 in_var_POSITION7;
patch in vec3 in_var_POSITION8;
patch in vec3 in_var_CENTER;
in vec3 in_var_POSITION[3];
in vec2 in_var_TEXCOORD[3];
in vec3 in_var_POSITION[];
in vec2 in_var_TEXCOORD[];
out vec2 out_var_TEXCOORD0;
void main()

Просмотреть файл

@ -21,8 +21,8 @@ layout(location = 5) patch in vec3 in_var_POSITION6;
layout(location = 6) patch in vec3 in_var_POSITION7;
layout(location = 7) patch in vec3 in_var_POSITION8;
layout(location = 0) patch in vec3 in_var_CENTER;
layout(location = 1) in vec3 in_var_POSITION[3];
layout(location = 8) in vec2 in_var_TEXCOORD[3];
layout(location = 1) in vec3 in_var_POSITION[];
layout(location = 8) in vec2 in_var_TEXCOORD[];
layout(location = 0) out vec2 out_var_TEXCOORD0;
void main()

Просмотреть файл

@ -15,8 +15,8 @@ layout(location = 5) patch in vec3 in_var_POSITION6;
layout(location = 6) patch in vec3 in_var_POSITION7;
layout(location = 7) patch in vec3 in_var_POSITION8;
layout(location = 0) patch in vec3 in_var_CENTER;
layout(location = 1) in vec3 in_var_POSITION[3];
layout(location = 8) in vec2 in_var_TEXCOORD[3];
layout(location = 1) in vec3 in_var_POSITION[];
layout(location = 8) in vec2 in_var_TEXCOORD[];
layout(location = 0) out vec2 out_var_TEXCOORD0;
void main()

Просмотреть файл

@ -19,8 +19,8 @@ layout(location = 5) patch in vec3 in_var_POSITION6;
layout(location = 6) patch in vec3 in_var_POSITION7;
layout(location = 7) patch in vec3 in_var_POSITION8;
layout(location = 0) patch in vec3 in_var_CENTER;
layout(location = 1) in vec3 in_var_POSITION[3];
layout(location = 8) in vec2 in_var_TEXCOORD[3];
layout(location = 1) in vec3 in_var_POSITION[];
layout(location = 8) in vec2 in_var_TEXCOORD[];
layout(location = 0) out vec2 out_var_TEXCOORD0;
void main()

Просмотреть файл

@ -11,45 +11,38 @@ struct type_cbPNTriangles
struct main0_out
{
float2 out_var_TEXCOORD0;
float4 gl_Position;
float2 out_var_TEXCOORD0 [[user(locn0)]];
float4 gl_Position [[position]];
};
struct main0_in
{
float3 in_var_CENTER;
float3 in_var_POSITION_0;
float3 in_var_POSITION3;
float3 in_var_POSITION_1;
float3 in_var_POSITION4;
float3 in_var_POSITION_2;
float3 in_var_POSITION5;
float3 in_var_POSITION6;
float3 in_var_POSITION7;
float3 in_var_POSITION8;
float2 in_var_TEXCOORD_0;
float2 in_var_TEXCOORD_1;
float2 in_var_TEXCOORD_2;
float3 in_var_POSITION [[attribute(1)]];
float2 in_var_TEXCOORD [[attribute(8)]];
};
unknown main0_out main0(main0_in in [[stage_in]], constant type_cbPNTriangles& cbPNTriangles [[buffer(0)]], unsupported-built-in-type gl_TessLevelOuter [[unsupported-built-in]], unsupported-built-in-type gl_TessLevelInner [[unsupported-built-in]], unsupported-built-in-type gl_TessCoord [[unsupported-built-in]])
struct main0_patchIn
{
float3 in_var_CENTER [[attribute(0)]];
float3 in_var_POSITION3 [[attribute(2)]];
float3 in_var_POSITION4 [[attribute(3)]];
float3 in_var_POSITION5 [[attribute(4)]];
float3 in_var_POSITION6 [[attribute(5)]];
float3 in_var_POSITION7 [[attribute(6)]];
float3 in_var_POSITION8 [[attribute(7)]];
patch_control_point<main0_in> gl_in;
};
[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_cbPNTriangles& cbPNTriangles [[buffer(0)]], float3 gl_TessCoord [[position_in_patch]])
{
main0_out out = {};
float3 in_var_POSITION[3] = {};
float2 in_var_TEXCOORD[3] = {};
in_var_POSITION[0] = in.in_var_POSITION_0;
in_var_POSITION[1] = in.in_var_POSITION_1;
in_var_POSITION[2] = in.in_var_POSITION_2;
in_var_TEXCOORD[0] = in.in_var_TEXCOORD_0;
in_var_TEXCOORD[1] = in.in_var_TEXCOORD_1;
in_var_TEXCOORD[2] = in.in_var_TEXCOORD_2;
float _67 = gl_TessCoord.x * gl_TessCoord.x;
float _68 = gl_TessCoord.y * gl_TessCoord.y;
float _69 = gl_TessCoord.z * gl_TessCoord.z;
float _70 = _67 * 3.0;
float _71 = _68 * 3.0;
float _72 = _69 * 3.0;
out.gl_Position = float4(((((((((((in_var_POSITION[0] * _69) * gl_TessCoord.z) + ((in_var_POSITION[1] * _67) * gl_TessCoord.x)) + ((in_var_POSITION[2] * _68) * gl_TessCoord.y)) + ((in.in_var_POSITION3 * _72) * gl_TessCoord.x)) + ((in.in_var_POSITION4 * gl_TessCoord.z) * _70)) + ((in.in_var_POSITION8 * _72) * gl_TessCoord.y)) + ((in.in_var_POSITION5 * _70) * gl_TessCoord.y)) + ((in.in_var_POSITION7 * gl_TessCoord.z) * _71)) + ((in.in_var_POSITION6 * gl_TessCoord.x) * _71)) + ((((in.in_var_CENTER * 6.0) * gl_TessCoord.z) * gl_TessCoord.x) * gl_TessCoord.y), 1.0) * cbPNTriangles.viewProj;
out.gl_Position = float4(((((((((((in_var_POSITION[0] * _69) * gl_TessCoord.z) + ((in_var_POSITION[1] * _67) * gl_TessCoord.x)) + ((in_var_POSITION[2] * _68) * gl_TessCoord.y)) + ((patchIn.in_var_POSITION3 * _72) * gl_TessCoord.x)) + ((patchIn.in_var_POSITION4 * gl_TessCoord.z) * _70)) + ((patchIn.in_var_POSITION8 * _72) * gl_TessCoord.y)) + ((patchIn.in_var_POSITION5 * _70) * gl_TessCoord.y)) + ((patchIn.in_var_POSITION7 * gl_TessCoord.z) * _71)) + ((patchIn.in_var_POSITION6 * gl_TessCoord.x) * _71)) + ((((patchIn.in_var_CENTER * 6.0) * gl_TessCoord.z) * gl_TessCoord.x) * gl_TessCoord.y), 1.0) * cbPNTriangles.viewProj;
out.out_var_TEXCOORD0 = ((in_var_TEXCOORD[0] * gl_TessCoord.z) + (in_var_TEXCOORD[1] * gl_TessCoord.x)) + (in_var_TEXCOORD[2] * gl_TessCoord.y);
return out;
}