GL_EXT_mesh_shader/SPV_EXT_mesh_shader implementation
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
This commit is contained in:
parent
69ae9e7460
commit
228c67228a
52 changed files with 8937 additions and 4185 deletions
|
|
@ -315,7 +315,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> PATCH SAMPLE NONUNIFORM
|
||||
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT
|
||||
%token <lex> SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV
|
||||
%token <lex> NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT
|
||||
%token <lex> PRECISE
|
||||
|
||||
|
||||
|
|
@ -1301,24 +1301,34 @@ interpolation_qualifier
|
|||
| PERPRIMITIVENV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perprimitiveNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV");
|
||||
// Fragment shader stage doesn't check for extension. So we explicitly add below extension check.
|
||||
if (parseContext.language == EShLangFragment)
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
}
|
||||
| PERPRIMITIVEEXT {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perprimitiveEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT");
|
||||
// Fragment shader stage doesn't check for extension. So we explicitly add below extension check.
|
||||
if (parseContext.language == EShLangFragment)
|
||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perPrimitiveNV = true;
|
||||
}
|
||||
| PERVIEWNV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "perviewNV");
|
||||
parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV");
|
||||
parseContext.requireStage($1.loc, EShLangMesh, "perviewNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perViewNV = true;
|
||||
}
|
||||
| PERTASKNV {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "taskNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perTaskNV = true;
|
||||
}
|
||||
|
|
@ -1469,7 +1479,7 @@ storage_qualifier
|
|||
parseContext.globalCheck($1.loc, "shared");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqShared;
|
||||
}
|
||||
|
|
@ -1656,6 +1666,13 @@ storage_qualifier
|
|||
parseContext.unimplemented($1.loc, "subroutine");
|
||||
$$.init($1.loc);
|
||||
}
|
||||
| TASKPAYLOADWORKGROUPEXT {
|
||||
// No need for profile version or extension check. Shader stage already checks both.
|
||||
parseContext.globalCheck($1.loc, "taskPayloadSharedEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT ");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqtaskPayloadSharedEXT;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue