SPV: Unexpected declarations of capabilities from NV extensions.

This commit is contained in:
Rex Xu 2017-02-22 16:44:48 +08:00
Родитель 2fbe08c763
Коммит 3e783f9b49
4 изменённых файлов: 23 добавлений и 13 удалений

Просмотреть файл

@ -635,23 +635,32 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addCapability(spv::CapabilityShaderViewportMaskNV);
return spv::BuiltInViewportMaskNV;
case glslang::EbvSecondaryPositionNV:
if (!memberDeclaration) {
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
builder.addCapability(spv::CapabilityShaderStereoViewNV);
}
return spv::BuiltInSecondaryPositionNV;
case glslang::EbvSecondaryViewportMaskNV:
if (!memberDeclaration) {
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
builder.addCapability(spv::CapabilityShaderStereoViewNV);
}
return spv::BuiltInSecondaryViewportMaskNV;
case glslang::EbvPositionPerViewNV:
if (!memberDeclaration) {
builder.addExtension(spv::E_SPV_NVX_multiview_per_view_attributes);
builder.addCapability(spv::CapabilityPerViewAttributesNV);
}
return spv::BuiltInPositionPerViewNV;
case glslang::EbvViewportMaskPerViewNV:
if (!memberDeclaration) {
builder.addExtension(spv::E_SPV_NVX_multiview_per_view_attributes);
builder.addCapability(spv::CapabilityPerViewAttributesNV);
}
return spv::BuiltInViewportMaskPerViewNV;
#endif
default: return spv::BuiltInMax;
default:
return spv::BuiltInMax;
}
}

Просмотреть файл

@ -835,6 +835,7 @@ const char* CapabilityString(int info)
case 5254: return "ShaderViewportIndexLayerNV";
case 5255: return "ShaderViewportMaskNV";
case 5259: return "ShaderStereoViewNV";
case 5262: return "PerViewAttributesNV";
#endif
}

Просмотреть файл

@ -6,7 +6,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Id's are bound by 37
Capability Tessellation
Capability Bad
Capability PerViewAttributesNV
Extension "SPV_NVX_multiview_per_view_attributes"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450

Просмотреть файл

@ -6,7 +6,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Id's are bound by 29
Capability Shader
Capability Bad
Capability PerViewAttributesNV
Extension "SPV_NVX_multiview_per_view_attributes"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450