Update mesh/task test references.

This commit is contained in:
Hans-Kristian Arntzen 2022-09-12 12:44:07 +02:00
parent d7a6861f64
commit a5a7999666
8 changed files with 63 additions and 77 deletions

View File

@ -1,35 +0,0 @@
#version 450
#extension GL_EXT_mesh_shader : require
layout(local_size_x = 4, local_size_y = 3, local_size_z = 2) in;
struct Payload
{
float v[3];
};
shared float vs[24];
taskPayloadSharedEXT Payload p;
void main()
{
vs[gl_LocalInvocationIndex] = 10.0;
barrier();
if (gl_LocalInvocationIndex < 12u)
{
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 12u];
}
barrier();
if (gl_LocalInvocationIndex < 6u)
{
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 6u];
}
barrier();
if (gl_LocalInvocationIndex < 3u)
{
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 3u];
}
barrier();
p.v[gl_LocalInvocationIndex] = vs[gl_LocalInvocationIndex];
EmitMeshTasksEXT(uint(int(vs[4])), uint(int(vs[6])), uint(int(vs[8])));
}

View File

@ -1,42 +0,0 @@
#version 450
#extension GL_EXT_mesh_shader : require
layout(local_size_x = 4, local_size_y = 3, local_size_z = 2) in;
struct Payload
{
float v[3];
};
shared float vs[24];
taskPayloadSharedEXT Payload p;
void main()
{
vs[gl_LocalInvocationIndex] = 10.0;
barrier();
if (gl_LocalInvocationIndex < 12u)
{
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 12u];
}
barrier();
if (gl_LocalInvocationIndex < 6u)
{
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 6u];
}
barrier();
if (gl_LocalInvocationIndex < 3u)
{
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 3u];
}
barrier();
p.v[gl_LocalInvocationIndex] = vs[gl_LocalInvocationIndex];
if (vs[5] > 20.0)
{
EmitMeshTasksEXT(uint(int(vs[4])), uint(int(vs[6])), uint(int(vs[8])));
}
else
{
EmitMeshTasksEXT(uint(int(vs[6])), 10u, 50u);
}
}

View File

@ -0,0 +1,35 @@
#version 450
#extension GL_EXT_mesh_shader : require
layout(local_size_x = 4, local_size_y = 3, local_size_z = 2) in;
struct Payload
{
float v[3];
};
taskPayloadSharedEXT Payload p;
shared float vs[24];
void main()
{
vs[gl_LocalInvocationIndex] = 10.0;
barrier();
if (gl_LocalInvocationIndex < 12)
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 12];
barrier();
if (gl_LocalInvocationIndex < 6)
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 6];
barrier();
if (gl_LocalInvocationIndex < 3)
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 3];
barrier();
p.v[gl_LocalInvocationIndex] = vs[gl_LocalInvocationIndex];
if (vs[5] > 20.0)
{
EmitMeshTasksEXT(int(vs[4]), int(vs[6]), int(vs[8]));
}
else
{
EmitMeshTasksEXT(int(vs[6]), 10, 50u);
}
}

View File

@ -0,0 +1,28 @@
#version 450
#extension GL_EXT_mesh_shader : require
layout(local_size_x = 4, local_size_y = 3, local_size_z = 2) in;
struct Payload
{
float v[3];
};
taskPayloadSharedEXT Payload p;
shared float vs[24];
void main()
{
vs[gl_LocalInvocationIndex] = 10.0;
barrier();
if (gl_LocalInvocationIndex < 12)
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 12];
barrier();
if (gl_LocalInvocationIndex < 6)
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 6];
barrier();
if (gl_LocalInvocationIndex < 3)
vs[gl_LocalInvocationIndex] += vs[gl_LocalInvocationIndex + 3];
barrier();
p.v[gl_LocalInvocationIndex] = vs[gl_LocalInvocationIndex];
EmitMeshTasksEXT(int(vs[4]), int(vs[6]), int(vs[8]));
}