Implement NVX_multiview_per_view_attributes
This commit is contained in:
@@ -642,6 +642,14 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
|
||||
builder.addCapability(spv::CapabilityShaderStereoViewNV);
|
||||
return spv::BuiltInSecondaryViewportMaskNV;
|
||||
case glslang::EbvPositionPerViewNV:
|
||||
builder.addExtension(spv::E_SPV_NVX_multiview_per_view_attributes);
|
||||
builder.addCapability(spv::CapabilityPerViewAttributesNV);
|
||||
return spv::BuiltInPositionPerViewNV;
|
||||
case glslang::EbvViewportMaskPerViewNV:
|
||||
builder.addExtension(spv::E_SPV_NVX_multiview_per_view_attributes);
|
||||
builder.addCapability(spv::CapabilityPerViewAttributesNV);
|
||||
return spv::BuiltInViewportMaskPerViewNV;
|
||||
#endif
|
||||
default: return spv::BuiltInMax;
|
||||
}
|
||||
@@ -2384,6 +2392,11 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
||||
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
|
||||
}
|
||||
}
|
||||
if (glslangMember.getQualifier().layoutPassthrough) {
|
||||
addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationPassthroughNV);
|
||||
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
|
||||
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -2661,6 +2674,8 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList&
|
||||
case glslang::EbvViewportMaskNV:
|
||||
case glslang::EbvSecondaryPositionNV:
|
||||
case glslang::EbvSecondaryViewportMaskNV:
|
||||
case glslang::EbvPositionPerViewNV:
|
||||
case glslang::EbvViewportMaskPerViewNV:
|
||||
#endif
|
||||
// Generate the associated capability. Delegate to TranslateBuiltInDecoration.
|
||||
// Alternately, we could just call this for any glslang built-in, since the
|
||||
|
||||
Reference in New Issue
Block a user