changes based on feedback
This commit is contained in:
parent
95e2d4ec02
commit
3ae0f58322
8 changed files with 453 additions and 188 deletions
|
|
@ -3606,6 +3606,7 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
|
|||
if ((profile == EEsProfile && version >= 320) ||
|
||||
extensionTurnedOn(E_GL_NV_mesh_shader))
|
||||
return;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -835,8 +835,8 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
|
|||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// Validate if extension name is used with correct shader stage.
|
||||
bool TParseVersions::validateExtensionName(const TSourceLoc& loc, const char * const extension)
|
||||
// Check if extension is used with correct shader stage.
|
||||
bool TParseVersions::checkShaderStageForNVExtensions(const TSourceLoc& loc, const char * const extension)
|
||||
{
|
||||
int lNumErrors = getNumErrors();
|
||||
|
||||
|
|
@ -845,6 +845,8 @@ bool TParseVersions::validateExtensionName(const TSourceLoc& loc, const char * c
|
|||
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask),
|
||||
"#extension GL_NV_mesh_shader");
|
||||
|
||||
// TODO: need to add error checks for other nvidia turing extensions
|
||||
|
||||
if (getNumErrors() > lNumErrors)
|
||||
return false;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public:
|
|||
virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
||||
virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
|
||||
#ifdef NV_EXTENSIONS
|
||||
virtual bool validateExtensionName(const TSourceLoc&, const char* const extension);
|
||||
virtual bool checkShaderStageForNVExtensions(const TSourceLoc&, const char* const extension);
|
||||
#endif
|
||||
|
||||
virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ int TPpContext::CPPextension(TPpToken* ppToken)
|
|||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (!parseContext.validateExtensionName(ppToken->loc, extensionName))
|
||||
if (!parseContext.checkShaderStageForNVExtensions(ppToken->loc, extensionName))
|
||||
return token;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue