mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
228c67228a
Added following updates to GL_EXT_mesh_shader implementation: 1. Added SPIRV and GLSL test cases 2. Added checks to ensure NV and EXT mesh shader builtins cannot be used interchangeably. 3. Updated the language name by removing the postfix "NV" to MeshShader and TaskShader. 4. Added checks for grammar checking to comply with the spec. 5. Added gl_NumWorkGroups builtin to Mesh shader 6. Fixed data type of gl_PrimitiveLineIndicesEXT and gl_PrimitiveTriangleIndicesEXT 7. Added new constants to the resources table 8. Updates to handle new storage qualifier "taskPayloadSharedEXT" 9. Updated test cases by replacing "taskEXT" with storage qualifier "taskPayloadSharedEXT" Addressed Review comments 1. Fixed instruction description used by glslang disassembly. 2. Updated OpEmitMeshTasksEXT as per spec update 3. Fixed implementation that errors out if there are more then one taskPayloadSharedEXT varjables. 4. Fixed miscellaneous error logs and removed unwanted code. SPIRV 1.6 related build failure fixes - Update SPIRV header to 1.6 - Fix conflict wiht SPIRV 1.6 change, where localSizeId is used for execution mode for mesh/task shaders Enable SPIRV generated for EXT_mesh_shader to be version 1.4 GL_EXT_mesh_shader: Add checks for atomic support and corresponding test cases
42 lines
753 B
Plaintext
42 lines
753 B
Plaintext
#version 450
|
|
|
|
#define MAX_VER 81
|
|
#define MAX_PRIM 32
|
|
|
|
#define BARRIER() \
|
|
memoryBarrierShared(); \
|
|
barrier();
|
|
|
|
#extension GL_EXT_mesh_shader : enable
|
|
|
|
layout(local_size_x = 32) in;
|
|
|
|
layout(max_vertices=MAX_VER) out;
|
|
layout(max_primitives=MAX_PRIM) out;
|
|
layout(triangles) out;
|
|
|
|
// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders:
|
|
struct taskBlock {
|
|
float gid1[2];
|
|
vec4 gid2;
|
|
};
|
|
taskPayloadSharedEXT taskBlock mytask;
|
|
|
|
buffer bufferBlock {
|
|
float gid3[2];
|
|
vec4 gid4;
|
|
} mybuf;
|
|
|
|
layout(location=0) out outBlock {
|
|
float gid5;
|
|
vec4 gid6;
|
|
} myblk[];
|
|
|
|
void main()
|
|
{
|
|
uint iid = gl_LocalInvocationID.x;
|
|
|
|
myblk[iid].gid5 = mytask.gid1[1] + mybuf.gid3[1];
|
|
myblk[iid].gid6 = mytask.gid2 + mybuf.gid4;
|
|
}
|