Based on feedback rename checkShaderStageForNVExtensions to checkExtensionStage
Also continue error checking post requireStage() check
This commit is contained in:
parent
251344f692
commit
80b9872cb4
@ -742,10 +742,8 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NV_EXTENSIONS
|
// check if extension is used with correct shader stage
|
||||||
if (!checkShaderStageForNVExtensions(getCurrentLoc(), extension))
|
checkExtensionStage(getCurrentLoc(), extension);
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// update the requested extension
|
// update the requested extension
|
||||||
updateExtensionBehavior(extension, behavior);
|
updateExtensionBehavior(extension, behavior);
|
||||||
@ -839,24 +837,16 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NV_EXTENSIONS
|
|
||||||
// Check if extension is used with correct shader stage.
|
// Check if extension is used with correct shader stage.
|
||||||
bool TParseVersions::checkShaderStageForNVExtensions(const TSourceLoc& loc, const char * const extension)
|
void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * const extension)
|
||||||
{
|
{
|
||||||
int lNumErrors = getNumErrors();
|
#ifdef NV_EXTENSIONS
|
||||||
|
|
||||||
// GL_NV_mesh_shader extension is only allowed in task/mesh shaders
|
// GL_NV_mesh_shader extension is only allowed in task/mesh shaders
|
||||||
if (strcmp(extension, "GL_NV_mesh_shader") == 0)
|
if (strcmp(extension, "GL_NV_mesh_shader") == 0)
|
||||||
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask),
|
requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask),
|
||||||
"#extension GL_NV_mesh_shader");
|
"#extension GL_NV_mesh_shader");
|
||||||
|
|
||||||
// TODO: need to add error checks for other nvidia turing extensions
|
|
||||||
|
|
||||||
if (getNumErrors() > lNumErrors)
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Call for any operation needing full GLSL integer data-type support.
|
// Call for any operation needing full GLSL integer data-type support.
|
||||||
void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
|
void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
|
||||||
|
|||||||
@ -103,9 +103,7 @@ public:
|
|||||||
virtual void requireSpv(const TSourceLoc&, const char* op);
|
virtual void requireSpv(const TSourceLoc&, const char* op);
|
||||||
virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
|
||||||
virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
|
virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
|
||||||
#ifdef NV_EXTENSIONS
|
virtual void checkExtensionStage(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,
|
virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
|
||||||
const char* szExtraInfoFormat, ...) = 0;
|
const char* szExtraInfoFormat, ...) = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user