mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-10 12:30:05 +00:00
Don't emit NV-specific interface members if NV extensions are disabled.
This commit is contained in:
parent
aa3c64c214
commit
bcf291a7ba
@ -2272,12 +2272,21 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member)
|
||||
{
|
||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||
|
||||
if (member.getFieldName() == "gl_ViewportMask" &&
|
||||
extensions.find("GL_NV_viewport_array2") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_SecondaryViewportMaskNV" &&
|
||||
extensions.find("GL_NV_stereo_view_rendering") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_SecondaryPositionNV" &&
|
||||
extensions.find("GL_NV_stereo_view_rendering") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_PositionPerViewNV" &&
|
||||
extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
|
||||
return true;
|
||||
if (member.getFieldName() == "gl_ViewportMaskPerViewNV" &&
|
||||
extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user