Roll deps.

This commit is contained in:
Hans-Kristian Arntzen 2024-01-05 13:03:42 +01:00
parent d9f4280f45
commit ec42cb1c41
32 changed files with 33 additions and 155 deletions

View File

@ -15,7 +15,7 @@ fi
echo "Building glslang."
mkdir -p external/glslang-build
cd external/glslang-build
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -DCMAKE_INSTALL_PREFIX=output
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -DCMAKE_INSTALL_PREFIX=output -DENABLE_OPT=OFF
cmake --build . --config $PROFILE --target install ${NPROC}
cd ../..

View File

@ -2,9 +2,9 @@
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
GLSLANG_REV=06a7078ce74ab5c7801a165b8145859678831fb8
SPIRV_TOOLS_REV=f62e121b0df5374d1f043d1fbda98467406af0b1
SPIRV_HEADERS_REV=d13b52222c39a7e9a401b44646f0ca3a640fbd47
GLSLANG_REV=a7785ea1ff5b10bfc2d8ca77fdad5929562897b7
SPIRV_TOOLS_REV=afaf8fda2ad0364655909b56c8b634ce89095bb5
SPIRV_HEADERS_REV=e867c06631767a2d96424cbec530f9ee5e78180f
PROTOCOL=https
if [ -d external/glslang ]; then

View File

@ -3,17 +3,17 @@ struct Data
uint arr[3];
};
static uint _34;
static uint _33;
RWByteAddressBuffer _13 : register(u0);
void comp_main()
{
uint _33[3] = { _34, _34, _34 };
uint _32[3] = { _33, _33, _33 };
[unroll]
for (int _0ident = 0; _0ident < 3; _0ident++)
{
_13.Store(_0ident * 4 + 0, _33[_0ident]);
_13.Store(_0ident * 4 + 0, _32[_0ident]);
}
}

View File

@ -19,10 +19,7 @@ struct SSBO
kernel void main0(constant UBO& _10 [[buffer(0)]])
{
(reinterpret_cast<device SSBO*>(as_type<ulong>(_10.b)))->a1 = float3(1.0, 2.0, 3.0);
uint2 _35 = as_type<uint2>(reinterpret_cast<ulong>(reinterpret_cast<device SSBO*>(as_type<ulong>(_10.b + uint2(32u)))));
uint2 v2 = _35;
device SSBO* _39 = reinterpret_cast<device SSBO*>(as_type<ulong>(_35));
float3 v3 = float3(_39->a1);
device SSBO* _39 = reinterpret_cast<device SSBO*>(as_type<ulong>(as_type<uint2>(reinterpret_cast<ulong>(reinterpret_cast<device SSBO*>(as_type<ulong>(_10.b + uint2(32u)))))));
_39->a1 = float3(_39->a1) + float3(1.0);
}

View File

@ -32,65 +32,8 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
kernel void main0(constant t24& u24 [[buffer(0)]], constant t35& u35 [[buffer(1)]], texture2d<uint, access::write> v295 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{
int v8 = 0;
int _30 = 0 | (u24.m0[0].x - 0);
v8 = _30;
int _44 = _30 | (u24.m0[u35.m0[1]].x - 1);
v8 = _44;
int _50 = _44 | (u24.m1 - 2);
v8 = _50;
int _60 = _50 | int(u24.m4[0u][0] - 3.0);
v8 = _60;
int _68 = _60 | int(u24.m4[1u][0] - 5.0);
v8 = _68;
int _75 = _68 | int(u24.m4[0u][1] - 4.0);
v8 = _75;
int _82 = _75 | int(u24.m4[1u][1] - 6.0);
v8 = _82;
int _92 = _82 | (((device t21*)u24.m2[0].x)->m0[0].x - 3);
v8 = _92;
int _101 = _92 | (((device t21*)u24.m2[0].x)->m0[u35.m0[1]].x - 4);
v8 = _101;
int _109 = _101 | (((device t21*)u24.m2[0].x)->m1 - 5);
v8 = _109;
int _118 = _109 | int(((device t21*)u24.m2[0].x)->m4[0u][0] - 6.0);
v8 = _118;
int _127 = _118 | int(((device t21*)u24.m2[0].x)->m4[1u][0] - 8.0);
v8 = _127;
int _136 = _127 | int(((device t21*)u24.m2[0].x)->m4[0u][1] - 7.0);
v8 = _136;
int _145 = _136 | int(((device t21*)u24.m2[0].x)->m4[1u][1] - 9.0);
v8 = _145;
int _155 = _145 | (((device t21*)u24.m2[u35.m0[1]].x)->m0[0].x - 6);
v8 = _155;
int _167 = _155 | (((device t21*)u24.m2[u35.m0[1]].x)->m0[u35.m0[1]].x - 7);
v8 = _167;
int _177 = _167 | (((device t21*)u24.m2[u35.m0[1]].x)->m1 - 8);
v8 = _177;
int _187 = _177 | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[0u][0] - 9.0);
v8 = _187;
int _198 = _187 | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[1u][0] - 11.0);
v8 = _198;
int _209 = _198 | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[0u][1] - 10.0);
v8 = _209;
int _220 = _209 | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[1u][1] - 12.0);
v8 = _220;
int _228 = _220 | (u24.m3->m0[0].x - 9);
v8 = _228;
int _238 = _228 | (u24.m3->m0[u35.m0[1]].x - 10);
v8 = _238;
int _246 = _238 | (u24.m3->m1 - 11);
v8 = _246;
int _254 = _246 | int(u24.m3->m4[0u][0] - 12.0);
v8 = _254;
int _263 = _254 | int(u24.m3->m4[1u][0] - 14.0);
v8 = _263;
int _272 = _263 | int(u24.m3->m4[0u][1] - 13.0);
v8 = _272;
int _281 = _272 | int(u24.m3->m4[1u][1] - 15.0);
v8 = _281;
uint4 _292 = select(uint4(1u, 0u, 0u, 1u), uint4(0u), bool4(_281 != 0));
uint4 v284 = _292;
v295.write(_292, uint2(int2(gl_GlobalInvocationID.xy)));
int _155 = ((((((((((((((0 | (u24.m0[0].x - 0)) | (u24.m0[u35.m0[1]].x - 1)) | (u24.m1 - 2)) | int(u24.m4[0u][0] - 3.0)) | int(u24.m4[1u][0] - 5.0)) | int(u24.m4[0u][1] - 4.0)) | int(u24.m4[1u][1] - 6.0)) | (((device t21*)u24.m2[0].x)->m0[0].x - 3)) | (((device t21*)u24.m2[0].x)->m0[u35.m0[1]].x - 4)) | (((device t21*)u24.m2[0].x)->m1 - 5)) | int(((device t21*)u24.m2[0].x)->m4[0u][0] - 6.0)) | int(((device t21*)u24.m2[0].x)->m4[1u][0] - 8.0)) | int(((device t21*)u24.m2[0].x)->m4[0u][1] - 7.0)) | int(((device t21*)u24.m2[0].x)->m4[1u][1] - 9.0)) | (((device t21*)u24.m2[u35.m0[1]].x)->m0[0].x - 6);
bool _289 = (((((((((((((_155 | (((device t21*)u24.m2[u35.m0[1]].x)->m0[u35.m0[1]].x - 7)) | (((device t21*)u24.m2[u35.m0[1]].x)->m1 - 8)) | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[0u][0] - 9.0)) | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[1u][0] - 11.0)) | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[0u][1] - 10.0)) | int(((device t21*)u24.m2[u35.m0[1]].x)->m4[1u][1] - 12.0)) | (u24.m3->m0[0].x - 9)) | (u24.m3->m0[u35.m0[1]].x - 10)) | (u24.m3->m1 - 11)) | int(u24.m3->m4[0u][0] - 12.0)) | int(u24.m3->m4[1u][0] - 14.0)) | int(u24.m3->m4[0u][1] - 13.0)) | int(u24.m3->m4[1u][1] - 15.0)) != 0;
v295.write(select(uint4(1u, 0u, 0u, 1u), uint4(0u), bool4(_289)), uint2(int2(gl_GlobalInvocationID.xy)));
}

View File

@ -27,30 +27,15 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(8u, 8u, 1u);
kernel void main0(constant Registers& registers [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_NumWorkGroups [[threadgroups_per_grid]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
{
uint2 local_offset = gl_GlobalInvocationID.xy;
uint _19 = local_offset.y;
uint _29 = local_offset.x;
uint _30 = ((_19 * 8u) * gl_NumWorkGroups.x) + _29;
uint local_index = _30;
uint slice = gl_WorkGroupID.z;
device Position* __restrict positions = registers.references->buffers[gl_WorkGroupID.z];
float _66 = float(gl_WorkGroupID.z);
float _70 = fract(fma(_66, 0.100000001490116119384765625, registers.fract_time));
float _70 = fract(fma(float(gl_WorkGroupID.z), 0.100000001490116119384765625, registers.fract_time));
float _71 = 6.283125400543212890625 * _70;
float offset = _71;
float2 pos = float2(local_offset);
float _83 = sin(fma(2.2000000476837158203125, pos.x, _71));
pos.x = fma(0.20000000298023223876953125, _83, pos.x);
float _97 = sin(fma(2.25, pos.y, _70 * 12.56625080108642578125));
pos.y = fma(0.20000000298023223876953125, _97, pos.y);
float _111 = cos(fma(1.7999999523162841796875, pos.y, _70 * 18.849376678466796875));
pos.x = fma(0.20000000298023223876953125, _111, pos.x);
float _125 = cos(fma(2.849999904632568359375, pos.x, _70 * 25.1325016021728515625));
pos.y = fma(0.20000000298023223876953125, _125, pos.y);
float _133 = sin(_71);
pos.x = fma(0.5, _133, pos.x);
float _142 = sin(fma(6.283125400543212890625, _70, 0.300000011920928955078125));
pos.y = fma(0.5, _142, pos.y);
float2 _155 = float2(gl_NumWorkGroups.xy);
registers.references->buffers[gl_WorkGroupID.z]->positions[_30] = (pos / fma(float2(8.0), _155, float2(-1.0))) - float2(0.5);
float2 pos = float2(gl_GlobalInvocationID.xy);
pos.x = fma(0.20000000298023223876953125, sin(fma(2.2000000476837158203125, pos.x, _71)), pos.x);
pos.y = fma(0.20000000298023223876953125, sin(fma(2.25, pos.y, _70 * 12.56625080108642578125)), pos.y);
pos.x = fma(0.20000000298023223876953125, cos(fma(1.7999999523162841796875, pos.y, _70 * 18.849376678466796875)), pos.x);
pos.y = fma(0.20000000298023223876953125, cos(fma(2.849999904632568359375, pos.x, _70 * 25.1325016021728515625)), pos.y);
pos.x = fma(0.5, sin(_71), pos.x);
pos.y = fma(0.5, sin(fma(6.283125400543212890625, _70, 0.300000011920928955078125)), pos.y);
registers.references->buffers[gl_WorkGroupID.z]->positions[((local_offset.y * 8u) * gl_NumWorkGroups.x) + local_offset.x] = (pos / fma(float2(8.0), float2(gl_NumWorkGroups.xy), float2(-1.0))) - float2(0.5);
}

View File

@ -3,12 +3,12 @@
using namespace metal;
struct recurs_1;
struct recurs;
struct recurs
{
int m1;
device recurs_1* m2;
device recurs* m2;
};
struct recurs_1
@ -22,12 +22,6 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
kernel void main0(device void* nums_vp [[buffer(0)]], texture2d<uint, access::write> tex [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{
device auto& nums = *(device recurs*)nums_vp;
int rslt = 0;
rslt = nums.m1;
int _28 = nums.m1 + nums.m2->m1;
rslt = _28;
int _37 = _28 + nums.m2->m2->m1;
rslt = _37;
tex.write(uint4(uint(_37), 0u, 0u, 1u), uint2(int2(gl_GlobalInvocationID.xy)));
tex.write(uint4(uint((nums.m1 + nums.m2->m1) + nums.m2->m2->m1), 0u, 0u, 1u), uint2(int2(gl_GlobalInvocationID.xy)));
}

View File

@ -31,32 +31,11 @@ struct main0_out
vertex main0_out main0(constant Registers& registers [[buffer(0)]], uint gl_InstanceIndex [[instance_id]], uint gl_VertexIndex [[vertex_id]])
{
main0_out out = {};
int slice = int(gl_InstanceIndex);
const device Position* __restrict positions = registers.references->buffers[int(gl_InstanceIndex)];
float2 _45 = registers.references->buffers[int(gl_InstanceIndex)]->positions[int(gl_VertexIndex)] * 2.5;
float2 pos = _45;
float2 _60 = _45 + ((float2(float(int(gl_InstanceIndex) % 8), float(int(gl_InstanceIndex) / 8)) - float2(3.5)) * 3.0);
pos = _60;
out.gl_Position = registers.view_projection * float4(_60, 0.0, 1.0);
out.gl_Position = registers.view_projection * float4((registers.references->buffers[int(gl_InstanceIndex)]->positions[int(gl_VertexIndex)] * 2.5) + ((float2(float(int(gl_InstanceIndex) % 8), float(int(gl_InstanceIndex) / 8)) - float2(3.5)) * 3.0), 0.0, 1.0);
int _82 = int(gl_VertexIndex) % 16;
int index_x = _82;
int _85 = int(gl_VertexIndex) / 16;
int index_y = _85;
float _92 = sin(float(_82));
float _94 = fma(0.300000011920928955078125, _92, 0.5);
float r = _94;
float _98 = sin(float(_85));
float _100 = fma(0.300000011920928955078125, _98, 0.5);
float g = _100;
int _105 = (_82 ^ _85) & 1;
int checkerboard = _105;
float _107 = float(_105);
float _111 = fma(_107, 0.800000011920928955078125, 0.20000000298023223876953125);
float _113 = _94 * _111;
r = _113;
float _119 = _100 * _111;
g = _119;
out.out_color = float4(_113, _119, 0.1500000059604644775390625, 1.0);
float _111 = fma(float((_82 ^ _85) & 1), 0.800000011920928955078125, 0.20000000298023223876953125);
out.out_color = float4(fma(0.300000011920928955078125, sin(float(_82)), 0.5) * _111, fma(0.300000011920928955078125, sin(float(_85)), 0.5) * _111, 0.1500000059604644775390625, 1.0);
return out;
}

View File

@ -23,7 +23,6 @@ layout(push_constant, std430) uniform Push
void main()
{
uint v = _15.bar.b;
uint _31 = atomicAdd(_15.bar.a, _15.bar.b);
}

View File

@ -23,31 +23,17 @@ layout(set = 0, binding = 0, std430) restrict buffer LinkedList
void main()
{
Node _45;
Node _114;
if (gl_WorkGroupID.x < 4u)
{
_45 = _50.head1;
_114 = _50.head1;
}
else
{
_45 = _50.head2;
_114 = _50.head2;
}
restrict Node n = _114;
Node param = _114.next;
Node param_1 = _50.head1;
Node param_2 = _50.head2;
_114.next.value = _50.head1.value + _50.head2.value;
Node param_4 = _50.head1;
Node param_3 = _50.head1;
n = _50.head1;
int v = _50.head2.value;
_50.head1.value = 20;
_50.head1.value = _50.head2.value * 10;
uint64_t _98 = uint64_t(_50.head2.next);
uint64_t uptr = _98;
Node unode = Node(_98);
}

View File

@ -14,10 +14,8 @@ shared float shared_v;
void main()
{
float _15 = atomicAdd(shared_v, 2.0);
float value = _15;
float _24 = atomicAdd(_18.v, _15);
float _39 = imageAtomicAdd(uImage, ivec2(gl_GlobalInvocationID.xy), _15);
float _45 = imageAtomicExchange(uImage, ivec2(gl_GlobalInvocationID.xy), _15);
value = _45;
}

View File

@ -4,13 +4,13 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) buffer SSBO
{
int v[];
} _64;
} _65;
void main()
{
for (int i = 0; i < 4; i++)
{
_64.v[i] += 10;
_65.v[i] += 10;
}
}

View File

@ -1,5 +1,6 @@
#version 450
#extension GL_EXT_mesh_shader : require
#extension GL_EXT_fragment_shading_rate : require
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) in;
layout(lines, max_vertices = 24, max_primitives = 22) out;

View File

@ -1,5 +1,6 @@
#version 450
#extension GL_EXT_mesh_shader : require
#extension GL_EXT_fragment_shading_rate : require
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) in;
layout(triangles, max_vertices = 24, max_primitives = 22) out;

View File

@ -1,5 +1,6 @@
#version 450
#extension GL_EXT_mesh_shader : require
#extension GL_EXT_fragment_shading_rate : require
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) in;
layout(lines, max_vertices = 24, max_primitives = 22) out;

View File

@ -1,5 +1,6 @@
#version 450
#extension GL_EXT_mesh_shader : require
#extension GL_EXT_fragment_shading_rate : require
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) in;
layout(points, max_vertices = 24, max_primitives = 22) out;

View File

@ -1,5 +1,6 @@
#version 450
#extension GL_EXT_mesh_shader : require
#extension GL_EXT_fragment_shading_rate : require
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) in;
layout(triangles, max_vertices = 24, max_primitives = 22) out;

View File

@ -237,8 +237,6 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths):
glslang_env = 'vulkan1.1'
spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', spirv_env, '-o', spirv_path, shader]
if '.preserve.' in shader:
spirv_cmd.append('--preserve-numeric-ids')
if spirv:
subprocess.check_call(spirv_cmd)
@ -517,8 +515,6 @@ def cross_compile_hlsl(shader, spirv, opt, force_no_external_validation, iterati
glslang_env = 'vulkan1.1'
spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', spirv_env, '-o', spirv_path, shader]
if '.preserve.' in shader:
spirv_cmd.append('--preserve-numeric-ids')
if spirv:
subprocess.check_call(spirv_cmd)
@ -568,8 +564,6 @@ def cross_compile_reflect(shader, spirv, opt, iterations, paths):
reflect_path = create_temporary(os.path.basename(shader))
spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', 'vulkan1.1', '-o', spirv_path, shader]
if '.preserve.' in shader:
spirv_cmd.append('--preserve-numeric-ids')
if spirv:
subprocess.check_call(spirv_cmd)
@ -613,8 +607,6 @@ def cross_compile(shader, vulkan, spirv, invalid_spirv, eliminate, is_legacy, fo
vulkan_glsl_path = create_temporary('vk' + os.path.basename(shader))
spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', spirv_env, '-o', spirv_path, shader]
if '.preserve.' in shader:
spirv_cmd.append('--preserve-numeric-ids')
if spirv:
subprocess.check_call(spirv_cmd)