Allow GL_NV_mesh_shader in fragment shaders for perprimitiveNV
- Emit relevant capability/extension for use of perprimitiveNV in fragment shader - Remove redundant checks for mesh shader qualifiers in glslang.y - Add profile version check for use of extension GL_NV_mesh_shader - Add a new gtest for use of perprimitiveNV in fragment shader
This commit is contained in:
parent
816bc4447c
commit
38772c0434
8 changed files with 116 additions and 21 deletions
|
|
@ -1157,30 +1157,30 @@ interpolation_qualifier
|
|||
}
|
||||
| PERPRIMITIVENV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
// 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.profileRequires($1.loc, ECoreProfile, 450, E_GL_NV_mesh_shader, "perprimitiveNV");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 320, E_GL_NV_mesh_shader, "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;
|
||||
#endif
|
||||
}
|
||||
| PERVIEWNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
// 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.profileRequires($1.loc, ECoreProfile, 450, E_GL_NV_mesh_shader, "perviewNV");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 320, E_GL_NV_mesh_shader, "perviewNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perViewNV = true;
|
||||
#endif
|
||||
}
|
||||
| PERTASKNV {
|
||||
#ifdef NV_EXTENSIONS
|
||||
// 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.profileRequires($1.loc, ECoreProfile, 450, E_GL_NV_mesh_shader, "taskNV");
|
||||
parseContext.profileRequires($1.loc, EEsProfile, 320, E_GL_NV_mesh_shader, "taskNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.perTaskNV = true;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue