Add-support-for-SPV_NV_fragment_shader_barycentric

This commit is contained in:
Chao Chen
2018-09-19 11:39:56 -07:00
parent 6dd4757f0f
commit 9eada4b971
19 changed files with 4369 additions and 4061 deletions

View File

@@ -827,6 +827,14 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered);
builder.addCapability(spv::CapabilityFragmentFullyCoveredEXT);
return spv::BuiltInFullyCoveredEXT;
case glslang::EbvBaryCoordNV:
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
return spv::BuiltInBaryCoordNV;
case glslang::EbvBaryCoordNoPerspNV:
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
return spv::BuiltInBaryCoordNoPerspNV;
#endif
default:
return spv::BuiltInMax;
@@ -6858,6 +6866,11 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
}
if (symbol->getQualifier().pervertexNV) {
builder.addDecoration(id, spv::DecorationPerVertexNV);
builder.addCapability(spv::CapabilityFragmentBarycentricNV);
builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric);
}
#endif
if (glslangIntermediate->getHlslFunctionality1() && symbol->getType().getQualifier().semanticName != nullptr) {