Merge pull request #2362 from ShabbyX/optimize_for_angle

Use GLSLANG_ANGLE to strip features to what ANGLE requires
This commit is contained in:
John Kessenich 2020-08-03 01:28:52 -06:00 committed by GitHub
commit 5743eed4d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 214 additions and 102 deletions

View file

@ -283,6 +283,8 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
{
#ifdef GLSLANG_WEB
return spv::SourceLanguageESSL;
#elif defined(GLSLANG_ANGLE)
return spv::SourceLanguageGLSL;
#endif
switch (source) {
@ -8694,7 +8696,7 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
// Write SPIR-V out to a text file with 32-bit hexadecimal words
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
{
#ifndef GLSLANG_WEB
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
std::ofstream out;
out.open(baseName, std::ios::binary | std::ios::out);
if (out.fail())