mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
Update mesh/task test references.
This commit is contained in:
parent
d7a6861f64
commit
a5a7999666
@ -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])));
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
28
shaders-no-opt/task/task-shader-basic.vk.spv14.nocompat.task
Normal file
28
shaders-no-opt/task/task-shader-basic.vk.spv14.nocompat.task
Normal 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]));
|
||||
}
|
Loading…
Reference in New Issue
Block a user